mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Docs: Correct and improve inline docs for parameters that accept a callback function.
See #49572 Built from https://develop.svn.wordpress.org/trunk@48473 git-svn-id: http://core.svn.wordpress.org/trunk@48242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7757fe0b0c
commit
4ff1233e75
@ -4778,7 +4778,7 @@ function wp_ajax_wp_privacy_export_personal_data() {
|
||||
* @type array {
|
||||
* Array of personal data exporters.
|
||||
*
|
||||
* @type string $callback Callable exporter function that accepts an
|
||||
* @type callable $callback Callable exporter function that accepts an
|
||||
* email address and a page and returns an array
|
||||
* of name => value pairs of personal data.
|
||||
* @type string $exporter_friendly_name Translated user facing friendly name for the
|
||||
@ -4968,7 +4968,7 @@ function wp_ajax_wp_privacy_erase_personal_data() {
|
||||
* @type array {
|
||||
* Array of personal data exporters.
|
||||
*
|
||||
* @type string $callback Callable eraser that accepts an email address and
|
||||
* @type callable $callback Callable eraser that accepts an email address and
|
||||
* a page and returns an array with boolean values for
|
||||
* whether items were removed or retained and any messages
|
||||
* from the eraser, as well as if additional pages are
|
||||
|
@ -624,7 +624,7 @@ final class WP_Screen {
|
||||
* @type string $id Tab ID. Must be HTML-safe and should be unique for this menu.
|
||||
* It is NOT allowed to contain any empty spaces. Default false.
|
||||
* @type string $content Optional. Help tab content in plain text or HTML. Default empty string.
|
||||
* @type string $callback Optional. A callback to generate the tab content. Default false.
|
||||
* @type callable $callback Optional. A callback to generate the tab content. Default false.
|
||||
* @type int $priority Optional. The priority of the tab, used for ordering. Default 10.
|
||||
* }
|
||||
*/
|
||||
|
@ -147,7 +147,7 @@ class WP_Site_Health {
|
||||
*
|
||||
* @since 5.4.0
|
||||
*
|
||||
* @param $callback
|
||||
* @param callable $callback
|
||||
* @return mixed|void
|
||||
*/
|
||||
private function perform_test( $callback ) {
|
||||
|
@ -332,7 +332,7 @@ function wp_nav_menu_item_link_meta_box() {
|
||||
*
|
||||
* @type string $id Meta box 'id' attribute.
|
||||
* @type string $title Meta box title.
|
||||
* @type string $callback Meta box display callback.
|
||||
* @type callable $callback Meta box display callback.
|
||||
* @type WP_Post_Type $args Extra meta box arguments (the post type object for this meta box).
|
||||
* }
|
||||
*/
|
||||
@ -686,7 +686,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
|
||||
*
|
||||
* @type string $id Meta box 'id' attribute.
|
||||
* @type string $title Meta box title.
|
||||
* @type string $callback Meta box display callback.
|
||||
* @type callable $callback Meta box display callback.
|
||||
* @type object $args Extra meta box arguments (the taxonomy object for this meta box).
|
||||
* }
|
||||
*/
|
||||
|
@ -204,7 +204,7 @@ class WP_Customize_Control {
|
||||
* 'textarea', 'radio', 'select', and 'dropdown-pages'. Additional
|
||||
* input types such as 'email', 'url', 'number', 'hidden', and
|
||||
* 'date' are supported implicitly. Default 'text'.
|
||||
* @type callback $active_callback Active callback.
|
||||
* @type callable $active_callback Active callback.
|
||||
* }
|
||||
*/
|
||||
public function __construct( $manager, $id, $args = array() ) {
|
||||
|
@ -97,7 +97,7 @@ class WP_Customize_Setting {
|
||||
* Callback to convert a Customize PHP setting value to a value that is JSON serializable.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @var string
|
||||
* @var callable
|
||||
*/
|
||||
public $sanitize_js_callback = '';
|
||||
|
||||
|
@ -2010,8 +2010,8 @@ function comment_form_title( $noreplytext = false, $replytext = false, $linktopa
|
||||
* @type object $walker Instance of a Walker class to list comments. Default null.
|
||||
* @type int $max_depth The maximum comments depth. Default empty.
|
||||
* @type string $style The style of list ordering. Default 'ul'. Accepts 'ul', 'ol'.
|
||||
* @type string $callback Callback function to use. Default null.
|
||||
* @type string $end-callback Callback function to use at the end. Default null.
|
||||
* @type callable $callback Callback function to use. Default null.
|
||||
* @type callable $end-callback Callback function to use at the end. Default null.
|
||||
* @type string $type Type of comments to list.
|
||||
* Default 'all'. Accepts 'all', 'comment', 'pingback', 'trackback', 'pings'.
|
||||
* @type int $page Page ID to list comments for. Default empty.
|
||||
|
@ -4149,7 +4149,7 @@ function wp_send_json_error( $data = null, $status_code = null ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that a JSONP callback is a valid JavaScript callback.
|
||||
* Checks that a JSONP callback is a valid JavaScript callback name.
|
||||
*
|
||||
* Only allows alphanumeric characters and the dot character in callback
|
||||
* function names. This helps to mitigate XSS attacks caused by directly
|
||||
@ -4157,8 +4157,8 @@ function wp_send_json_error( $data = null, $status_code = null ) {
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param string $callback Supplied JSONP callback function.
|
||||
* @return bool True if valid callback, otherwise false.
|
||||
* @param string $callback Supplied JSONP callback function name.
|
||||
* @return bool Whether the callback function name is valid.
|
||||
*/
|
||||
function wp_check_jsonp_callback( $callback ) {
|
||||
if ( ! is_string( $callback ) ) {
|
||||
|
@ -1240,8 +1240,8 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype =
|
||||
* When using a non-single meta key, the default value is for the first entry.
|
||||
* In other words, when calling get_metadata() with `$single` set to `false`,
|
||||
* the default value given here will be wrapped in an array.
|
||||
* @type string $sanitize_callback A function or method to call when sanitizing `$meta_key` data.
|
||||
* @type string $auth_callback Optional. A function or method to call when performing edit_post_meta,
|
||||
* @type callable $sanitize_callback A function or method to call when sanitizing `$meta_key` data.
|
||||
* @type callable $auth_callback Optional. A function or method to call when performing edit_post_meta,
|
||||
* add_post_meta, and delete_post_meta capability checks.
|
||||
* @type bool|array $show_in_rest Whether data associated with this meta key can be considered public and
|
||||
* should be accessible via the REST API. A custom post type must also declare
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-beta1-48472';
|
||||
$wp_version = '5.5-beta1-48473';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
@ -789,7 +789,7 @@ function dynamic_sidebar( $index = 1 ) {
|
||||
*
|
||||
* @type string $name Name of the widget.
|
||||
* @type string $id Widget ID.
|
||||
* @type array|callable $callback When the hook is fired on the front end, $callback is an array
|
||||
* @type 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.
|
||||
@ -857,7 +857,7 @@ function dynamic_sidebar( $index = 1 ) {
|
||||
*
|
||||
* @global array $wp_registered_widgets
|
||||
*
|
||||
* @param string|false $callback Optional, Widget callback to check. Default false.
|
||||
* @param callable|false $callback Optional, Widget callback to check. Default false.
|
||||
* @param int|false $widget_id Optional. Widget ID. Optional, but needed for checking. Default false.
|
||||
* @param string|false $id_base Optional. The base ID of a widget created by extending WP_Widget. Default false.
|
||||
* @param bool $skip_inactive Optional. Whether to check in 'wp_inactive_widgets'. Default true.
|
||||
|
Loading…
Reference in New Issue
Block a user