Skip to content

Commit d088e31

Browse files
committed
Docs: Various docblock improvements and corrections.
See #53399 git-svn-id: https://develop.svn.wordpress.org/trunk@52035 602fd350-edb4-49c9-b593-d223f7449a82
1 parent a247caa commit d088e31

File tree

5 files changed

+46
-43
lines changed

5 files changed

+46
-43
lines changed

src/wp-admin/includes/deprecated.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $le
163163
* @deprecated 3.0.0 Use register_setting()
164164
* @see register_setting()
165165
*
166-
* @param string $option_group A settings group name. Should correspond to an allowed option key name.
167-
* Default allowed option key names include 'general', 'discussion', 'media',
168-
* 'reading', 'writing', and 'options'.
169-
* @param string $option_name The name of an option to sanitize and save.
170-
* @param callable $sanitize_callback A callback function that sanitizes the option's value.
166+
* @param string $option_group A settings group name. Should correspond to an allowed option key name.
167+
* Default allowed option key names include 'general', 'discussion', 'media',
168+
* 'reading', 'writing', and 'options'.
169+
* @param string $option_name The name of an option to sanitize and save.
170+
* @param callable $sanitize_callback Optional. A callback function that sanitizes the option's value.
171171
*/
172172
function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
173173
_deprecated_function( __FUNCTION__, '3.0.0', 'register_setting()' );
@@ -181,9 +181,9 @@ function add_option_update_handler( $option_group, $option_name, $sanitize_callb
181181
* @deprecated 3.0.0 Use unregister_setting()
182182
* @see unregister_setting()
183183
*
184-
* @param string $option_group
185-
* @param string $option_name
186-
* @param callable $sanitize_callback
184+
* @param string $option_group The settings group name used during registration.
185+
* @param string $option_name The name of the option to unregister.
186+
* @param callable $sanitize_callback Optional. Deprecated.
187187
*/
188188
function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
189189
_deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' );
@@ -1426,8 +1426,8 @@ function _relocate_children( $old_ID, $new_ID ) {
14261426
* @param string $menu_title The text to be used for the menu.
14271427
* @param string $capability The capability required for this menu to be displayed to the user.
14281428
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1429-
* @param callable $function The function to be called to output the content for this page.
1430-
* @param string $icon_url The url to the icon to be used for this menu.
1429+
* @param callable $function Optional. The function to be called to output the content for this page.
1430+
* @param string $icon_url Optional. The URL to the icon to be used for this menu.
14311431
* @return string The resulting page's hook_suffix.
14321432
*/
14331433
function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
@@ -1459,8 +1459,8 @@ function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $fu
14591459
* @param string $menu_title The text to be used for the menu.
14601460
* @param string $capability The capability required for this menu to be displayed to the user.
14611461
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1462-
* @param callable $function The function to be called to output the content for this page.
1463-
* @param string $icon_url The url to the icon to be used for this menu.
1462+
* @param callable $function Optional. The function to be called to output the content for this page.
1463+
* @param string $icon_url Optional. The URL to the icon to be used for this menu.
14641464
* @return string The resulting page's hook_suffix.
14651465
*/
14661466
function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {

src/wp-admin/includes/plugin.php

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,14 +1299,14 @@ function uninstall_plugin( $plugin ) {
12991299
* @param string $menu_slug The slug name to refer to this menu by. Should be unique for this menu page and only
13001300
* include lowercase alphanumeric, dashes, and underscores characters to be compatible
13011301
* with sanitize_key().
1302-
* @param callable $function The function to be called to output the content for this page.
1303-
* @param string $icon_url The URL to the icon to be used for this menu.
1302+
* @param callable $function Optional. The function to be called to output the content for this page.
1303+
* @param string $icon_url Optional. The URL to the icon to be used for this menu.
13041304
* * Pass a base64-encoded SVG using a data URI, which will be colored to match
13051305
* the color scheme. This should begin with 'data:image/svg+xml;base64,'.
13061306
* * Pass the name of a Dashicons helper class to use a font icon,
13071307
* e.g. 'dashicons-chart-pie'.
13081308
* * Pass 'none' to leave div.wp-menu-image empty so an icon can be added via CSS.
1309-
* @param int $position The position in the menu order this item should appear.
1309+
* @param int $position Optional. The position in the menu order this item should appear.
13101310
* @return string The resulting page's hook_suffix.
13111311
*/
13121312
function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = null ) {
@@ -1377,8 +1377,8 @@ function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $func
13771377
* @param string $menu_slug The slug name to refer to this menu by. Should be unique for this menu
13781378
* and only include lowercase alphanumeric, dashes, and underscores characters
13791379
* to be compatible with sanitize_key().
1380-
* @param callable $function The function to be called to output the content for this page.
1381-
* @param int $position The position in the menu order this item should appear.
1380+
* @param callable $function Optional. The function to be called to output the content for this page.
1381+
* @param int $position Optional. The position in the menu order this item should appear.
13821382
* @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
13831383
*/
13841384
function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
@@ -1489,8 +1489,8 @@ function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability,
14891489
* @param string $menu_title The text to be used for the menu.
14901490
* @param string $capability The capability required for this menu to be displayed to the user.
14911491
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1492-
* @param callable $function The function to be called to output the content for this page.
1493-
* @param int $position The position in the menu order this item should appear.
1492+
* @param callable $function Optional. The function to be called to output the content for this page.
1493+
* @param int $position Optional. The position in the menu order this item should appear.
14941494
* @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
14951495
*/
14961496
function add_management_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
@@ -1513,8 +1513,8 @@ function add_management_page( $page_title, $menu_title, $capability, $menu_slug,
15131513
* @param string $menu_title The text to be used for the menu.
15141514
* @param string $capability The capability required for this menu to be displayed to the user.
15151515
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1516-
* @param callable $function The function to be called to output the content for this page.
1517-
* @param int $position The position in the menu order this item should appear.
1516+
* @param callable $function Optional. The function to be called to output the content for this page.
1517+
* @param int $position Optional. The position in the menu order this item should appear.
15181518
* @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
15191519
*/
15201520
function add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
@@ -1537,8 +1537,8 @@ function add_options_page( $page_title, $menu_title, $capability, $menu_slug, $f
15371537
* @param string $menu_title The text to be used for the menu.
15381538
* @param string $capability The capability required for this menu to be displayed to the user.
15391539
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1540-
* @param callable $function The function to be called to output the content for this page.
1541-
* @param int $position The position in the menu order this item should appear.
1540+
* @param callable $function Optional. The function to be called to output the content for this page.
1541+
* @param int $position Optional. The position in the menu order this item should appear.
15421542
* @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
15431543
*/
15441544
function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
@@ -1561,8 +1561,8 @@ function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $fun
15611561
* @param string $menu_title The text to be used for the menu.
15621562
* @param string $capability The capability required for this menu to be displayed to the user.
15631563
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1564-
* @param callable $function The function to be called to output the content for this page.
1565-
* @param int $position The position in the menu order this item should appear.
1564+
* @param callable $function Optional. The function to be called to output the content for this page.
1565+
* @param int $position Optional. The position in the menu order this item should appear.
15661566
* @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
15671567
*/
15681568
function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
@@ -1585,8 +1585,8 @@ function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $f
15851585
* @param string $menu_title The text to be used for the menu.
15861586
* @param string $capability The capability required for this menu to be displayed to the user.
15871587
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1588-
* @param callable $function The function to be called to output the content for this page.
1589-
* @param int $position The position in the menu order this item should appear.
1588+
* @param callable $function Optional. The function to be called to output the content for this page.
1589+
* @param int $position Optional. The position in the menu order this item should appear.
15901590
* @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
15911591
*/
15921592
function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
@@ -1614,8 +1614,8 @@ function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $fun
16141614
* @param string $menu_title The text to be used for the menu.
16151615
* @param string $capability The capability required for this menu to be displayed to the user.
16161616
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1617-
* @param callable $function The function to be called to output the content for this page.
1618-
* @param int $position The position in the menu order this item should appear.
1617+
* @param callable $function Optional. The function to be called to output the content for this page.
1618+
* @param int $position Optional. The position in the menu order this item should appear.
16191619
* @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
16201620
*/
16211621
function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
@@ -1638,8 +1638,8 @@ function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug,
16381638
* @param string $menu_title The text to be used for the menu.
16391639
* @param string $capability The capability required for this menu to be displayed to the user.
16401640
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1641-
* @param callable $function The function to be called to output the content for this page.
1642-
* @param int $position The position in the menu order this item should appear.
1641+
* @param callable $function Optional. The function to be called to output the content for this page.
1642+
* @param int $position Optional. The position in the menu order this item should appear.
16431643
* @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
16441644
*/
16451645
function add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
@@ -1662,8 +1662,8 @@ function add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $fun
16621662
* @param string $menu_title The text to be used for the menu.
16631663
* @param string $capability The capability required for this menu to be displayed to the user.
16641664
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1665-
* @param callable $function The function to be called to output the content for this page.
1666-
* @param int $position The position in the menu order this item should appear.
1665+
* @param callable $function Optional. The function to be called to output the content for this page.
1666+
* @param int $position Optional. The position in the menu order this item should appear.
16671667
* @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
16681668
*/
16691669
function add_media_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
@@ -1686,8 +1686,8 @@ function add_media_page( $page_title, $menu_title, $capability, $menu_slug, $fun
16861686
* @param string $menu_title The text to be used for the menu.
16871687
* @param string $capability The capability required for this menu to be displayed to the user.
16881688
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1689-
* @param callable $function The function to be called to output the content for this page.
1690-
* @param int $position The position in the menu order this item should appear.
1689+
* @param callable $function Optional. The function to be called to output the content for this page.
1690+
* @param int $position Optional. The position in the menu order this item should appear.
16911691
* @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
16921692
*/
16931693
function add_links_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
@@ -1710,8 +1710,8 @@ function add_links_page( $page_title, $menu_title, $capability, $menu_slug, $fun
17101710
* @param string $menu_title The text to be used for the menu.
17111711
* @param string $capability The capability required for this menu to be displayed to the user.
17121712
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1713-
* @param callable $function The function to be called to output the content for this page.
1714-
* @param int $position The position in the menu order this item should appear.
1713+
* @param callable $function Optional. The function to be called to output the content for this page.
1714+
* @param int $position Optional. The position in the menu order this item should appear.
17151715
* @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
17161716
*/
17171717
function add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
@@ -1734,8 +1734,8 @@ function add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $fun
17341734
* @param string $menu_title The text to be used for the menu.
17351735
* @param string $capability The capability required for this menu to be displayed to the user.
17361736
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
1737-
* @param callable $function The function to be called to output the content for this page.
1738-
* @param int $position The position in the menu order this item should appear.
1737+
* @param callable $function Optional. The function to be called to output the content for this page.
1738+
* @param int $position Optional. The position in the menu order this item should appear.
17391739
* @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
17401740
*/
17411741
function add_comments_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {

src/wp-includes/formatting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5029,7 +5029,7 @@ function wp_pre_kses_less_than( $text ) {
50295029
*
50305030
* @since 2.3.0
50315031
*
5032-
* @param array $matches Populated by matches to preg_replace.
5032+
* @param string[] $matches Populated by matches to preg_replace.
50335033
* @return string The text returned after esc_html if needed.
50345034
*/
50355035
function wp_pre_kses_less_than_callback( $matches ) {

src/wp-includes/option.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,9 +2383,9 @@ function register_setting( $option_group, $option_name, $args = array() ) {
23832383
* @global array $new_allowed_options
23842384
* @global array $wp_registered_settings
23852385
*
2386-
* @param string $option_group The settings group name used during registration.
2387-
* @param string $option_name The name of the option to unregister.
2388-
* @param callable|string $deprecated Deprecated.
2386+
* @param string $option_group The settings group name used during registration.
2387+
* @param string $option_name The name of the option to unregister.
2388+
* @param callable $deprecated Optional. Deprecated.
23892389
*/
23902390
function unregister_setting( $option_group, $option_name, $deprecated = '' ) {
23912391
global $new_allowed_options, $wp_registered_settings;

tests/phpunit/includes/testcase-xmlrpc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
require_once ABSPATH . WPINC . '/class-wp-xmlrpc-server.php';
55

66
abstract class WP_XMLRPC_UnitTestCase extends WP_UnitTestCase {
7+
/**
8+
* @var wp_xmlrpc_server
9+
*/
710
protected $myxmlrpcserver;
811

912
public function set_up() {

0 commit comments

Comments
 (0)