Docs: Add missing description for $pagenow global in various functions.

See #54729, #55499.

git-svn-id: https://develop.svn.wordpress.org/trunk@53060 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2022-04-04 18:24:18 +00:00
parent 74f4d6b441
commit 8277055e37
22 changed files with 42 additions and 37 deletions

View File

@@ -1233,7 +1233,7 @@ function show_admin_bar( $show ) {
* @since 3.1.0
*
* @global bool $show_admin_bar
* @global string $pagenow
* @global string $pagenow The filename of the current screen.
*
* @return bool Whether the admin bar should be showing.
*/

View File

@@ -500,7 +500,7 @@ final class WP_Customize_Manager {
*
* @since 3.4.0
*
* @global string $pagenow
* @global string $pagenow The filename of the current screen.
*/
public function setup_theme() {
global $pagenow;
@@ -607,7 +607,7 @@ final class WP_Customize_Manager {
*
* @since 4.9.0
*
* @global string $pagenow
* @global string $pagenow The filename of the current screen.
*/
public function establish_loaded_changeset() {
global $pagenow;
@@ -3285,7 +3285,7 @@ final class WP_Customize_Manager {
*
* @since 4.9.0
*
* @global string $pagenow
* @global string $pagenow The filename of the current screen.
*
* @param array $settings Current settings to filter.
* @return array Heartbeat settings.

View File

@@ -65,7 +65,7 @@ class WP_Recovery_Mode_Link_Service {
*
* @since 5.2.0
*
* @global string $pagenow
* @global string $pagenow The filename of the current screen.
*
* @param int $ttl Number of seconds the link should be valid for.
*/

View File

@@ -8399,7 +8399,7 @@ function clean_dirsize_cache( $path ) {
*
* @since 5.2.0
*
* @global string $wp_version WordPress version.
* @global string $wp_version The WordPress version string.
*
* @param string $required Minimum required WordPress version.
* @return bool True if required version is compatible or empty, false if not.

View File

@@ -258,7 +258,7 @@ function wp_set_script_translations( $handle, $domain = 'default', $path = null
*
* @since 2.1.0
*
* @global string $pagenow
* @global string $pagenow The filename of the current screen.
*
* @param string $handle Name of the script to be removed.
*/

View File

@@ -114,7 +114,7 @@ function get_user_locale( $user_id = 0 ) {
*
* @since 5.0.0
*
* @global string $pagenow
* @global string $pagenow The filename of the current screen.
*
* @return string The determined locale.
*/

View File

@@ -886,6 +886,8 @@ function wp_skip_paused_plugins( array $plugins ) {
* @since 5.1.0
* @access private
*
* @global string $pagenow The filename of the current screen.
*
* @return string[] Array of absolute paths to theme directories.
*/
function wp_get_active_and_valid_themes() {
@@ -966,7 +968,7 @@ function wp_is_recovery_mode() {
*
* @since 5.2.0
*
* @global string $pagenow
* @global string $pagenow The filename of the current screen.
*
* @return bool True if the current endpoint should be protected.
*/
@@ -1746,7 +1748,7 @@ function wp_is_xml_request() {
*
* @since 5.6.1
*
* @global string $pagenow The current page.
* @global string $pagenow The filename of the current screen.
*
* @param string $context The context to check for protection. Accepts 'login', 'admin', and 'front'.
* Defaults to the current context.

View File

@@ -6577,7 +6577,7 @@ function wp_update_attachment_metadata( $attachment_id, $data ) {
*
* @since 2.1.0
*
* @global string $pagenow
* @global string $pagenow The filename of the current screen.
*
* @param int $attachment_id Optional. Attachment post ID. Defaults to global $post.
* @return string|false Attachment URL, otherwise false.

View File

@@ -2847,6 +2847,8 @@ function _wp_normalize_relative_css_links( $css, $stylesheet_url ) {
* Inject the block editor assets that need to be loaded into the editor's iframe as an inline script.
*
* @since 5.8.0
*
* @global string $pagenow The filename of the current screen.
*/
function wp_add_iframed_editor_assets_html() {
global $pagenow;

View File

@@ -3712,7 +3712,7 @@ All at ###SITENAME###
* @since 3.0.0
* @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
*
* @global string $pagenow
* @global string $pagenow The filename of the current screen.
*/
function new_user_email_admin_notice() {
global $pagenow;

View File

@@ -2,8 +2,8 @@
/**
* Creates common globals for the rest of WordPress
*
* Sets $pagenow global which is the current page. Checks
* for the browser to set which one is currently being used.
* Sets $pagenow global which is the filename of the current screen.
* Checks for the browser to set which one is currently being used.
*
* Detects which user environment WordPress is being used on.
* Only attempts to check for Apache, Nginx and IIS -- three web