Docs: Miscellaneous docblock corrections and improvements.

See #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@48462 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2020-07-13 22:08:16 +00:00
parent c3cdd9c962
commit f36c42c700
7 changed files with 33 additions and 19 deletions

View File

@ -797,11 +797,22 @@ class WP_List_Table {
/**
* Filters the number of items to be displayed on each page of the list table.
*
* The dynamic hook name, $option, refers to the `per_page` option depending
* on the type of list table in use. Possible values include: 'edit_comments_per_page',
* 'sites_network_per_page', 'site_themes_network_per_page', 'themes_network_per_page',
* 'users_network_per_page', 'edit_post_per_page', 'edit_page_per_page',
* 'edit_{$post_type}_per_page', etc.
* The dynamic hook name, `$option`, refers to the `per_page` option depending
* on the type of list table in use. Possible filter names include:
*
* - `edit_comments_per_page`
* - `sites_network_per_page`
* - `site_themes_network_per_page`
* - `themes_network_per_page'`
* - `users_network_per_page`
* - `edit_post_per_page`
* - `edit_page_per_page'`
* - `edit_{$post_type}_per_page`
* - `edit_post_tag_per_page`
* - `edit_category_per_page`
* - `edit_{$taxonomy}_per_page`
* - `site_users_network_per_page`
* - `users_per_page`
*
* @since 2.9.0
*

View File

@ -237,20 +237,20 @@ class WP_Http {
}
/**
* Filters whether to preempt an HTTP request's return value.
* Filters the preemptive return value of an HTTP request.
*
* Returning a non-false value from the filter will short-circuit the HTTP request and return
* early with that value. A filter should return either:
* early with that value. A filter should return one of:
*
* - An array containing 'headers', 'body', 'response', 'cookies', and 'filename' elements
* - A WP_Error instance
* - boolean false (to avoid short-circuiting the response)
* - boolean false to avoid short-circuiting the response
*
* Returning any other value may result in unexpected behaviour.
*
* @since 2.9.0
*
* @param false|array|WP_Error $preempt Whether to preempt an HTTP request's return value. Default false.
* @param false|array|WP_Error $preempt A preemptive return value of an HTTP request. Default false.
* @param array $parsed_args HTTP request arguments.
* @param string $url The request URL.
*/

View File

@ -45,7 +45,7 @@ class WP_Date_Query {
* The value comparison operator. Can be changed via the query arguments.
*
* @since 3.7.0
* @var array
* @var string
*/
public $compare = '=';

View File

@ -21,7 +21,7 @@ class _WP_Dependency {
* The handle name.
*
* @since 2.6.0
* @var null
* @var string
*/
public $handle;
@ -29,7 +29,7 @@ class _WP_Dependency {
* The handle source.
*
* @since 2.6.0
* @var null
* @var string
*/
public $src;
@ -55,7 +55,7 @@ class _WP_Dependency {
* Additional arguments for the handle.
*
* @since 2.6.0
* @var null
* @var array
*/
public $args = null; // Custom property, such as $in_footer or $media.

View File

@ -200,7 +200,7 @@ final class WP_Post_Type {
* Do `remove_meta_box()` and `add_meta_box()` calls in the callback. Default null.
*
* @since 4.6.0
* @var string $register_meta_box_cb
* @var callable $register_meta_box_cb
*/
public $register_meta_box_cb = null;

View File

@ -655,7 +655,7 @@ class WP_Query {
* @type int $hour Hour of the day. Default empty. Accepts numbers 0-23.
* @type int|bool $ignore_sticky_posts Whether to ignore sticky posts or not. Setting this to false
* excludes stickies from 'post__in'. Accepts 1|true, 0|false.
* Default 0|false.
* Default false.
* @type int $m Combination YearMonth. Accepts any four-digit year and month
* numbers 1-12. Default empty.
* @type string $meta_compare Comparison operator to test the 'meta_value'.
@ -685,7 +685,6 @@ class WP_Query {
* 'post_name__in', 'post_parent__in', and the array keys
* of `$meta_query`. Default is 'date', except when a search
* is being performed, when the default is 'relevance'.
*
* @type int $p Post ID.
* @type int $page Show the number of posts that would show up on page X of a
* static front page.
@ -3434,6 +3433,8 @@ class WP_Query {
*
* @since 1.5.0
*
* @see WP_Query::parse_query() for all available arguments.
*
* @param string|array $query URL query string or array of query arguments.
* @return WP_Post[]|int[] Array of post objects or post IDs.
*/
@ -3546,6 +3547,8 @@ class WP_Query {
*
* @since 1.5.0
*
* @see WP_Query::parse_query() for all available arguments.
*
* @param string|array $query URL query string or array of vars.
*/
public function __construct( $query = '' ) {

View File

@ -2355,7 +2355,7 @@ function sanitize_post( $post, $context = 'display' ) {
}
/**
* Sanitize post field based on context.
* Sanitizes a post field based on context.
*
* Possible context values are: 'raw', 'edit', 'db', 'display', 'attribute' and
* 'js'. The 'display' context is used by default. 'attribute' and 'js' contexts
@ -2367,7 +2367,7 @@ function sanitize_post( $post, $context = 'display' ) {
* @param string $field The Post Object field name.
* @param mixed $value The Post Object value.
* @param int $post_id Post ID.
* @param string $context Optional. How to sanitize post fields. Looks for 'raw', 'edit',
* @param string $context Optional. How to sanitize the field. Possible values are 'raw', 'edit',
* 'db', 'display', 'attribute' and 'js'. Default 'display'.
* @return mixed Sanitized value.
*/
@ -2494,7 +2494,7 @@ function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) {
* @param mixed $value Value of the prefixed post field.
* @param int $post_id Post ID.
* @param string $context Context for how to sanitize the field. Possible
* values include 'raw', 'edit', 'db', 'display',
* values include 'edit', 'display',
* 'attribute' and 'js'.
*/
$value = apply_filters( "{$field}", $value, $post_id, $context );