Docs: Improve documentation for `wp_dashboard_browser_nag()` and `dashboard_browser_nag_class()`.

Props grapplerulrich.
Fixes #48932.
Built from https://develop.svn.wordpress.org/trunk@46880


git-svn-id: http://core.svn.wordpress.org/trunk@46680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-12-11 10:59:05 +00:00
parent b639963d7a
commit 9b91ffde04
2 changed files with 18 additions and 10 deletions

View File

@ -1471,7 +1471,7 @@ function wp_dashboard_primary() {
}
/**
* Display the WordPress events and news feeds.
* Displays the WordPress events and news feeds.
*
* @since 3.8.0
* @since 4.8.0 Removed popular plugins feed.
@ -1489,7 +1489,7 @@ function wp_dashboard_primary_output( $widget_id, $feeds ) {
}
/**
* Display file upload quota on dashboard.
* Displays file upload quota on dashboard.
*
* Runs on the {@see 'activity_box_end'} hook in wp_dashboard_right_now().
*
@ -1553,7 +1553,11 @@ function wp_dashboard_quota() {
<?php
}
// Display Browser Nag Meta Box
/**
* Displays the browser update nag.
*
* @since 3.2.0
*/
function wp_dashboard_browser_nag() {
$notice = '';
$response = wp_check_browser_version();
@ -1611,10 +1615,12 @@ function wp_dashboard_browser_nag() {
}
/**
* Adds an additional class to the browser nag if the current version is insecure.
*
* @since 3.2.0
*
* @param array $classes
* @return array
* @param string[] $classes Array of meta box classes.
* @return string[] Modified array of meta box classes.
*/
function dashboard_browser_nag_class( $classes ) {
$response = wp_check_browser_version();
@ -1627,11 +1633,11 @@ function dashboard_browser_nag_class( $classes ) {
}
/**
* Check if the user needs a browser update
* Checks if the user needs a browser update.
*
* @since 3.2.0
*
* @return array|bool False on failure, array of browser data on success.
* @return array|bool Array of browser data on success, false on failure.
*/
function wp_check_browser_version() {
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
@ -1731,8 +1737,8 @@ function wp_dashboard_php_nag() {
*
* @since 5.1.0
*
* @param string[] $classes Array of metabox classes.
* @return string[] Modified array of metabox classes.
* @param string[] $classes Array of meta box classes.
* @return string[] Modified array of meta box classes.
*/
function dashboard_php_nag_class( $classes ) {
$response = wp_check_php_version();
@ -1746,6 +1752,8 @@ function dashboard_php_nag_class( $classes ) {
/**
* Empty function usable by plugins to output empty dashboard widget (to be populated later by JS).
*
* @since 2.5.0
*/
function wp_dashboard_empty() {}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4-alpha-46879';
$wp_version = '5.4-alpha-46880';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.