mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
Docs: Various inline documentation corrections and improvements.
See #53399 Built from https://develop.svn.wordpress.org/trunk@52332 git-svn-id: http://core.svn.wordpress.org/trunk@51924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bc3356601e
commit
39bff93b6b
@ -838,7 +838,7 @@ class WP_Filesystem_Base {
|
||||
* @type mixed $lastmod Last modified month (3 letter) and day (without leading 0).
|
||||
* @type int $time Last modified time.
|
||||
* @type string $type Type of resource. 'f' for file, 'd' for directory.
|
||||
* @type mixed $files If a directory and $recursive is true, contains another array of files.
|
||||
* @type mixed $files If a directory and `$recursive` is true, contains another array of files.
|
||||
* }
|
||||
*/
|
||||
public function dirlist( $path, $include_hidden = true, $recursive = false ) {
|
||||
|
@ -595,7 +595,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||
* @type mixed $lastmod Last modified month (3 letter) and day (without leading 0).
|
||||
* @type int $time Last modified time.
|
||||
* @type string $type Type of resource. 'f' for file, 'd' for directory.
|
||||
* @type mixed $files If a directory and $recursive is true, contains another array of files.
|
||||
* @type mixed $files If a directory and `$recursive` is true, contains another array of files.
|
||||
* }
|
||||
*/
|
||||
public function dirlist( $path, $include_hidden = true, $recursive = false ) {
|
||||
|
@ -703,7 +703,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
* @type mixed $lastmod Last modified month (3 letter) and day (without leading 0).
|
||||
* @type int $time Last modified time.
|
||||
* @type string $type Type of resource. 'f' for file, 'd' for directory.
|
||||
* @type mixed $files If a directory and $recursive is true, contains another array of files.
|
||||
* @type mixed $files If a directory and `$recursive` is true, contains another array of files.
|
||||
* }
|
||||
*/
|
||||
public function dirlist( $path = '.', $include_hidden = true, $recursive = false ) {
|
||||
|
@ -616,7 +616,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
|
||||
* @type mixed $lastmod Last modified month (3 letter) and day (without leading 0).
|
||||
* @type int $time Last modified time.
|
||||
* @type string $type Type of resource. 'f' for file, 'd' for directory.
|
||||
* @type mixed $files If a directory and $recursive is true, contains another array of files.
|
||||
* @type mixed $files If a directory and `$recursive` is true, contains another array of files.
|
||||
* }
|
||||
*/
|
||||
public function dirlist( $path = '.', $include_hidden = true, $recursive = false ) {
|
||||
|
@ -745,7 +745,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
* @type mixed $lastmod Last modified month (3 letter) and day (without leading 0).
|
||||
* @type int $time Last modified time.
|
||||
* @type string $type Type of resource. 'f' for file, 'd' for directory.
|
||||
* @type mixed $files If a directory and $recursive is true, contains another array of files.
|
||||
* @type mixed $files If a directory and `$recursive` is true, contains another array of files.
|
||||
* }
|
||||
*/
|
||||
public function dirlist( $path, $include_hidden = true, $recursive = false ) {
|
||||
|
@ -635,9 +635,9 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
||||
*
|
||||
* @since 5.3.0
|
||||
*
|
||||
* @param array $site_states An array of site states. Default 'Main',
|
||||
* 'Archived', 'Mature', 'Spam', 'Deleted'.
|
||||
* @param WP_Site $site The current site object.
|
||||
* @param string[] $site_states An array of site states. Default 'Main',
|
||||
* 'Archived', 'Mature', 'Spam', 'Deleted'.
|
||||
* @param WP_Site $site The current site object.
|
||||
*/
|
||||
$site_states = apply_filters( 'display_site_states', $site_states, $_site );
|
||||
|
||||
|
@ -615,12 +615,12 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of user roles for a given user object.
|
||||
* Returns an array of translated user role names for a given user object.
|
||||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param WP_User $user_object The WP_User object.
|
||||
* @return string[] An array of user roles.
|
||||
* @return string[] An array of user role names keyed by role.
|
||||
*/
|
||||
protected function get_role_list( $user_object ) {
|
||||
$wp_roles = wp_roles();
|
||||
@ -638,11 +638,11 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the returned array of roles for a user.
|
||||
* Filters the returned array of translated role names for a user.
|
||||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param string[] $role_list An array of user roles.
|
||||
* @param string[] $role_list An array of translated user role names keyed by role.
|
||||
* @param WP_User $user_object A WP_User object.
|
||||
*/
|
||||
return apply_filters( 'get_role_list', $role_list, $user_object );
|
||||
|
@ -44,7 +44,7 @@ $messages['post_tag'] = array(
|
||||
*
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @param array $messages The messages to be displayed.
|
||||
* @param array[] $messages Array of arrays of messages to be displayed, keyed by taxonomy name.
|
||||
*/
|
||||
$messages = apply_filters( 'term_updated_messages', $messages );
|
||||
|
||||
|
@ -75,7 +75,8 @@ function wp_crop_image( $src, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $s
|
||||
* @since 5.3.0
|
||||
*
|
||||
* @param int $attachment_id The image attachment post ID.
|
||||
* @return array An array of the image sub-sizes that are currently defined but don't exist for this image.
|
||||
* @return array[] Associative array of arrays of image sub-size information for
|
||||
* missing image sizes, keyed by image size name.
|
||||
*/
|
||||
function wp_get_missing_image_subsizes( $attachment_id ) {
|
||||
if ( ! wp_attachment_is_image( $attachment_id ) ) {
|
||||
@ -131,9 +132,10 @@ function wp_get_missing_image_subsizes( $attachment_id ) {
|
||||
*
|
||||
* @since 5.3.0
|
||||
*
|
||||
* @param array $missing_sizes Array with the missing image sub-sizes.
|
||||
* @param array $image_meta The image meta data.
|
||||
* @param int $attachment_id The image attachment post ID.
|
||||
* @param array[] $missing_sizes Associative array of arrays of image sub-size information for
|
||||
* missing image sizes, keyed by image size name.
|
||||
* @param array $image_meta The image meta data.
|
||||
* @param int $attachment_id The image attachment post ID.
|
||||
*/
|
||||
return apply_filters( 'wp_get_missing_image_subsizes', $missing_sizes, $image_meta, $attachment_id );
|
||||
}
|
||||
@ -814,7 +816,8 @@ function wp_read_image_metadata( $file ) {
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param array $image_types Image types to check for exif data.
|
||||
* @param int[] $image_types Array of image types to check for exif data. Each value
|
||||
* is usually one of the `IMAGETYPE_*` constants.
|
||||
*/
|
||||
$exif_image_types = apply_filters( 'wp_read_image_metadata_types', array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) );
|
||||
|
||||
|
@ -282,7 +282,7 @@ function media_send_to_editor( $html ) {
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param string $file_id Index of the `$_FILES` array that the file was sent. Required.
|
||||
* @param string $file_id Index of the `$_FILES` array that the file was sent.
|
||||
* @param int $post_id The post ID of a post to attach the media item to. Required, but can
|
||||
* be set to 0, creating a media item that has no relationship to a post.
|
||||
* @param array $post_data Optional. Overwrite some of the attachment.
|
||||
|
@ -12,8 +12,8 @@
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array $file $_FILES array for a given file.
|
||||
* @return array $_FILES array with 'error' key set if file exceeds quota. 'error' is empty otherwise.
|
||||
* @param array $file An element from the `$_FILES` array for a given file.
|
||||
* @return array The `$_FILES` array element with 'error' key set if file exceeds quota. 'error' is empty otherwise.
|
||||
*/
|
||||
function check_upload_size( $file ) {
|
||||
if ( get_site_option( 'upload_space_check_disabled' ) ) {
|
||||
|
@ -1020,7 +1020,7 @@ function get_post_meta_by_id( $mid ) {
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param int $postid A post ID.
|
||||
* @return array {
|
||||
* @return array[] {
|
||||
* Array of meta data arrays for the given post ID.
|
||||
*
|
||||
* @type array ...$0 {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @param int $compare_from The revision ID to compare from.
|
||||
* @param int $compare_to The revision ID to come to.
|
||||
* @return array|false Associative array of a post's revisioned fields and their diffs.
|
||||
* Or, false on failure.
|
||||
* Or, false on failure.
|
||||
*/
|
||||
function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
|
||||
$post = get_post( $post );
|
||||
|
@ -108,7 +108,7 @@ switch ( $action ) {
|
||||
*
|
||||
* @since MU (3.0.0)
|
||||
*
|
||||
* @param array|WP_Error $response The upgrade response array or WP_Error on failure.
|
||||
* @param array $response The upgrade response array.
|
||||
*/
|
||||
do_action( 'after_mu_upgrade', $response );
|
||||
|
||||
|
@ -19,14 +19,14 @@ $tabs = array(
|
||||
);
|
||||
|
||||
/**
|
||||
* An associated array of extra tabs for the Site Health navigation bar.
|
||||
* An associative array of extra tabs for the Site Health navigation bar.
|
||||
*
|
||||
* Add a custom page to the Site Health screen, based on a tab slug and label.
|
||||
* The label you provide will also be used as part of the site title.
|
||||
*
|
||||
* @since 5.8.0
|
||||
*
|
||||
* @param array $tabs An associated array of tab slugs and their label.
|
||||
* @param string[] $tabs An associative array of tab labels keyed by their slug.
|
||||
*/
|
||||
$tabs = apply_filters( 'site_health_navigation_tabs', $tabs );
|
||||
|
||||
|
@ -29,7 +29,12 @@ if ( ! defined( 'WP_TEMPLATE_PART_AREA_UNCATEGORIZED' ) ) {
|
||||
*
|
||||
* @param string $theme_stylesheet The stylesheet. Default is to leverage the main theme root.
|
||||
*
|
||||
* @return array Folder names used by block themes.
|
||||
* @return string[] {
|
||||
* Folder names used by block themes.
|
||||
*
|
||||
* @type string $wp_template Theme-relative directory name for block templates.
|
||||
* @type string $wp_template_part Theme-relative directory name for block template parts.
|
||||
* }
|
||||
*/
|
||||
function get_block_theme_folders( $theme_stylesheet = null ) {
|
||||
$theme_name = null === $theme_stylesheet ? get_stylesheet() : $theme_stylesheet;
|
||||
@ -223,7 +228,7 @@ function _filter_block_template_part_area( $type ) {
|
||||
* @access private
|
||||
*
|
||||
* @param string $base_directory The theme's file path.
|
||||
* @return array $path_list A list of paths to all template part files.
|
||||
* @return array A list of paths to all template part files.
|
||||
*/
|
||||
function _get_block_templates_paths( $base_directory ) {
|
||||
$path_list = array();
|
||||
|
@ -231,10 +231,10 @@ class WP_Comment_Query {
|
||||
* @type int[] $post__not_in Array of post IDs to exclude affiliated comments for.
|
||||
* Default empty.
|
||||
* @type int $post_author Post author ID to limit results by. Default empty.
|
||||
* @type string|array $post_status Post status or array of post statuses to retrieve
|
||||
* @type string|string[] $post_status Post status or array of post statuses to retrieve
|
||||
* affiliated comments for. Pass 'any' to match any value.
|
||||
* Default empty.
|
||||
* @type string|array $post_type Post type or array of post types to retrieve affiliated
|
||||
* @type string|string[] $post_type Post type or array of post types to retrieve affiliated
|
||||
* comments for. Pass 'any' to match any value. Default empty.
|
||||
* @type string $post_name Post name to retrieve affiliated comments for.
|
||||
* Default empty.
|
||||
@ -246,7 +246,7 @@ class WP_Comment_Query {
|
||||
* or space/comma-separated list of 'hold' (`comment_status=0`),
|
||||
* 'approve' (`comment_status=1`), 'all', or a custom
|
||||
* comment status. Default 'all'.
|
||||
* @type string|array $type Include comments of a given type, or array of types.
|
||||
* @type string|string[] $type Include comments of a given type, or array of types.
|
||||
* Accepts 'comment', 'pings' (includes 'pingback' and
|
||||
* 'trackback'), or any custom type string. Default empty.
|
||||
* @type string[] $type__in Include comments from a given array of comment types.
|
||||
|
@ -161,7 +161,7 @@ final class WP_Customize_Manager {
|
||||
* Mapping of 'panel', 'section', 'control' to the ID which should be autofocused.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @var array
|
||||
* @var string[]
|
||||
*/
|
||||
protected $autofocus = array();
|
||||
|
||||
@ -4720,7 +4720,7 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @return array {
|
||||
* @return string[] {
|
||||
* Mapping of 'panel', 'section', 'control' to the ID which should be autofocused.
|
||||
*
|
||||
* @type string $control ID for control to be autofocused.
|
||||
|
@ -569,7 +569,7 @@ class WP_Date_Query {
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @return array {
|
||||
* @return string[] {
|
||||
* Array containing JOIN and WHERE SQL clauses to append to the main query.
|
||||
*
|
||||
* @type string $join SQL fragment to append to the main JOIN clause.
|
||||
@ -679,7 +679,7 @@ class WP_Date_Query {
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @param array $query Date query arguments.
|
||||
* @return array {
|
||||
* @return string[] {
|
||||
* Array containing JOIN and WHERE SQL clauses to append to the main query.
|
||||
*
|
||||
* @type string $join SQL fragment to append to the main JOIN clause.
|
||||
@ -697,7 +697,7 @@ class WP_Date_Query {
|
||||
*
|
||||
* @param array $query Date query clause.
|
||||
* @param array $parent_query Parent query of the current date query.
|
||||
* @return array {
|
||||
* @return string[] {
|
||||
* Array containing JOIN and WHERE SQL clauses to append to the main query.
|
||||
*
|
||||
* @type string $join SQL fragment to append to the main JOIN clause.
|
||||
|
@ -175,7 +175,7 @@ abstract class WP_Image_Editor {
|
||||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @return array {
|
||||
* @return int[] {
|
||||
* Dimensions of the image.
|
||||
*
|
||||
* @type int $width The image width.
|
||||
|
@ -401,7 +401,7 @@ class WP_Meta_Query {
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @return array {
|
||||
* @return string[] {
|
||||
* Array containing JOIN and WHERE SQL clauses to append to the main query.
|
||||
*
|
||||
* @type string $join SQL fragment to append to the main JOIN clause.
|
||||
@ -434,7 +434,7 @@ class WP_Meta_Query {
|
||||
* @param array $query Query to parse (passed by reference).
|
||||
* @param int $depth Optional. Number of tree levels deep we currently are.
|
||||
* Used to calculate indentation. Default 0.
|
||||
* @return array {
|
||||
* @return string[] {
|
||||
* Array containing JOIN and WHERE SQL clauses to append to a single query array.
|
||||
*
|
||||
* @type string $join SQL fragment to append to the main JOIN clause.
|
||||
@ -520,7 +520,7 @@ class WP_Meta_Query {
|
||||
* @param array $parent_query Parent query array.
|
||||
* @param string $clause_key Optional. The array key used to name the clause in the original `$meta_query`
|
||||
* parameters. If not provided, a key will be generated automatically.
|
||||
* @return array {
|
||||
* @return string[] {
|
||||
* Array containing JOIN and WHERE SQL clauses to append to a first-order query.
|
||||
*
|
||||
* @type string $join SQL fragment to append to the main JOIN clause.
|
||||
|
@ -728,9 +728,9 @@ class WP_Query {
|
||||
* top-level pages.
|
||||
* @type int[] $post_parent__in An array containing parent page IDs to query child pages from.
|
||||
* @type int[] $post_parent__not_in An array containing parent page IDs not to query child pages from.
|
||||
* @type string|array $post_type A post type slug (string) or array of post type slugs.
|
||||
* @type string|string[] $post_type A post type slug (string) or array of post type slugs.
|
||||
* Default 'any' if using 'tax_query'.
|
||||
* @type string|array $post_status A post status (string) or array of post statuses.
|
||||
* @type string|string[] $post_status A post status (string) or array of post statuses.
|
||||
* @type int $posts_per_page The number of posts to query for. Use -1 to request all posts.
|
||||
* @type int $posts_per_archive_page The number of posts to query for by archive page. Overrides
|
||||
* 'posts_per_page' when is_archive(), or is_search() are true.
|
||||
@ -2830,7 +2830,17 @@ class WP_Query {
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param string[] $clauses Associative array of the clauses for the query.
|
||||
* @param string[] $clauses {
|
||||
* Associative array of the clauses for the query.
|
||||
*
|
||||
* @type string $where The WHERE clause of the query.
|
||||
* @type string $groupby The GROUP BY clause of the query.
|
||||
* @type string $join The JOIN clause of the query.
|
||||
* @type string $orderby The ORDER BY clause of the query.
|
||||
* @type string $distinct The DISTINCT clause of the query.
|
||||
* @type string $fields The SELECT clause of the query.
|
||||
* @type string $limits The LIMIT clause of the query.
|
||||
* }
|
||||
* @param WP_Query $query The WP_Query instance (passed by reference).
|
||||
*/
|
||||
$clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
|
||||
@ -2954,7 +2964,17 @@ class WP_Query {
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param string[] $pieces Associative array of the pieces of the query.
|
||||
* @param string[] $pieces {
|
||||
* Associative array of the clauses for the query.
|
||||
*
|
||||
* @type string $where The WHERE clause of the query.
|
||||
* @type string $groupby The GROUP BY clause of the query.
|
||||
* @type string $join The JOIN clause of the query.
|
||||
* @type string $orderby The ORDER BY clause of the query.
|
||||
* @type string $distinct The DISTINCT clause of the query.
|
||||
* @type string $fields The SELECT clause of the query.
|
||||
* @type string $limits The LIMIT clause of the query.
|
||||
* }
|
||||
* @param WP_Query $query The WP_Query instance (passed by reference).
|
||||
*/
|
||||
$clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );
|
||||
|
@ -236,7 +236,7 @@ class WP_Tax_Query {
|
||||
*
|
||||
* @param string $primary_table Database table where the object being filtered is stored (eg wp_users).
|
||||
* @param string $primary_id_column ID column for the filtered object in $primary_table.
|
||||
* @return array {
|
||||
* @return string[] {
|
||||
* Array containing JOIN and WHERE SQL clauses to append to the main query.
|
||||
*
|
||||
* @type string $join SQL fragment to append to the main JOIN clause.
|
||||
@ -258,7 +258,7 @@ class WP_Tax_Query {
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @return array {
|
||||
* @return string[] {
|
||||
* Array containing JOIN and WHERE SQL clauses to append to the main query.
|
||||
*
|
||||
* @type string $join SQL fragment to append to the main JOIN clause.
|
||||
@ -291,7 +291,7 @@ class WP_Tax_Query {
|
||||
* @param array $query Query to parse (passed by reference).
|
||||
* @param int $depth Optional. Number of tree levels deep we currently are.
|
||||
* Used to calculate indentation. Default 0.
|
||||
* @return array {
|
||||
* @return string[] {
|
||||
* Array containing JOIN and WHERE SQL clauses to append to a single query array.
|
||||
*
|
||||
* @type string $join SQL fragment to append to the main JOIN clause.
|
||||
@ -373,7 +373,7 @@ class WP_Tax_Query {
|
||||
*
|
||||
* @param array $clause Query clause (passed by reference).
|
||||
* @param array $parent_query Parent query array.
|
||||
* @return array {
|
||||
* @return string[] {
|
||||
* Array containing JOIN and WHERE SQL clauses to append to a first-order query.
|
||||
*
|
||||
* @type string $join SQL fragment to append to the main JOIN clause.
|
||||
|
@ -94,8 +94,8 @@ class WP_Term_Query {
|
||||
* @param string|array $query {
|
||||
* Optional. Array or query string of term query parameters. Default empty.
|
||||
*
|
||||
* @type string|array $taxonomy Taxonomy name, or array of taxonomies, to which results should
|
||||
* be limited.
|
||||
* @type string|string[] $taxonomy Taxonomy name, or array of taxonomy names, to which results
|
||||
* should be limited.
|
||||
* @type int|int[] $object_ids Object ID, or array of object IDs. Results will be
|
||||
* limited to terms associated with these objects.
|
||||
* @type string $orderby Field(s) to order terms by. Accepts:
|
||||
@ -148,9 +148,9 @@ class WP_Term_Query {
|
||||
* Default 'all'.
|
||||
* @type bool $count Whether to return a term count. If true, will take precedence
|
||||
* over `$fields`. Default false.
|
||||
* @type string|array $name Name or array of names to return term(s) for.
|
||||
* @type string|string[] $name Name or array of names to return term(s) for.
|
||||
* Default empty.
|
||||
* @type string|array $slug Slug or array of slugs to return term(s) for.
|
||||
* @type string|string[] $slug Slug or array of slugs to return term(s) for.
|
||||
* Default empty.
|
||||
* @type int|int[] $term_taxonomy_id Term taxonomy ID, or array of term taxonomy IDs,
|
||||
* to match when querying terms.
|
||||
|
@ -147,7 +147,7 @@ class WP_User_Query {
|
||||
* Optional. Array or string of Query parameters.
|
||||
*
|
||||
* @type int $blog_id The site ID. Default is the current site.
|
||||
* @type string|array $role An array or a comma-separated list of role names that users must match
|
||||
* @type string|string[] $role An array or a comma-separated list of role names that users must match
|
||||
* to be included in results. Note that this is an inclusive list: users
|
||||
* must match *each* role. Default empty.
|
||||
* @type string[] $role__in An array of role names. Matched users must have at least one of these
|
||||
@ -221,7 +221,7 @@ class WP_User_Query {
|
||||
* @type bool $count_total Whether to count the total number of users found. If pagination
|
||||
* is not needed, setting this to false can improve performance.
|
||||
* Default true.
|
||||
* @type string|array $fields Which fields to return. Single or all fields (string), or array
|
||||
* @type string|string[] $fields Which fields to return. Single or all fields (string), or array
|
||||
* of fields. Accepts:
|
||||
* - 'ID'
|
||||
* - 'display_name'
|
||||
@ -235,7 +235,7 @@ class WP_User_Query {
|
||||
* Default 'all'.
|
||||
* @type string $who Type of users to query. Accepts 'authors'.
|
||||
* Default empty (all users).
|
||||
* @type bool|array $has_published_posts Pass an array of post types to filter results to users who have
|
||||
* @type bool|string[] $has_published_posts Pass an array of post types to filter results to users who have
|
||||
* published posts in those post types. `true` is an alias for all
|
||||
* public post types.
|
||||
* @type string $nicename The user nicename. Default empty.
|
||||
|
@ -366,7 +366,7 @@ function get_lastcommentmodified( $timezone = 'server' ) {
|
||||
*
|
||||
* @param int $post_id Optional. Restrict the comment counts to the given post. Default 0, which indicates that
|
||||
* comment counts for the whole site will be retrieved.
|
||||
* @return array {
|
||||
* @return int[] {
|
||||
* The number of comments keyed by their status.
|
||||
*
|
||||
* @type int $approved The number of approved comments.
|
||||
|
@ -57,7 +57,7 @@ function wp_embed_unregister_handler( $id, $priority = 10 ) {
|
||||
* @global int $content_width
|
||||
*
|
||||
* @param string $url Optional. The URL that should be embedded. Default empty.
|
||||
* @return array {
|
||||
* @return int[] {
|
||||
* Indexed array of the embed width and height in pixels.
|
||||
*
|
||||
* @type int $0 The embed width.
|
||||
|
@ -2761,15 +2761,15 @@ function untrailingslashit( $string ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds slashes to escape strings.
|
||||
* Adds slashes to a string or recursively adds slashes to strings within an array.
|
||||
*
|
||||
* Slashes will first be removed if magic_quotes_gpc is set, see {@link
|
||||
* https://www.php.net/magic_quotes} for more details.
|
||||
*
|
||||
* @since 0.71
|
||||
*
|
||||
* @param string $gpc The string returned from HTTP request data.
|
||||
* @return string Returns a string escaped with slashes.
|
||||
* @param string|array $gpc String or array of data to slash.
|
||||
* @return string|array Slashed `$gpc`.
|
||||
*/
|
||||
function addslashes_gpc( $gpc ) {
|
||||
return wp_slash( $gpc );
|
||||
@ -5592,7 +5592,7 @@ function sanitize_trackback_urls( $to_ping ) {
|
||||
* @since 5.5.0 Non-string values are left untouched.
|
||||
*
|
||||
* @param string|array $value String or array of data to slash.
|
||||
* @return string|array Slashed $value.
|
||||
* @return string|array Slashed `$value`.
|
||||
*/
|
||||
function wp_slash( $value ) {
|
||||
if ( is_array( $value ) ) {
|
||||
@ -5615,7 +5615,7 @@ function wp_slash( $value ) {
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @param string|array $value String or array of data to unslash.
|
||||
* @return string|array Unslashed $value.
|
||||
* @return string|array Unslashed `$value`.
|
||||
*/
|
||||
function wp_unslash( $value ) {
|
||||
return stripslashes_deep( $value );
|
||||
|
@ -179,7 +179,7 @@ function wp_schedule_https_detection() {
|
||||
* @access private
|
||||
*
|
||||
* @param array $request The Cron request arguments.
|
||||
* @return array $request The filtered Cron request arguments.
|
||||
* @return array The filtered Cron request arguments.
|
||||
*/
|
||||
function wp_cron_conditionally_prevent_sslverify( $request ) {
|
||||
if ( 'https' === wp_parse_url( $request['url'], PHP_URL_SCHEME ) ) {
|
||||
|
@ -218,7 +218,7 @@ wpList = {
|
||||
* Example 1: data-wp-lists="delete:the-comment-list:comment-{comment_ID}:66cc66:unspam=1"
|
||||
* Example 2: data-wp-lists="dim:the-comment-list:comment-{comment_ID}:unapproved:e7e7d3:e7e7d3:new=approved"
|
||||
*
|
||||
* Returns an unassociated array with the following data:
|
||||
* Returns an unassociative array with the following data:
|
||||
* data[0] - Data identifier: 'list', 'add', 'delete', or 'dim'.
|
||||
* data[1] - ID of the corresponding list. If data[0] is 'list', the type of list ('comment', 'category', etc).
|
||||
* data[2] - ID of the parent element of all inputs necessary for the request.
|
||||
|
@ -632,13 +632,13 @@ function _n_noop( $singular, $plural, $domain = null ) {
|
||||
* @return array {
|
||||
* Array of translation information for the strings.
|
||||
*
|
||||
* @type string $0 Singular form to be localized. No longer used.
|
||||
* @type string $1 Plural form to be localized. No longer used.
|
||||
* @type string $2 Context information for the translators. No longer used.
|
||||
* @type string $singular Singular form to be localized.
|
||||
* @type string $plural Plural form to be localized.
|
||||
* @type string $context Context information for the translators.
|
||||
* @type string $domain Text domain.
|
||||
* @type string $0 Singular form to be localized. No longer used.
|
||||
* @type string $1 Plural form to be localized. No longer used.
|
||||
* @type string $2 Context information for the translators. No longer used.
|
||||
* @type string $singular Singular form to be localized.
|
||||
* @type string $plural Plural form to be localized.
|
||||
* @type string $context Context information for the translators.
|
||||
* @type string|null $domain Text domain.
|
||||
* }
|
||||
*/
|
||||
function _nx_noop( $singular, $plural, $context, $domain = null ) {
|
||||
|
@ -882,7 +882,8 @@ function get_intermediate_image_sizes() {
|
||||
* @uses wp_get_additional_image_sizes()
|
||||
* @uses get_intermediate_image_sizes()
|
||||
*
|
||||
* @return array Associative array of the registered image sub-sizes.
|
||||
* @return array[] Associative array of arrays of image sub-size information,
|
||||
* keyed by image size name.
|
||||
*/
|
||||
function wp_get_registered_image_subsizes() {
|
||||
$additional_sizes = wp_get_additional_image_sizes();
|
||||
@ -5211,20 +5212,19 @@ function wp_getimagesize( $filename, array &$image_info = null ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts meta information about a webp file: width, height and type.
|
||||
* Extracts meta information about a WebP file: width, height, and type.
|
||||
*
|
||||
* @since 5.8.0
|
||||
*
|
||||
* @param string $filename Path to a WebP file.
|
||||
* @return array $webp_info {
|
||||
* @return array {
|
||||
* An array of WebP image information.
|
||||
*
|
||||
* @type array $size {
|
||||
* @type int|false $width Image width on success, false on failure.
|
||||
* @type int|false $height Image height on success, false on failure.
|
||||
* @type string|false $type The WebP type: one of 'lossy', 'lossless' or 'animated-alpha'.
|
||||
* False on failure.
|
||||
* }
|
||||
* @type int|false $width Image width on success, false on failure.
|
||||
* @type int|false $height Image height on success, false on failure.
|
||||
* @type string|false $type The WebP type: one of 'lossy', 'lossless' or 'animated-alpha'.
|
||||
* False on failure.
|
||||
* }
|
||||
*/
|
||||
function wp_get_webp_info( $filename ) {
|
||||
$width = false;
|
||||
|
@ -412,9 +412,9 @@ function wp_update_nav_menu_object( $menu_id = 0, $menu_data = array() ) {
|
||||
* @since 3.0.0
|
||||
* @since 5.9.0 Added the `$fire_after_hooks` parameter.
|
||||
*
|
||||
* @param int $menu_id The ID of the menu. Required. If "0", makes the menu item a draft orphan.
|
||||
* @param int $menu_item_db_id The ID of the menu item. If "0", creates a new menu item.
|
||||
* @param array $menu_item_data The menu item's data.
|
||||
* @param int $menu_id The ID of the menu. If 0, makes the menu item a draft orphan.
|
||||
* @param int $menu_item_db_id The ID of the menu item. If 0, creates a new menu item.
|
||||
* @param array $menu_item_data The menu item's data.
|
||||
* @param bool $fire_after_hooks Whether to fire the after insert hooks. Default true.
|
||||
* @return int|WP_Error The menu item's database ID or WP_Error object on failure.
|
||||
*/
|
||||
|
@ -30,15 +30,23 @@ if ( ! class_exists( 'Translation_Entry', false ) ) :
|
||||
public $flags = array();
|
||||
|
||||
/**
|
||||
* @param array $args associative array, support following keys:
|
||||
* - singular (string) -- the string to translate, if omitted and empty entry will be created
|
||||
* - plural (string) -- the plural form of the string, setting this will set {@link $is_plural} to true
|
||||
* - translations (array) -- translations of the string and possibly -- its plural forms
|
||||
* - context (string) -- a string differentiating two equal strings used in different contexts
|
||||
* - translator_comments (string) -- comments left by translators
|
||||
* - extracted_comments (string) -- comments left by developers
|
||||
* - references (array) -- places in the code this strings is used, in relative_to_root_path/file.php:linenum form
|
||||
* - flags (array) -- flags like php-format
|
||||
* @param array $args {
|
||||
* Arguments array, supports the following keys:
|
||||
*
|
||||
* @type string $singular The string to translate, if omitted an
|
||||
* empty entry will be created.
|
||||
* @type string $plural The plural form of the string, setting
|
||||
* this will set {@link $is_plural} to true.
|
||||
* @type array $translations Translations of the string and possibly
|
||||
* its plural forms.
|
||||
* @type string $context A string differentiating two equal strings
|
||||
* used in different contexts.
|
||||
* @type string $translator_comments Comments left by translators.
|
||||
* @type string $extracted_comments Comments left by developers.
|
||||
* @type array $references Places in the code this string is used, in
|
||||
* relative_to_root_path/file.php:linenum form.
|
||||
* @type array $flags Flags like php-format.
|
||||
* }
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
// If no singular -- empty object.
|
||||
|
@ -229,8 +229,7 @@ class WP_REST_Global_Styles_Controller extends WP_REST_Controller {
|
||||
*
|
||||
* @param WP_Post $post Global Styles post object.
|
||||
* @param WP_REST_Request $request Request object.
|
||||
*
|
||||
* @return WP_REST_Response $data
|
||||
* @return WP_REST_Response Response object.
|
||||
*/
|
||||
public function prepare_item_for_response( $post, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
|
||||
$raw_config = json_decode( $post->post_content, true );
|
||||
|
@ -553,7 +553,7 @@ class WP_REST_Templates_Controller extends WP_REST_Controller {
|
||||
*
|
||||
* @param WP_Block_Template $item Template instance.
|
||||
* @param WP_REST_Request $request Request object.
|
||||
* @return WP_REST_Response $data
|
||||
* @return WP_REST_Response Response object.
|
||||
*/
|
||||
public function prepare_item_for_response( $item, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
|
||||
// Restores the more descriptive, specific name for use within this method.
|
||||
|
@ -823,28 +823,26 @@ function unregister_taxonomy_for_object_type( $taxonomy, $object_type ) {
|
||||
//
|
||||
|
||||
/**
|
||||
* Retrieve object_ids of valid taxonomy and term.
|
||||
* Retrieve object IDs of valid taxonomy and term.
|
||||
*
|
||||
* The strings of $taxonomies must exist before this function will continue.
|
||||
* On failure of finding a valid taxonomy, it will return a WP_Error class,
|
||||
* kind of like Exceptions in PHP 5, except you can't catch them. Even so,
|
||||
* you can still test for the WP_Error class and get the error message.
|
||||
* The strings of `$taxonomies` must exist before this function will continue.
|
||||
* On failure of finding a valid taxonomy, it will return a WP_Error.
|
||||
*
|
||||
* The $terms aren't checked the same as $taxonomies, but still need to exist
|
||||
* for $object_ids to be returned.
|
||||
* The `$terms` aren't checked the same as `$taxonomies`, but still need to exist
|
||||
* for object IDs to be returned.
|
||||
*
|
||||
* It is possible to change the order that object_ids is returned by either
|
||||
* using PHP sort family functions or using the database by using $args with
|
||||
* either ASC or DESC array. The value should be in the key named 'order'.
|
||||
* It is possible to change the order that object IDs are returned by using `$args`
|
||||
* with either ASC or DESC array. The value should be in the key named 'order'.
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param int|array $term_ids Term ID or array of term IDs of terms that will be used.
|
||||
* @param string|array $taxonomies String of taxonomy name or Array of string values of taxonomy names.
|
||||
* @param array|string $args Change the order of the object_ids, either ASC or DESC.
|
||||
* @return array|WP_Error An array of $object_ids on success, WP_Error if the taxonomy does not exist.
|
||||
* @param int|int[] $term_ids Term ID or array of term IDs of terms that will be used.
|
||||
* @param string|string[] $taxonomies String of taxonomy name or Array of string values of taxonomy names.
|
||||
* @param array|string $args Change the order of the object IDs, either ASC or DESC.
|
||||
* @return string[]|WP_Error An array of object IDs as numeric strings on success,
|
||||
* WP_Error if the taxonomy does not exist.
|
||||
*/
|
||||
function get_objects_in_term( $term_ids, $taxonomies, $args = array() ) {
|
||||
global $wpdb;
|
||||
@ -899,7 +897,7 @@ function get_objects_in_term( $term_ids, $taxonomies, $args = array() ) {
|
||||
* @param array $tax_query A compact tax query
|
||||
* @param string $primary_table
|
||||
* @param string $primary_id_column
|
||||
* @return array
|
||||
* @return string[]
|
||||
*/
|
||||
function get_tax_sql( $tax_query, $primary_table, $primary_id_column ) {
|
||||
$tax_query_obj = new WP_Tax_Query( $tax_query );
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-beta1-52331';
|
||||
$wp_version = '5.9-beta1-52332';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
@ -58,7 +58,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) {
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array $shake_error_codes Error codes that shake the login form.
|
||||
* @param string[] $shake_error_codes Error codes that shake the login form.
|
||||
*/
|
||||
$shake_error_codes = apply_filters( 'shake_error_codes', $shake_error_codes );
|
||||
|
||||
@ -185,8 +185,8 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) {
|
||||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param array $classes An array of body classes.
|
||||
* @param string $action The action that brought the visitor to the login page.
|
||||
* @param string[] $classes An array of body classes.
|
||||
* @param string $action The action that brought the visitor to the login page.
|
||||
*/
|
||||
$classes = apply_filters( 'login_body_class', $classes, $action );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user