callback is not a valid type in PHP, PSR-5, or phpDocumentor. callable should be used instead.

Fixes #34032


git-svn-id: https://develop.svn.wordpress.org/trunk@34566 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2015-09-25 23:57:46 +00:00
parent ea23f4603c
commit 1bb2876fe6
19 changed files with 68 additions and 68 deletions

View File

@@ -18,7 +18,7 @@ class Custom_Background {
/**
* Callback for administration header.
*
* @var callback
* @var callable
* @since 3.0.0
*/
public $admin_header_callback;
@@ -26,7 +26,7 @@ class Custom_Background {
/**
* Callback for header div.
*
* @var callback
* @var callable
* @since 3.0.0
*/
public $admin_image_div_callback;
@@ -44,8 +44,8 @@ class Custom_Background {
* Constructor - Register administration header callback.
*
* @since 3.0.0
* @param callback $admin_header_callback
* @param callback $admin_image_div_callback Optional custom image div output callback.
* @param callable $admin_header_callback
* @param callable $admin_image_div_callback Optional custom image div output callback.
*/
public function __construct($admin_header_callback = '', $admin_image_div_callback = '') {
$this->admin_header_callback = $admin_header_callback;

View File

@@ -18,7 +18,7 @@ class Custom_Image_Header {
/**
* Callback for administration header.
*
* @var callback
* @var callable
* @since 2.1.0
*/
public $admin_header_callback;
@@ -26,7 +26,7 @@ class Custom_Image_Header {
/**
* Callback for header div.
*
* @var callback
* @var callable
* @since 3.0.0
*/
public $admin_image_div_callback;
@@ -53,8 +53,8 @@ class Custom_Image_Header {
* Constructor - Register administration header callback.
*
* @since 2.1.0
* @param callback $admin_header_callback
* @param callback $admin_image_div_callback Optional custom image div output callback.
* @param callable $admin_header_callback
* @param callable $admin_image_div_callback Optional custom image div output callback.
*/
public function __construct($admin_header_callback, $admin_image_div_callback = '') {
$this->admin_header_callback = $admin_header_callback;

View File

@@ -2147,7 +2147,7 @@ class Core_Upgrader extends WP_Upgrader {
* @access public
*
* @global WP_Filesystem_Base $wp_filesystem Subclass
* @global callback $_wp_filesystem_direct_method
* @global callable $_wp_filesystem_direct_method
*
* @param object $current Response object for whether WordPress is current.
* @param array $args {

View File

@@ -135,8 +135,8 @@ function wp_dashboard_setup() {
*
* @param string $widget_id
* @param string $widget_name
* @param callback $callback
* @param callback $control_callback
* @param callable $callback
* @param callable $control_callback
* @param array $callback_args
*/
function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null ) {
@@ -886,7 +886,7 @@ function wp_dashboard_rss_output( $widget_id ) {
* @since 2.5.0
*
* @param string $widget_id
* @param callback $callback
* @param callable $callback
* @param array $check_urls RSS feeds
* @return bool False on failure. True on success.
*/

View File

@@ -909,7 +909,7 @@ function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_own
*
* @since 2.5.0
*
* @global callback $_wp_filesystem_direct_method
* @global callable $_wp_filesystem_direct_method
*
* @param array $args Optional. Connection details. Default empty array.
* @param string $context Optional. Full path to the directory that is tested

View File

@@ -48,7 +48,7 @@ function _usort_by_first_member( $a, $b ) {
* @param string $id Importer tag. Used to uniquely identify importer.
* @param string $name Importer name and title.
* @param string $description Importer description.
* @param callback $callback Callback to run.
* @param callable $callback Callback to run.
* @return WP_Error Returns WP_Error when $callback is WP_Error.
*/
function register_importer( $id, $name, $description, $callback ) {

View File

@@ -345,7 +345,7 @@ function attachment_submit_meta_box( $post ) {
*
* @type string $id Meta box ID.
* @type string $title Meta box title.
* @type callback $callback Meta box display callback.
* @type callable $callback Meta box display callback.
* @type array $args Extra meta box arguments.
* }
*/
@@ -386,7 +386,7 @@ function post_format_meta_box( $post, $box ) {
*
* @type string $id Meta box ID.
* @type string $title Meta box title.
* @type callback $callback Meta box display callback.
* @type callable $callback Meta box display callback.
* @type array $args {
* Extra meta box arguments.
*
@@ -442,7 +442,7 @@ function post_tags_meta_box( $post, $box ) {
*
* @type string $id Meta box ID.
* @type string $title Meta box title.
* @type callback $callback Meta box display callback.
* @type callable $callback Meta box display callback.
* @type array $args {
* Extra meta box arguments.
*

View File

@@ -1014,7 +1014,7 @@ function uninstall_plugin($plugin) {
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
* @param string $icon_url The url to the icon to be used for this menu.
* * Pass a base64-encoded SVG using a data URI, which will be colored to match the color scheme.
* This should begin with 'data:image/svg+xml;base64,'.
@@ -1074,7 +1074,7 @@ function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $func
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
* @param string $icon_url The url to the icon to be used for this menu
*
* @return string The resulting page's hook_suffix
@@ -1102,7 +1102,7 @@ function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $fu
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
* @param string $icon_url The url to the icon to be used for this menu
*
* @return string The resulting page's hook_suffix
@@ -1136,7 +1136,7 @@ function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $f
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
*
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
*/
@@ -1202,7 +1202,7 @@ function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability,
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
*
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
*/
@@ -1223,7 +1223,7 @@ function add_management_page( $page_title, $menu_title, $capability, $menu_slug,
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
*
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
*/
@@ -1244,7 +1244,7 @@ function add_options_page( $page_title, $menu_title, $capability, $menu_slug, $f
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
*
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
*/
@@ -1265,7 +1265,7 @@ function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $fun
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
*
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
*/
@@ -1286,7 +1286,7 @@ function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $f
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
*
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
*/
@@ -1310,7 +1310,7 @@ function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $fun
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
*
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
*/
@@ -1331,7 +1331,7 @@ function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug,
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
*
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
*/
@@ -1352,7 +1352,7 @@ function add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $fun
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
*
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
*/
@@ -1373,7 +1373,7 @@ function add_media_page( $page_title, $menu_title, $capability, $menu_slug, $fun
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
*
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
*/
@@ -1394,7 +1394,7 @@ function add_links_page( $page_title, $menu_title, $capability, $menu_slug, $fun
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
*
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
*/
@@ -1415,7 +1415,7 @@ function add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $fun
* @param string $menu_title The text to be used for the menu
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
* @param callback $function The function to be called to output the content for this page.
* @param callable $function The function to be called to output the content for this page.
*
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
*/

View File

@@ -850,7 +850,7 @@ function wp_import_upload_form( $action ) {
*
* @param string $id String for use in the 'id' attribute of tags.
* @param string $title Title of the meta box.
* @param callback $callback Function that fills the box with the desired content.
* @param callable $callback Function that fills the box with the desired content.
* The function should echo its output.
* @param string|WP_Screen $screen Optional. The screen on which to show the box (like a post
* type, 'link', or 'comment'). Default is the current screen.