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