Ticket #52539: 52539.diff
File 52539.diff, 52.6 KB (added by , 4 years ago) |
---|
-
src/wp-admin/includes/class-custom-background.php
diff --git a/src/wp-admin/includes/class-custom-background.php b/src/wp-admin/includes/class-custom-background.php index bc3c082bc3..245085a744 100644
a b class Custom_Background { 41 41 * Constructor - Register administration header callback. 42 42 * 43 43 * @since 3.0.0 44 * @param callable $admin_header_callback45 * @param callable $admin_image_div_callback Optional custom image div output callback.44 * @param callable|string $admin_header_callback Optional custom header output callback, or string denoting the callback name. 45 * @param callable|string $admin_image_div_callback Optional custom image div output callback, or string denoting the callback name. 46 46 */ 47 47 public function __construct( $admin_header_callback = '', $admin_image_div_callback = '' ) { 48 48 $this->admin_header_callback = $admin_header_callback; -
src/wp-admin/includes/class-custom-image-header.php
diff --git a/src/wp-admin/includes/class-custom-image-header.php b/src/wp-admin/includes/class-custom-image-header.php index 76eddff973..71febac005 100644
a b class Custom_Image_Header { 49 49 * Constructor - Register administration header callback. 50 50 * 51 51 * @since 2.1.0 52 * @param callable $admin_header_callback53 * @param callable $admin_image_div_callback Optional custom image div output callback.52 * @param callable|string $admin_header_callback Optional custom header output callback, or string denoting the callback name. 53 * @param callable|string $admin_image_div_callback Optional custom image div output callback, or string denoting the callback name. 54 54 */ 55 55 public function __construct( $admin_header_callback, $admin_image_div_callback = '' ) { 56 56 $this->admin_header_callback = $admin_header_callback; -
src/wp-admin/includes/dashboard.php
diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index c7d6a00f44..fad5347fad 100644
a b function wp_dashboard_setup() { 161 161 * 162 162 * @global callable[] $wp_dashboard_control_callbacks 163 163 * 164 * @param string $widget_id Widget ID (used in the 'id' attribute for the widget).165 * @param string $widget_name Title of the widget.166 * @param callable $callback Function that fills the widget with the desired content.167 * The function should echo its output.168 * @param callable $control_callback Optional. Function that outputs controls for the widget. Default null.169 * @param array $callback_args Optional. Data that should be set as the $args property of the widget array170 * (which is the second parameter passed to your callback). Default null.171 * @param string $context Optional. The context within the screen where the box should display.172 * Accepts 'normal', 'side', 'column3', or 'column4'. Default 'normal'.173 * @param string $priority Optional. The priority within the context where the box should show.164 * @param string $widget_id Widget ID (used in the 'id' attribute for the widget). 165 * @param string $widget_name Title of the widget. 166 * @param callable|string $callback Function that fills the widget with the desired content, or string denoting the callback name. 167 * The function should echo its output. 168 * @param callable $control_callback Optional. Function that outputs controls for the widget. Default null. 169 * @param array $callback_args Optional. Data that should be set as the $args property of the widget array 170 * (which is the second parameter passed to your callback). Default null. 171 * @param string $context Optional. The context within the screen where the box should display. 172 * Accepts 'normal', 'side', 'column3', or 'column4'. Default 'normal'. 173 * @param string $priority Optional. The priority within the context where the box should show. 174 174 * Accepts 'high', 'core', 'default', or 'low'. Default 'core'. 175 175 */ 176 176 function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null, $context = 'normal', $priority = 'core' ) { -
src/wp-admin/includes/deprecated.php
diff --git a/src/wp-admin/includes/deprecated.php b/src/wp-admin/includes/deprecated.php index da725f8ccd..37e27df067 100644
a b function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $le 163 163 * @deprecated 3.0.0 Use register_setting() 164 164 * @see register_setting() 165 165 * 166 * @param string $option_groupA settings group name. Should correspond to an allowed option key name.167 * Default allowed option key names include 'general', 'discussion', 'media',168 * 'reading', 'writing', 'misc', 'options', and 'privacy'.169 * @param string $option_nameThe 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', 'misc', 'options', and 'privacy'. 169 * @param string $option_name The name of an option to sanitize and save. 170 * @param callable|string $sanitize_callback A callback function that sanitizes the option's value, or a string denoting the callback. 171 171 */ 172 172 function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) { 173 173 _deprecated_function( __FUNCTION__, '3.0.0', 'register_setting()' ); … … function add_option_update_handler( $option_group, $option_name, $sanitize_callb 181 181 * @deprecated 3.0.0 Use unregister_setting() 182 182 * @see unregister_setting() 183 183 * 184 * @param string $option_group185 * @param string $option_name186 * @param callable $sanitize_callback184 * @param string $option_group A settings group name. 185 * @param string $option_name The name of an option to sanitize and unregister. 186 * @param callable|string $sanitize_callback A callback function that sanitizes the option's value, or a string denoting the callback. 187 187 */ 188 188 function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) { 189 189 _deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' ); … … function _relocate_children( $old_ID, $new_ID ) { 1422 1422 * @see add_menu_page() 1423 1423 * @global int $_wp_last_object_menu 1424 1424 * 1425 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1426 * @param string $menu_title The text to be used for the menu.1427 * @param string $capability The capability required for this menu to be displayed to the user.1428 * @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.1425 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1426 * @param string $menu_title The text to be used for the menu. 1427 * @param string $capability The capability required for this menu to be displayed to the user. 1428 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1429 * @param callable|string $function The function to be called to output the content for this page, or the string denoting the callback. 1430 * @param string $icon_url The url to the icon to be used for this menu. 1431 1431 * @return string The resulting page's hook_suffix. 1432 1432 */ 1433 1433 function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') { … … function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $fu 1455 1455 * @see add_menu_page() 1456 1456 * @global int $_wp_last_utility_menu 1457 1457 * 1458 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1459 * @param string $menu_title The text to be used for the menu.1460 * @param string $capability The capability required for this menu to be displayed to the user.1461 * @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.1458 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1459 * @param string $menu_title The text to be used for the menu. 1460 * @param string $capability The capability required for this menu to be displayed to the user. 1461 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1462 * @param callable|string $function The function to be called to output the content for this page, or the string denoting the callback.. 1463 * @param string $icon_url The url to the icon to be used for this menu. 1464 1464 * @return string The resulting page's hook_suffix. 1465 1465 */ 1466 1466 function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') { -
src/wp-admin/includes/media.php
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index 93d850d606..fef0219b5b 100644
a b function media_handle_sideload( $file_array, $post_id = 0, $desc = null, $post_d 513 513 * 514 514 * @global int $body_id 515 515 * 516 * @param callable $content_func Function that outputs the content.517 * @param mixed ...$args Optional additional parameters to pass to the callback function when it's called.516 * @param callable|string $content_func Function that outputs the content, or the string denoting the callback. 517 * @param mixed ...$args Optional additional parameters to pass to the callback function when it's called. 518 518 */ 519 519 function wp_iframe( $content_func, ...$args ) { 520 520 _wp_admin_html_begin(); -
src/wp-admin/includes/plugin.php
diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index 18a4852e47..7789eba589 100644
a b function uninstall_plugin( $plugin ) { 1307 1307 * @global array $_registered_pages 1308 1308 * @global array $_parent_pages 1309 1309 * 1310 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1311 * @param string $menu_title The text to be used for the menu.1312 * @param string $capability The capability required for this menu to be displayed to the user.1313 * @param string $menu_slug The slug name to refer to this menu by. Should be unique for this menu page and only1314 * include lowercase alphanumeric, dashes, and underscores characters to be compatible1315 * with sanitize_key().1316 * @param callable $function The function to be called to output the content for this page.1317 * @param string $icon_url The URL to the icon to be used for this menu.1318 * * Pass a base64-encoded SVG using a data URI, which will be colored to match1319 * the color scheme. This should begin with 'data:image/svg+xml;base64,'.1320 * * Pass the name of a Dashicons helper class to use a font icon,1321 * e.g. 'dashicons-chart-pie'.1322 * * Pass 'none' to leave div.wp-menu-image empty so an icon can be added via CSS.1323 * @param int $position The position in the menu order this item should appear.1310 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1311 * @param string $menu_title The text to be used for the menu. 1312 * @param string $capability The capability required for this menu to be displayed to the user. 1313 * @param string $menu_slug The slug name to refer to this menu by. Should be unique for this menu page and only 1314 * include lowercase alphanumeric, dashes, and underscores characters to be compatible 1315 * with sanitize_key(). 1316 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1317 * @param string $icon_url The URL to the icon to be used for this menu. 1318 * * Pass a base64-encoded SVG using a data URI, which will be colored to match 1319 * the color scheme. This should begin with 'data:image/svg+xml;base64,'. 1320 * * Pass the name of a Dashicons helper class to use a font icon, 1321 * e.g. 'dashicons-chart-pie'. 1322 * * Pass 'none' to leave div.wp-menu-image empty so an icon can be added via CSS. 1323 * @param int $position The position in the menu order this item should appear. 1324 1324 * @return string The resulting page's hook_suffix. 1325 1325 */ 1326 1326 function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = null ) { … … function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $func 1382 1382 * @global array $_registered_pages 1383 1383 * @global array $_parent_pages 1384 1384 * 1385 * @param string $parent_slug The slug name for the parent menu (or the file name of a standard1386 * WordPress admin page).1387 * @param string $page_title The text to be displayed in the title tags of the page when the menu1388 * is selected.1389 * @param string $menu_title The text to be used for the menu.1390 * @param string $capability The capability required for this menu to be displayed to the user.1391 * @param string $menu_slug The slug name to refer to this menu by. Should be unique for this menu1392 * and only include lowercase alphanumeric, dashes, and underscores characters1393 * to be compatible with sanitize_key().1394 * @param callable $function The function to be called to output the content for this page.1395 * @param int $position The position in the menu order this item should appear.1385 * @param string $parent_slug The slug name for the parent menu (or the file name of a standard 1386 * WordPress admin page). 1387 * @param string $page_title The text to be displayed in the title tags of the page when the menu 1388 * is selected. 1389 * @param string $menu_title The text to be used for the menu. 1390 * @param string $capability The capability required for this menu to be displayed to the user. 1391 * @param string $menu_slug The slug name to refer to this menu by. Should be unique for this menu 1392 * and only include lowercase alphanumeric, dashes, and underscores characters 1393 * to be compatible with sanitize_key(). 1394 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1395 * @param int $position The position in the menu order this item should appear. 1396 1396 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. 1397 1397 */ 1398 1398 function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { … … function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, 1499 1499 * @since 1.5.0 1500 1500 * @since 5.3.0 Added the `$position` parameter. 1501 1501 * 1502 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1503 * @param string $menu_title The text to be used for the menu.1504 * @param string $capability The capability required for this menu to be displayed to the user.1505 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).1506 * @param callable $function The function to be called to output the content for this page.1507 * @param int $position The position in the menu order this item should appear.1502 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1503 * @param string $menu_title The text to be used for the menu. 1504 * @param string $capability The capability required for this menu to be displayed to the user. 1505 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1506 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1507 * @param int $position The position in the menu order this item should appear. 1508 1508 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. 1509 1509 */ 1510 1510 function add_management_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { … … function add_management_page( $page_title, $menu_title, $capability, $menu_slug, 1523 1523 * @since 1.5.0 1524 1524 * @since 5.3.0 Added the `$position` parameter. 1525 1525 * 1526 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1527 * @param string $menu_title The text to be used for the menu.1528 * @param string $capability The capability required for this menu to be displayed to the user.1529 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).1530 * @param callable $function The function to be called to output the content for this page.1531 * @param int $position The position in the menu order this item should appear.1526 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1527 * @param string $menu_title The text to be used for the menu. 1528 * @param string $capability The capability required for this menu to be displayed to the user. 1529 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1530 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1531 * @param int $position The position in the menu order this item should appear. 1532 1532 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. 1533 1533 */ 1534 1534 function add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { … … function add_options_page( $page_title, $menu_title, $capability, $menu_slug, $f 1547 1547 * @since 2.0.0 1548 1548 * @since 5.3.0 Added the `$position` parameter. 1549 1549 * 1550 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1551 * @param string $menu_title The text to be used for the menu.1552 * @param string $capability The capability required for this menu to be displayed to the user.1553 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).1554 * @param callable $function The function to be called to output the content for this page.1555 * @param int $position The position in the menu order this item should appear.1550 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1551 * @param string $menu_title The text to be used for the menu. 1552 * @param string $capability The capability required for this menu to be displayed to the user. 1553 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1554 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1555 * @param int $position The position in the menu order this item should appear. 1556 1556 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. 1557 1557 */ 1558 1558 function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { … … function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $fun 1571 1571 * @since 3.0.0 1572 1572 * @since 5.3.0 Added the `$position` parameter. 1573 1573 * 1574 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1575 * @param string $menu_title The text to be used for the menu.1576 * @param string $capability The capability required for this menu to be displayed to the user.1577 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).1578 * @param callable $function The function to be called to output the content for this page.1579 * @param int $position The position in the menu order this item should appear.1574 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1575 * @param string $menu_title The text to be used for the menu. 1576 * @param string $capability The capability required for this menu to be displayed to the user. 1577 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1578 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1579 * @param int $position The position in the menu order this item should appear. 1580 1580 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. 1581 1581 */ 1582 1582 function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { … … function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $f 1595 1595 * @since 2.1.3 1596 1596 * @since 5.3.0 Added the `$position` parameter. 1597 1597 * 1598 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1599 * @param string $menu_title The text to be used for the menu.1600 * @param string $capability The capability required for this menu to be displayed to the user.1601 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).1602 * @param callable $function The function to be called to output the content for this page.1603 * @param int $position The position in the menu order this item should appear.1598 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1599 * @param string $menu_title The text to be used for the menu. 1600 * @param string $capability The capability required for this menu to be displayed to the user. 1601 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1602 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1603 * @param int $position The position in the menu order this item should appear. 1604 1604 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. 1605 1605 */ 1606 1606 function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { … … function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $fun 1624 1624 * @since 2.7.0 1625 1625 * @since 5.3.0 Added the `$position` parameter. 1626 1626 * 1627 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1628 * @param string $menu_title The text to be used for the menu.1629 * @param string $capability The capability required for this menu to be displayed to the user.1630 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).1631 * @param callable $function The function to be called to output the content for this page.1632 * @param int $position The position in the menu order this item should appear.1627 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1628 * @param string $menu_title The text to be used for the menu. 1629 * @param string $capability The capability required for this menu to be displayed to the user. 1630 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1631 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1632 * @param int $position The position in the menu order this item should appear. 1633 1633 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. 1634 1634 */ 1635 1635 function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { … … function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, 1648 1648 * @since 2.7.0 1649 1649 * @since 5.3.0 Added the `$position` parameter. 1650 1650 * 1651 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1652 * @param string $menu_title The text to be used for the menu.1653 * @param string $capability The capability required for this menu to be displayed to the user.1654 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).1655 * @param callable $function The function to be called to output the content for this page.1656 * @param int $position The position in the menu order this item should appear.1651 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1652 * @param string $menu_title The text to be used for the menu. 1653 * @param string $capability The capability required for this menu to be displayed to the user. 1654 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1655 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1656 * @param int $position The position in the menu order this item should appear. 1657 1657 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. 1658 1658 */ 1659 1659 function add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { … … function add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $fun 1672 1672 * @since 2.7.0 1673 1673 * @since 5.3.0 Added the `$position` parameter. 1674 1674 * 1675 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1676 * @param string $menu_title The text to be used for the menu.1677 * @param string $capability The capability required for this menu to be displayed to the user.1678 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).1679 * @param callable $function The function to be called to output the content for this page.1680 * @param int $position The position in the menu order this item should appear.1675 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1676 * @param string $menu_title The text to be used for the menu. 1677 * @param string $capability The capability required for this menu to be displayed to the user. 1678 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1679 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1680 * @param int $position The position in the menu order this item should appear. 1681 1681 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. 1682 1682 */ 1683 1683 function add_media_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { … … function add_media_page( $page_title, $menu_title, $capability, $menu_slug, $fun 1696 1696 * @since 2.7.0 1697 1697 * @since 5.3.0 Added the `$position` parameter. 1698 1698 * 1699 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1700 * @param string $menu_title The text to be used for the menu.1701 * @param string $capability The capability required for this menu to be displayed to the user.1702 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).1703 * @param callable $function The function to be called to output the content for this page.1704 * @param int $position The position in the menu order this item should appear.1699 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1700 * @param string $menu_title The text to be used for the menu. 1701 * @param string $capability The capability required for this menu to be displayed to the user. 1702 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1703 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1704 * @param int $position The position in the menu order this item should appear. 1705 1705 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. 1706 1706 */ 1707 1707 function add_links_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { … … function add_links_page( $page_title, $menu_title, $capability, $menu_slug, $fun 1720 1720 * @since 2.7.0 1721 1721 * @since 5.3.0 Added the `$position` parameter. 1722 1722 * 1723 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1724 * @param string $menu_title The text to be used for the menu.1725 * @param string $capability The capability required for this menu to be displayed to the user.1726 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).1727 * @param callable $function The function to be called to output the content for this page.1728 * @param int $position The position in the menu order this item should appear.1723 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1724 * @param string $menu_title The text to be used for the menu. 1725 * @param string $capability The capability required for this menu to be displayed to the user. 1726 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1727 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1728 * @param int $position The position in the menu order this item should appear. 1729 1729 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. 1730 1730 */ 1731 1731 function add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { … … function add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $fun 1744 1744 * @since 2.7.0 1745 1745 * @since 5.3.0 Added the `$position` parameter. 1746 1746 * 1747 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.1748 * @param string $menu_title The text to be used for the menu.1749 * @param string $capability The capability required for this menu to be displayed to the user.1750 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).1751 * @param callable $function The function to be called to output the content for this page.1752 * @param int $position The position in the menu order this item should appear.1747 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1748 * @param string $menu_title The text to be used for the menu. 1749 * @param string $capability The capability required for this menu to be displayed to the user. 1750 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1751 * @param callable|string $function The function to be called to output the content for this page, or string denoting the callback name. 1752 * @param int $position The position in the menu order this item should appear. 1753 1753 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. 1754 1754 */ 1755 1755 function add_comments_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { -
src/wp-admin/includes/template.php
diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php index 746be839af..0e311346e4 100644
a b function wp_import_upload_form( $action ) { 1005 1005 * 1006 1006 * @param string $id Meta box ID (used in the 'id' attribute for the meta box). 1007 1007 * @param string $title Title of the meta box. 1008 * @param callable 1009 * The function should echo its output .1008 * @param callable|string $callback Function that fills the box with the desired content. 1009 * The function should echo its output, or string denoting the callback name. 1010 1010 * @param string|array|WP_Screen $screen Optional. The screen or screens on which to show the box 1011 1011 * (such as a post type, 'link', or 'comment'). Accepts a single 1012 1012 * screen ID, WP_Screen object, or array of screen IDs. Default … … function do_block_editor_incompatible_meta_box( $object, $box ) { 1186 1186 * 1187 1187 * @access private 1188 1188 * 1189 * @param callable $callback The callback function to check.1189 * @param callable|string $callback The callback function to check or the string denoting the callback. 1190 1190 * @return array|null The plugin that the callback belongs to, or null if it doesn't belong to a plugin. 1191 1191 */ 1192 1192 function _get_plugin_from_callback( $callback ) { … … function do_accordion_sections( $screen, $context, $object ) { 1544 1544 * 1545 1545 * @global array $wp_settings_sections Storage array of all settings sections added to admin pages. 1546 1546 * 1547 * @param string $id Slug-name to identify the section. Used in the 'id' attribute of tags.1548 * @param string $title Formatted title of the section. Shown as the heading for the section.1549 * @param callable $callback Function that echos out any content at the top of the section (between heading and fields).1550 * @param string $page The slug-name of the settings page on which to show the section. Built-in pages include1551 * 'general', 'reading', 'writing', 'discussion', 'media', etc. Create your own using1552 * add_options_page();1547 * @param string $id Slug-name to identify the section. Used in the 'id' attribute of tags. 1548 * @param string $title Formatted title of the section. Shown as the heading for the section. 1549 * @param callable|string $callback Function that echos out any content at the top of the section (between heading and fields), or string denoting the callback name. 1550 * @param string $page The slug-name of the settings page on which to show the section. Built-in pages include 1551 * 'general', 'reading', 'writing', 'discussion', 'media', etc. Create your own using 1552 * add_options_page(); 1553 1553 */ 1554 1554 function add_settings_section( $id, $title, $callback, $page ) { 1555 1555 global $wp_settings_sections; … … function add_settings_section( $id, $title, $callback, $page ) { 1603 1603 * 1604 1604 * @global array $wp_settings_fields Storage array of settings fields and info about their pages/sections. 1605 1605 * 1606 * @param string $id Slug-name to identify the field. Used in the 'id' attribute of tags.1607 * @param string $title Formatted title of the field. Shown as the label for the field1608 * during output.1609 * @param callable $callback Function that fills the field with the desired form inputs. The1610 * function should echo its output.1611 * @param string $page The slug-name of the settings page on which to show the section1612 * (general, reading, writing, ...).1613 * @param string $section Optional. The slug-name of the section of the settings page1614 * in which to show the box. Default 'default'.1615 * @param array $args {1606 * @param string $id Slug-name to identify the field. Used in the 'id' attribute of tags. 1607 * @param string $title Formatted title of the field. Shown as the label for the field 1608 * during output. 1609 * @param callable|string $callback Function that fills the field with the desired form inputs. The 1610 * function should echo its output, or string denoting the callback name. 1611 * @param string $page The slug-name of the settings page on which to show the section 1612 * (general, reading, writing, ...). 1613 * @param string $section Optional. The slug-name of the section of the settings page 1614 * in which to show the box. Default 'default'. 1615 * @param array $args { 1616 1616 * Optional. Extra arguments used when outputting the field. 1617 1617 * 1618 1618 * @type string $label_for When supplied, the setting title will be wrapped -
src/wp-includes/class-wp-hook.php
diff --git a/src/wp-includes/class-wp-hook.php b/src/wp-includes/class-wp-hook.php index eb43c10c05..64776773ef 100644
a b final class WP_Hook implements Iterator, ArrayAccess { 62 62 * 63 63 * @since 4.7.0 64 64 * 65 * @param string $tag The name of the filter to hook the $function_to_add callback to.66 * @param callable $function_to_add The callback to be run when the filter is applied.67 * @param int $priority The order in which the functions associated with a particular action68 * are executed. Lower numbers correspond with earlier execution,69 * and functions with the same priority are executed in the order70 * in which they were added to the action.71 * @param int $accepted_args The number of arguments the function accepts.65 * @param string $tag The name of the filter to hook the $function_to_add callback to. 66 * @param callable|string $function_to_add The callback to be run when the filter is applied, or string denoting the callback name. 67 * @param int $priority The order in which the functions associated with a particular action 68 * are executed. Lower numbers correspond with earlier execution, 69 * and functions with the same priority are executed in the order 70 * in which they were added to the action. 71 * @param int $accepted_args The number of arguments the function accepts. 72 72 */ 73 73 public function add_filter( $tag, $function_to_add, $priority, $accepted_args ) { 74 74 $idx = _wp_filter_build_unique_id( $tag, $function_to_add, $priority ); … … final class WP_Hook implements Iterator, ArrayAccess { 163 163 * 164 164 * @since 4.7.0 165 165 * 166 * @param string $tag The filter hook to which the function to be removed is hooked.167 * @param callable $function_to_remove The callback to be removed from running when the filter is applied.168 * @param int $priority The exact priority used when adding the original filter callback.166 * @param string $tag The filter hook to which the function to be removed is hooked. 167 * @param callable|string $function_to_remove The callback to be removed from running when the filter is applied, or string denoting the callback name. 168 * @param int $priority The exact priority used when adding the original filter callback. 169 169 * @return bool Whether the callback existed before it was removed. 170 170 */ 171 171 public function remove_filter( $tag, $function_to_remove, $priority ) { -
src/wp-includes/plugin.php
diff --git a/src/wp-includes/plugin.php b/src/wp-includes/plugin.php index 7bcfc7aa94..cae78058f2 100644
a b if ( ! isset( $wp_current_filter ) ) { 101 101 * 102 102 * @global WP_Hook[] $wp_filter A multidimensional array of all hooks and the callbacks hooked to them. 103 103 * 104 * @param string $tag The name of the filter to hook the $function_to_add callback to.105 * @param callable $function_to_add The callback to be run when the filter is applied.106 * @param int $priority Optional. Used to specify the order in which the functions107 * associated with a particular action are executed.108 * Lower numbers correspond with earlier execution,109 * and functions with the same priority are executed110 * in the order in which they were added to the action. Default 10.111 * @param int $accepted_args Optional. The number of arguments the function accepts. Default 1.104 * @param string $tag The name of the filter to hook the $function_to_add callback to. 105 * @param callable|string $function_to_add The callback to be run when the filter is applied, or string denoting the callback name. 106 * @param int $priority Optional. Used to specify the order in which the functions 107 * associated with a particular action are executed. 108 * Lower numbers correspond with earlier execution, 109 * and functions with the same priority are executed 110 * in the order in which they were added to the action. Default 10. 111 * @param int $accepted_args Optional. The number of arguments the function accepts. Default 1. 112 112 * @return true 113 113 */ 114 114 function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) { … … function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1 130 130 * 131 131 * @global WP_Hook[] $wp_filter Stores all of the filters and actions. 132 132 * 133 * @param string $tag The name of the filter hook.134 * @param callable|false $function_to_check Optional. The callback to check for. Default false.133 * @param string $tag The name of the filter hook. 134 * @param callable|false|string $function_to_check Optional. The callback to check for, or string denoting the callback name. Default false. 135 135 * @return bool|int If `$function_to_check` is omitted, returns boolean for whether the hook has 136 136 * anything registered. When checking a specific function, the priority of that 137 137 * hook is returned, or false if the function is not attached. … … function apply_filters_ref_array( $tag, $args ) { 274 274 * 275 275 * @global WP_Hook[] $wp_filter Stores all of the filters and actions. 276 276 * 277 * @param string $tag The filter hook to which the function to be removed is hooked.278 * @param callable $function_to_remove The name of the function which should be removed.279 * @param int $priority Optional. The priority of the function. Default 10.277 * @param string $tag The filter hook to which the function to be removed is hooked. 278 * @param callable|string $function_to_remove The name of the function which should be removed, or string denoting the callback name. 279 * @param int $priority Optional. The priority of the function. Default 10. 280 280 * @return bool Whether the function existed before it was removed. 281 281 */ 282 282 function remove_filter( $tag, $function_to_remove, $priority = 10 ) { … … function doing_action( $action = null ) { 396 396 * 397 397 * @since 1.2.0 398 398 * 399 * @param string $tag The name of the action to which the $function_to_add is hooked.400 * @param callable $function_to_add The name of the function you wish to be called.401 * @param int $priority Optional. Used to specify the order in which the functions402 * associated with a particular action are executed. Default 10.403 * Lower numbers correspond with earlier execution,404 * and functions with the same priority are executed405 * in the order in which they were added to the action.406 * @param int $accepted_args Optional. The number of arguments the function accepts. Default 1.399 * @param string $tag The name of the action to which the $function_to_add is hooked. 400 * @param callable|string $function_to_add The name of the function you wish to be called, or string denoting the callback name. 401 * @param int $priority Optional. Used to specify the order in which the functions 402 * associated with a particular action are executed. Default 10. 403 * Lower numbers correspond with earlier execution, 404 * and functions with the same priority are executed 405 * in the order in which they were added to the action. 406 * @param int $accepted_args Optional. The number of arguments the function accepts. Default 1. 407 407 * @return true Will always return true. 408 408 */ 409 409 function add_action( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) { … … function do_action_ref_array( $tag, $args ) { 563 563 * 564 564 * @see has_filter() has_action() is an alias of has_filter(). 565 565 * 566 * @param string $tag The name of the action hook.567 * @param callable| false $function_to_check Optional. The callback to check for. Default false.566 * @param string $tag The name of the action hook. 567 * @param callable|string|false $function_to_check Optional. The callback to check for, or string denoting the callback name. Default false. 568 568 * @return bool|int If `$function_to_check` is omitted, returns boolean for whether the hook has 569 569 * anything registered. When checking a specific function, the priority of that 570 570 * hook is returned, or false if the function is not attached. … … function has_action( $tag, $function_to_check = false ) { 582 582 * 583 583 * @since 1.2.0 584 584 * 585 * @param string $tag The action hook to which the function to be removed is hooked.586 * @param callable $function_to_remove The name of the function which should be removed.587 * @param int $priority Optional. The priority of the function. Default 10.585 * @param string $tag The action hook to which the function to be removed is hooked. 586 * @param callable|string $function_to_remove The name of the function which should be removed, or string denoting the callback name. 587 * @param int $priority Optional. The priority of the function. Default 10. 588 588 * @return bool Whether the function is removed. 589 589 */ 590 590 function remove_action( $tag, $function_to_remove, $priority = 10 ) { … … function plugin_dir_url( $file ) { 782 782 * 783 783 * @since 2.0.0 784 784 * 785 * @param string $file The filename of the plugin including the path.786 * @param callable $function The function hooked to the 'activate_PLUGIN' action.785 * @param string $file The filename of the plugin including the path. 786 * @param callable|string $function The function hooked to the 'activate_PLUGIN' action, or string denoting the callback name. 787 787 */ 788 788 function register_activation_hook( $file, $function ) { 789 789 $file = plugin_basename( $file ); … … function register_activation_hook( $file, $function ) { 805 805 * 806 806 * @since 2.0.0 807 807 * 808 * @param string $file The filename of the plugin including the path.809 * @param callable $function The function hooked to the 'deactivate_PLUGIN' action.808 * @param string $file The filename of the plugin including the path. 809 * @param callable|string $function The function hooked to the 'deactivate_PLUGIN' action, or string denoting the callback name. 810 810 */ 811 811 function register_deactivation_hook( $file, $function ) { 812 812 $file = plugin_basename( $file ); … … function _wp_call_all_hook( $args ) { 907 907 * and the function always returns a string. 908 908 * @access private 909 909 * 910 * @param string $tag Unused. The name of the filter to build ID for.911 * @param callable $function The function to generate ID for.912 * @param int $priority Unused. The order in which the functions913 * associated with a particular action are executed.910 * @param string $tag Unused. The name of the filter to build ID for. 911 * @param callable|string $function The function to generate ID for, or string denoting the callback name. 912 * @param int $priority Unused. The order in which the functions 913 * associated with a particular action are executed. 914 914 * @return string Unique function ID for usage as array key. 915 915 */ 916 916 function _wp_filter_build_unique_id( $tag, $function, $priority ) { -
src/wp-includes/rewrite.php
diff --git a/src/wp-includes/rewrite.php b/src/wp-includes/rewrite.php index 4a204c2601..9eba9da491 100644
a b function remove_permastruct( $name ) { 243 243 * 244 244 * @global WP_Rewrite $wp_rewrite WordPress rewrite component. 245 245 * 246 * @param string $feedname Feed name.247 * @param callable $function Callback to run on feed display.246 * @param string $feedname Feed name. 247 * @param callable|string $function Callback to run on feed display, or string denoting the callback name. 248 248 * @return string Feed action name. 249 249 */ 250 250 function add_feed( $feedname, $function ) { -
src/wp-includes/shortcodes.php
diff --git a/src/wp-includes/shortcodes.php b/src/wp-includes/shortcodes.php index 62d1d1e644..06d71a0cd8 100644
a b $shortcode_tags = array(); 53 53 * 54 54 * @global array $shortcode_tags 55 55 * 56 * @param string $tag Shortcode tag to be searched in post content.57 * @param callable $callback The callback function to run when the shortcode is found.58 * Every shortcode callback is passed three parameters by default,59 * including an array of attributes (`$atts`), the shortcode content60 * or null if not set (`$content`), and finally the shortcode tag61 * itself (`$shortcode_tag`), in that order.56 * @param string $tag Shortcode tag to be searched in post content. 57 * @param callable|string $callback The callback function to run when the shortcode is found, or string denoting the callback name. 58 * Every shortcode callback is passed three parameters by default, 59 * including an array of attributes (`$atts`), the shortcode content 60 * or null if not set (`$content`), and finally the shortcode tag 61 * itself (`$shortcode_tag`), in that order. 62 62 */ 63 63 function add_shortcode( $tag, $callback ) { 64 64 global $shortcode_tags;