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
1179                }
1180
1181                if ( $enabled ) {
1182                     $auto_updates_string = __( 'Enabled' );
1183                } else {
1184                     $auto_updates_string = __( 'Disabled' );
1185                }
1186
1187                /** This filter is documented in wp-admin/includes/class-wp-debug-data.php */
1188                $auto_updates_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $active_theme, $enabled );
1189
1190                $info['wp-active-theme']['fields']['auto_update'] = array(
1191                     'label' => __( 'Auto-updates' ),
1192                     'value' => $auto_updates_string,
1193                     'debug' => $auto_updates_string,
1194                );
1195           }
1196
1197           $parent_theme = $active_theme->parent();
 
Line Code
1265                     }
1266
1267                     if ( $enabled ) {
1268                          $parent_theme_auto_update_string = __( 'Enabled' );
1269                     } else {
1270                          $parent_theme_auto_update_string = __( 'Disabled' );
1271                     }
1272
1273                     /** This filter is documented in wp-admin/includes/class-wp-debug-data.php */
1274                     $parent_theme_auto_update_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $parent_theme, $enabled );
1275
1276                     $info['wp-parent-theme']['fields']['auto_update'] = array(
1277                          'label' => __( 'Auto-update' ),
1278                          'value' => $parent_theme_auto_update_string,
1279                          'debug' => $parent_theme_auto_update_string,
1280                     );
1281                }
1282           }
1283
 
Line Code
1361                     /**
1362                      * Filters the text string of the auto-updates setting for each theme in the Site Health debug data.
1363                      *
1364                      * @since 5.5.0
1365                      *
1366                      * @param string   $auto_updates_string The string output for the auto-updates column.
1367                      * @param WP_Theme $theme               An object of theme data.
1368                      * @param bool     $enabled             Whether auto-updates are enabled for this item.
1369                      */
1370                     $auto_updates_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $theme, $enabled );
1371
1372                     $theme_version_string       .= ' | ' . $auto_updates_string;
1373                     $theme_version_string_debug .= ', ' . $auto_updates_string;
1374                }
1375
1376                $info['wp-themes-inactive']['fields'][ sanitize_text_field( $theme->name ) ] = array(
1377                     'label' => sprintf(
1378                          /* translators: 1: Theme name. 2: Theme slug. */
1379                          __( '%1$s (%2$s)' ),