Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: theme_auto_update_debug_string

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 3 times in this file.

Line Code
1134                }
1135
1136                if ( $enabled ) {
1137                     $auto_updates_string = __( 'Enabled' );
1138                } else {
1139                     $auto_updates_string = __( 'Disabled' );
1140                }
1141
1142                /** This filter is documented in wp-admin/includes/class-wp-debug-data.php */
1143                $auto_updates_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $active_theme, $enabled );
1144
1145                $info['wp-active-theme']['fields']['auto_update'] = array(
1146                     'label' => __( 'Auto-updates' ),
1147                     'value' => $auto_updates_string,
1148                     'debug' => $auto_updates_string,
1149                );
1150           }
1151
1152           $parent_theme = $active_theme->parent();
 
Line Code
1220                     }
1221
1222                     if ( $enabled ) {
1223                          $parent_theme_auto_update_string = __( 'Enabled' );
1224                     } else {
1225                          $parent_theme_auto_update_string = __( 'Disabled' );
1226                     }
1227
1228                     /** This filter is documented in wp-admin/includes/class-wp-debug-data.php */
1229                     $parent_theme_auto_update_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $parent_theme, $enabled );
1230
1231                     $info['wp-parent-theme']['fields']['auto_update'] = array(
1232                          'label' => __( 'Auto-update' ),
1233                          'value' => $parent_theme_auto_update_string,
1234                          'debug' => $parent_theme_auto_update_string,
1235                     );
1236                }
1237           }
1238
 
Line Code
1316                     /**
1317                      * Filters the text string of the auto-updates setting for each theme in the Site Health debug data.
1318                      *
1319                      * @since 5.5.0
1320                      *
1321                      * @param string   $auto_updates_string The string output for the auto-updates column.
1322                      * @param WP_Theme $theme               An object of theme data.
1323                      * @param bool     $enabled             Whether auto-updates are enabled for this item.
1324                      */
1325                     $auto_updates_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $theme, $enabled );
1326
1327                     $theme_version_string       .= ' | ' . $auto_updates_string;
1328                     $theme_version_string_debug .= ', ' . $auto_updates_string;
1329                }
1330
1331                $info['wp-themes-inactive']['fields'][ sanitize_text_field( $theme->name ) ] = array(
1332                     'label' => sprintf(
1333                          /* translators: 1: Theme name. 2: Theme slug. */
1334                          __( '%1$s (%2$s)' ),