From 6e89ac85c63f77a124aab4c9dcdace3a3bd0a682 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 5 Mar 2024 11:43:13 +0000 Subject: [PATCH] Docs: Document the usage of `$_paused_plugins` and `$_paused_themes` globals. Follow-up to [44973]. Props upadalavipul, sabernhardt. See #60021. Built from https://develop.svn.wordpress.org/trunk@57772 git-svn-id: http://core.svn.wordpress.org/trunk@57273 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/plugin.php | 7 ++++++- wp-admin/includes/theme.php | 7 ++++++- wp-includes/load.php | 4 ++++ wp-includes/version.php | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 76e74d5986..84d9dcad1e 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -2456,6 +2456,8 @@ function wp_add_privacy_policy_content( $plugin_name, $policy_text ) { * Conditional Tags} article in the Theme Developer Handbook. * * @since 5.2.0 + * + * @global WP_Paused_Extensions_Storage $_paused_plugins * * @param string $plugin Path to the plugin file relative to the plugins directory. * @return bool True, if in the list of paused plugins. False, if not in the list. @@ -2478,6 +2480,8 @@ function is_plugin_paused( $plugin ) { * Gets the error that was recorded for a paused plugin. * * @since 5.2.0 + * + * @global WP_Paused_Extensions_Storage $_paused_plugins * * @param string $plugin Path to the plugin file relative to the plugins directory. * @return array|false Array of error information as returned by `error_get_last()`, @@ -2553,7 +2557,8 @@ function resume_plugin( $plugin, $redirect = '' ) { * * @since 5.2.0 * - * @global string $pagenow The filename of the current screen. + * @global string $pagenow The filename of the current screen. + * @global WP_Paused_Extensions_Storage $_paused_plugins */ function paused_plugins_notice() { if ( 'plugins.php' === $GLOBALS['pagenow'] ) { diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index e89250b4f7..cae4529e1f 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -1110,6 +1110,8 @@ function customize_themes_print_templates() { * Conditional Tags} article in the Theme Developer Handbook. * * @since 5.2.0 + * + * @global WP_Paused_Extensions_Storage $_paused_themes * * @param string $theme Path to the theme directory relative to the themes directory. * @return bool True, if in the list of paused themes. False, not in the list. @@ -1130,6 +1132,8 @@ function is_theme_paused( $theme ) { * Gets the error that was recorded for a paused theme. * * @since 5.2.0 + * + * @global WP_Paused_Extensions_Storage $_paused_themes * * @param string $theme Path to the theme directory relative to the themes * directory. @@ -1221,7 +1225,8 @@ function resume_theme( $theme, $redirect = '' ) { * * @since 5.2.0 * - * @global string $pagenow The filename of the current screen. + * @global string $pagenow The filename of the current screen. + * @global WP_Paused_Extensions_Storage $_paused_themes */ function paused_themes_notice() { if ( 'themes.php' === $GLOBALS['pagenow'] ) { diff --git a/wp-includes/load.php b/wp-includes/load.php index 509c1cb319..1bff9c6976 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -1013,6 +1013,8 @@ function wp_get_active_and_valid_plugins() { * Filters a given list of plugins, removing any paused plugins from it. * * @since 5.2.0 + * + * @global WP_Paused_Extensions_Storage $_paused_plugins * * @param string[] $plugins Array of absolute plugin main file paths. * @return string[] Filtered array of plugins, without any paused plugins. @@ -1087,6 +1089,8 @@ function wp_get_active_and_valid_themes() { * Filters a given list of themes, removing any paused themes from it. * * @since 5.2.0 + * + * @global WP_Paused_Extensions_Storage $_paused_themes * * @param string[] $themes Array of absolute theme directory paths. * @return string[] Filtered array of absolute paths to themes, without any paused themes. diff --git a/wp-includes/version.php b/wp-includes/version.php index a5d5a1b109..306ce25a74 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-beta3-57771'; +$wp_version = '6.5-beta3-57772'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.