mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-09-22 08:50:24 +00:00
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:
@@ -613,7 +613,7 @@ class SimplePie_Parse_Date
|
||||
*
|
||||
* @final
|
||||
* @access public
|
||||
* @param callback $callback
|
||||
* @param callable $callback
|
||||
*/
|
||||
public function add_callback($callback)
|
||||
{
|
||||
|
||||
@@ -2080,7 +2080,7 @@ function attribute_escape( $text ) {
|
||||
* @see wp_register_sidebar_widget()
|
||||
*
|
||||
* @param string|int $name Widget ID.
|
||||
* @param callback $output_callback Run when widget is called.
|
||||
* @param callable $output_callback Run when widget is called.
|
||||
* @param string $classname Classname widget option.
|
||||
* @param mixed $params ,... Widget parameters.
|
||||
*/
|
||||
@@ -2135,7 +2135,7 @@ function unregister_sidebar_widget($id) {
|
||||
* @see wp_register_widget_control()
|
||||
*
|
||||
* @param int|string $name Sidebar ID.
|
||||
* @param callback $control_callback Widget control callback to display and process form.
|
||||
* @param callable $control_callback Widget control callback to display and process form.
|
||||
* @param int $width Widget width.
|
||||
* @param int $height Widget height.
|
||||
*/
|
||||
@@ -2928,9 +2928,9 @@ function clean_pre($matches) {
|
||||
* @deprecated 3.4.0 Use add_theme_support()
|
||||
* @see add_theme_support()
|
||||
*
|
||||
* @param callback $wp_head_callback Call on 'wp_head' action.
|
||||
* @param callback $admin_head_callback Call on custom header administration screen.
|
||||
* @param callback $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
|
||||
* @param callable $wp_head_callback Call on 'wp_head' action.
|
||||
* @param callable $admin_head_callback Call on custom header administration screen.
|
||||
* @param callable $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
|
||||
*/
|
||||
function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admin_preview_callback = '' ) {
|
||||
_deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-header\', $args )' );
|
||||
@@ -2964,9 +2964,9 @@ function remove_custom_image_header() {
|
||||
* @deprecated 3.4.0 Use add_theme_support()
|
||||
* @see add_theme_support()
|
||||
*
|
||||
* @param callback $wp_head_callback Call on 'wp_head' action.
|
||||
* @param callback $admin_head_callback Call on custom background administration screen.
|
||||
* @param callback $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional.
|
||||
* @param callable $wp_head_callback Call on 'wp_head' action.
|
||||
* @param callable $admin_head_callback Call on custom background administration screen.
|
||||
* @param callable $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional.
|
||||
*/
|
||||
function add_custom_background( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) {
|
||||
_deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-background\', $args )' );
|
||||
|
||||
@@ -1873,7 +1873,7 @@ function wp_upload_dir( $time = null ) {
|
||||
*
|
||||
* @param string $dir Directory.
|
||||
* @param string $filename File name.
|
||||
* @param callback $unique_filename_callback Callback. Default null.
|
||||
* @param callable $unique_filename_callback Callback. Default null.
|
||||
* @return string New filename, if given wasn't unique.
|
||||
*/
|
||||
function wp_unique_filename( $dir, $filename, $unique_filename_callback = null ) {
|
||||
@@ -2395,7 +2395,7 @@ function wp_die( $message = '', $title = '', $args = array() ) {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param callback $function Callback function name.
|
||||
* @param callable $function Callback function name.
|
||||
*/
|
||||
$function = apply_filters( 'wp_die_ajax_handler', '_ajax_wp_die_handler' );
|
||||
} elseif ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) {
|
||||
@@ -2404,7 +2404,7 @@ function wp_die( $message = '', $title = '', $args = array() ) {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param callback $function Callback function name.
|
||||
* @param callable $function Callback function name.
|
||||
*/
|
||||
$function = apply_filters( 'wp_die_xmlrpc_handler', '_xmlrpc_wp_die_handler' );
|
||||
} else {
|
||||
@@ -2413,7 +2413,7 @@ function wp_die( $message = '', $title = '', $args = array() ) {
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param callback $function Callback function name.
|
||||
* @param callable $function Callback function name.
|
||||
*/
|
||||
$function = apply_filters( 'wp_die_handler', '_default_wp_die_handler' );
|
||||
}
|
||||
@@ -4475,7 +4475,7 @@ function _wp_mysql_week( $column ) {
|
||||
* @since 3.1.0
|
||||
* @access private
|
||||
*
|
||||
* @param callback $callback Function that accepts ( ID, $callback_args ) and outputs parent_ID.
|
||||
* @param callable $callback Function that accepts ( ID, $callback_args ) and outputs parent_ID.
|
||||
* @param int $start The ID to start the loop check at.
|
||||
* @param int $start_parent The parent_ID of $start to use instead of calling $callback( $start ).
|
||||
* Use null to always use $callback
|
||||
@@ -4500,7 +4500,7 @@ function wp_find_hierarchy_loop( $callback, $start, $start_parent, $callback_arg
|
||||
* @since 3.1.0
|
||||
* @access private
|
||||
*
|
||||
* @param callback $callback Function that accepts ( ID, callback_arg, ... ) and outputs parent_ID.
|
||||
* @param callable $callback Function that accepts ( ID, callback_arg, ... ) and outputs parent_ID.
|
||||
* @param int $start The ID to start the loop check at.
|
||||
* @param array $override Optional. An array of ( ID => parent_ID, ... ) to use instead of $callback.
|
||||
* Default empty array.
|
||||
|
||||
@@ -2187,7 +2187,7 @@ function wp_imagecreatetruecolor($width, $height) {
|
||||
*
|
||||
* @param string $id An internal ID/name for the handler. Needs to be unique.
|
||||
* @param string $regex The regex that will be used to see if this handler should be used for a URL.
|
||||
* @param callback $callback The callback function that will be called if the regex is matched.
|
||||
* @param callable $callback The callback function that will be called if the regex is matched.
|
||||
* @param int $priority Optional. Used to specify the order in which the registered handlers will
|
||||
* be tested. Default 10.
|
||||
*/
|
||||
@@ -2373,7 +2373,7 @@ function wp_maybe_load_embeds() {
|
||||
*
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @param callback $handler Audio embed handler callback function.
|
||||
* @param callable $handler Audio embed handler callback function.
|
||||
*/
|
||||
wp_embed_register_handler( 'audio', '#^https?://.+?\.(' . join( '|', wp_get_audio_extensions() ) . ')$#i', apply_filters( 'wp_audio_embed_handler', 'wp_embed_handler_audio' ), 9999 );
|
||||
|
||||
@@ -2382,7 +2382,7 @@ function wp_maybe_load_embeds() {
|
||||
*
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @param callback $handler Video embed handler callback function.
|
||||
* @param callable $handler Video embed handler callback function.
|
||||
*/
|
||||
wp_embed_register_handler( 'video', '#^https?://.+?\.(' . join( '|', wp_get_video_extensions() ) . ')$#i', apply_filters( 'wp_video_embed_handler', 'wp_embed_handler_video' ), 9999 );
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ class Walker_Nav_Menu extends Walker {
|
||||
* @type string $container Whether to wrap the ul, and what to wrap it with. Default 'div'.
|
||||
* @type string $container_class Class that is applied to the container. Default 'menu-{menu slug}-container'.
|
||||
* @type string $container_id The ID that is applied to the container. Default empty.
|
||||
* @type callback|bool $fallback_cb If the menu doesn't exists, a callback function will fire.
|
||||
* @type callable|bool $fallback_cb If the menu doesn't exists, a callback function will fire.
|
||||
* Default is 'wp_page_menu'. Set to false for no fallback.
|
||||
* @type string $before Text before the link text. Default empty.
|
||||
* @type string $after Text after the link text. Default empty.
|
||||
|
||||
+10
-10
@@ -91,7 +91,7 @@ if ( ! isset( $wp_current_filter ) )
|
||||
* it doesn't need to run through that process.
|
||||
*
|
||||
* @param string $tag The name of the filter to hook the $function_to_add callback to.
|
||||
* @param callback $function_to_add The callback to be run when the filter is applied.
|
||||
* @param callable $function_to_add The callback to be run when the filter is applied.
|
||||
* @param int $priority Optional. Used to specify the order in which the functions
|
||||
* associated with a particular action are executed. Default 10.
|
||||
* Lower numbers correspond with earlier execution,
|
||||
@@ -117,7 +117,7 @@ function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1
|
||||
* @global array $wp_filter Stores all of the filters.
|
||||
*
|
||||
* @param string $tag The name of the filter hook.
|
||||
* @param callback|bool $function_to_check Optional. The callback to check for. Default false.
|
||||
* @param callable|bool $function_to_check Optional. The callback to check for. Default false.
|
||||
* @return false|int If $function_to_check is omitted, returns boolean for whether the hook has
|
||||
* anything registered. When checking a specific function, the priority of that
|
||||
* hook is returned, or false if the function is not attached. When using the
|
||||
@@ -314,7 +314,7 @@ function apply_filters_ref_array($tag, $args) {
|
||||
* @global array $merged_filters Merges the filter hooks using this function.
|
||||
*
|
||||
* @param string $tag The filter hook to which the function to be removed is hooked.
|
||||
* @param callback $function_to_remove The name of the function which should be removed.
|
||||
* @param callable $function_to_remove The name of the function which should be removed.
|
||||
* @param int $priority Optional. The priority of the function. Default 10.
|
||||
* @return bool Whether the function existed before it was removed.
|
||||
*/
|
||||
@@ -445,7 +445,7 @@ function doing_action( $action = null ) {
|
||||
* @since 1.2.0
|
||||
*
|
||||
* @param string $tag The name of the action to which the $function_to_add is hooked.
|
||||
* @param callback $function_to_add The name of the function you wish to be called.
|
||||
* @param callable $function_to_add The name of the function you wish to be called.
|
||||
* @param int $priority Optional. Used to specify the order in which the functions
|
||||
* associated with a particular action are executed. Default 10.
|
||||
* Lower numbers correspond with earlier execution,
|
||||
@@ -613,7 +613,7 @@ function do_action_ref_array($tag, $args) {
|
||||
* @see has_filter() has_action() is an alias of has_filter().
|
||||
*
|
||||
* @param string $tag The name of the action hook.
|
||||
* @param callback|bool $function_to_check Optional. The callback to check for. Default false.
|
||||
* @param callable|bool $function_to_check Optional. The callback to check for. Default false.
|
||||
* @return bool|int If $function_to_check is omitted, returns boolean for whether the hook has
|
||||
* anything registered. When checking a specific function, the priority of that
|
||||
* hook is returned, or false if the function is not attached. When using the
|
||||
@@ -635,7 +635,7 @@ function has_action($tag, $function_to_check = false) {
|
||||
* @since 1.2.0
|
||||
*
|
||||
* @param string $tag The action hook to which the function to be removed is hooked.
|
||||
* @param callback $function_to_remove The name of the function which should be removed.
|
||||
* @param callable $function_to_remove The name of the function which should be removed.
|
||||
* @param int $priority Optional. The priority of the function. Default 10.
|
||||
* @return bool Whether the function is removed.
|
||||
*/
|
||||
@@ -771,7 +771,7 @@ function plugin_dir_url( $file ) {
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param string $file The filename of the plugin including the path.
|
||||
* @param callback $function The function hooked to the 'activate_PLUGIN' action.
|
||||
* @param callable $function The function hooked to the 'activate_PLUGIN' action.
|
||||
*/
|
||||
function register_activation_hook($file, $function) {
|
||||
$file = plugin_basename($file);
|
||||
@@ -794,7 +794,7 @@ function register_activation_hook($file, $function) {
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param string $file The filename of the plugin including the path.
|
||||
* @param callback $function The function hooked to the 'deactivate_PLUGIN' action.
|
||||
* @param callable $function The function hooked to the 'deactivate_PLUGIN' action.
|
||||
*/
|
||||
function register_deactivation_hook($file, $function) {
|
||||
$file = plugin_basename($file);
|
||||
@@ -824,7 +824,7 @@ function register_deactivation_hook($file, $function) {
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param string $file Plugin file.
|
||||
* @param callback $callback The callback to run when the hook is called. Must be
|
||||
* @param callable $callback The callback to run when the hook is called. Must be
|
||||
* a static method or function.
|
||||
*/
|
||||
function register_uninstall_hook( $file, $callback ) {
|
||||
@@ -900,7 +900,7 @@ function _wp_call_all_hook($args) {
|
||||
* @staticvar int $filter_id_count
|
||||
*
|
||||
* @param string $tag Used in counting how many hooks were applied
|
||||
* @param callback $function Used for creating unique id
|
||||
* @param callable $function Used for creating unique id
|
||||
* @param int|bool $priority Used in counting how many hooks were applied. If === false
|
||||
* and $function is an object reference, we return the unique
|
||||
* id only if it already has one, false otherwise.
|
||||
|
||||
@@ -940,7 +940,7 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
|
||||
* Default false.
|
||||
* @type array $supports An alias for calling {@see add_post_type_support()} directly.
|
||||
* Defaults to array containing 'title' & 'editor'.
|
||||
* @type callback $register_meta_box_cb Provide a callback function that sets up the meta boxes for the
|
||||
* @type callable $register_meta_box_cb Provide a callback function that sets up the meta boxes for the
|
||||
* edit form. Do remove_meta_box() and add_meta_box() calls in the
|
||||
* callback. Default null.
|
||||
* @type array $taxonomies An array of taxonomy identifiers that will be registered for the
|
||||
|
||||
@@ -86,7 +86,7 @@ function add_permastruct( $name, $struct, $args = array() ) {
|
||||
* @global WP_Rewrite $wp_rewrite
|
||||
*
|
||||
* @param string $feedname
|
||||
* @param callback $function Callback to run on feed display.
|
||||
* @param callable $function Callback to run on feed display.
|
||||
* @return string Feed action name.
|
||||
*/
|
||||
function add_feed($feedname, $function) {
|
||||
|
||||
@@ -222,7 +222,7 @@ function unregister_sidebar( $name ) {
|
||||
*
|
||||
* @param int|string $id Widget ID.
|
||||
* @param string $name Widget display title.
|
||||
* @param callback $output_callback Run when widget is called.
|
||||
* @param callable $output_callback Run when widget is called.
|
||||
* @param array $options {
|
||||
* Optional. An array of supplementary widget options for the instance.
|
||||
*
|
||||
@@ -364,7 +364,7 @@ function wp_unregister_sidebar_widget($id) {
|
||||
*
|
||||
* @param int|string $id Sidebar ID.
|
||||
* @param string $name Sidebar display name.
|
||||
* @param callback $control_callback Run when sidebar is displayed.
|
||||
* @param callable $control_callback Run when sidebar is displayed.
|
||||
* @param array|string $options Optional. Widget options. See description above. Default empty array.
|
||||
*/
|
||||
function wp_register_widget_control( $id, $name, $control_callback, $options = array() ) {
|
||||
@@ -613,7 +613,7 @@ function dynamic_sidebar( $index = 1 ) {
|
||||
*
|
||||
* @type string $name Name of the widget.
|
||||
* @type string $id Widget ID.
|
||||
* @type array|callback $callback When the hook is fired on the front-end, $callback is an array
|
||||
* @type array|callable $callback When the hook is fired on the front-end, $callback is an array
|
||||
* containing the widget object. Fired on the back-end, $callback
|
||||
* is 'wp_widget_control', see $_callback.
|
||||
* @type array $params An associative array of multi-widget arguments.
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
* @param array $nav_menu_args {
|
||||
* An array of arguments passed to wp_nav_menu() to retrieve a custom menu.
|
||||
*
|
||||
* @type callback|bool $fallback_cb Callback to fire if the menu doesn't exist. Default empty.
|
||||
* @type callable|bool $fallback_cb Callback to fire if the menu doesn't exist. Default empty.
|
||||
* @type mixed $menu Menu ID, slug, or name.
|
||||
* }
|
||||
* @param stdClass $nav_menu Nav menu object for the current menu.
|
||||
|
||||
Reference in New Issue
Block a user