mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Docs: Various inline documentation corrections and improvements.
See #53399 git-svn-id: https://develop.svn.wordpress.org/trunk@52332 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user