Docs: Document many more parameters and properties using typed array notation.
See #41756 Built from https://develop.svn.wordpress.org/trunk@42871 git-svn-id: http://core.svn.wordpress.org/trunk@42701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7f36bbbdf1
commit
1b5d6c6971
|
@ -193,7 +193,7 @@ $messages['attachment'] = array_fill( 1, 10, __( 'Media file updated.' ) ); // H
|
|||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array $messages Post updated messages. For defaults @see $messages declarations above.
|
||||
* @param array[] $messages Post updated messages. For defaults see `$messages` declarations above.
|
||||
*/
|
||||
$messages = apply_filters( 'post_updated_messages', $messages );
|
||||
|
||||
|
|
|
@ -329,9 +329,9 @@ $bulk_messages['page'] = array(
|
|||
*
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @param array $bulk_messages Arrays of messages, each keyed by the corresponding post type. Messages are
|
||||
* keyed with 'updated', 'locked', 'deleted', 'trashed', and 'untrashed'.
|
||||
* @param array $bulk_counts Array of item counts for each message, used to build internationalized strings.
|
||||
* @param array[] $bulk_messages Arrays of messages, each keyed by the corresponding post type. Messages are
|
||||
* keyed with 'updated', 'locked', 'deleted', 'trashed', and 'untrashed'.
|
||||
* @param int[] $bulk_counts Array of item counts for each message, used to build internationalized strings.
|
||||
*/
|
||||
$bulk_messages = apply_filters( 'bulk_post_updated_messages', $bulk_messages, $bulk_counts );
|
||||
$bulk_counts = array_filter( $bulk_counts );
|
||||
|
|
|
@ -253,7 +253,7 @@ function wp_insert_link( $linkdata, $wp_error = false ) {
|
|||
* @since 2.1.0
|
||||
*
|
||||
* @param int $link_id ID of the link to update.
|
||||
* @param array $link_categories Array of link categories to add the link to.
|
||||
* @param int[] $link_categories Array of link category IDs to add the link to.
|
||||
*/
|
||||
function wp_set_link_cats( $link_id = 0, $link_categories = array() ) {
|
||||
// If $link_categories isn't already an array, make it one:
|
||||
|
|
|
@ -55,7 +55,7 @@ class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin {
|
|||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array $update_actions Array of plugin action links.
|
||||
* @param string[] $update_actions Array of plugin action links.
|
||||
* @param array $plugin_info Array of information for the last-updated plugin.
|
||||
*/
|
||||
$update_actions = apply_filters( 'update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info );
|
||||
|
|
|
@ -55,7 +55,7 @@ class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin {
|
|||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array $update_actions Array of theme action links.
|
||||
* @param string[] $update_actions Array of theme action links.
|
||||
* @param WP_Theme $theme_info Theme object for the last-updated theme.
|
||||
*/
|
||||
$update_actions = apply_filters( 'update_bulk_theme_complete_actions', $update_actions, $this->theme_info );
|
||||
|
|
|
@ -77,7 +77,7 @@ class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin {
|
|||
*
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @param array $update_actions Array of translations update links.
|
||||
* @param string[] $update_actions Array of translations update links.
|
||||
*/
|
||||
$update_actions = apply_filters( 'update_translations_complete_actions', $update_actions );
|
||||
|
||||
|
|
|
@ -151,15 +151,16 @@ class Language_Pack_Upgrader extends WP_Upgrader {
|
|||
*
|
||||
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
|
||||
*
|
||||
* @param array $language_updates Optional. Language pack updates. Default empty array.
|
||||
* @param array $args {
|
||||
* Optional. Other arguments for upgrading multiple language packs. Default empty array
|
||||
* @param object[] $language_updates Optional. Array of language packs to update. @see wp_get_translation_updates().
|
||||
* Default empty array.
|
||||
* @param array $args {
|
||||
* Other arguments for upgrading multiple language packs. Default empty array.
|
||||
*
|
||||
* @type bool $clear_update_cache Whether to clear the update cache when done.
|
||||
* Default true.
|
||||
* }
|
||||
* @return array|bool|WP_Error Will return an array of results, or true if there are no updates,
|
||||
* false or WP_Error for initial errors.
|
||||
* false or WP_Error for initial errors.
|
||||
*/
|
||||
public function bulk_upgrade( $language_updates = array(), $args = array() ) {
|
||||
global $wp_filesystem;
|
||||
|
|
|
@ -89,11 +89,11 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin {
|
|||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param array $install_actions Array of plugin action links.
|
||||
* @param object $api Object containing WordPress.org API plugin data. Empty
|
||||
* for non-API installs, such as when a plugin is installed
|
||||
* via upload.
|
||||
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||
* @param string[] $install_actions Array of plugin action links.
|
||||
* @param object $api Object containing WordPress.org API plugin data. Empty
|
||||
* for non-API installs, such as when a plugin is installed
|
||||
* via upload.
|
||||
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||
*/
|
||||
$install_actions = apply_filters( 'install_plugin_complete_actions', $install_actions, $this->api, $plugin_file );
|
||||
|
||||
|
|
|
@ -64,8 +64,8 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
|
|||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param array $update_actions Array of plugin action links.
|
||||
* @param string $plugin Path to the plugin file relative to the plugins directory.
|
||||
* @param string[] $update_actions Array of plugin action links.
|
||||
* @param string $plugin Path to the plugin file relative to the plugins directory.
|
||||
*/
|
||||
$update_actions = apply_filters( 'update_plugin_complete_actions', $update_actions, $this->plugin );
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
|
|||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param array $install_actions Array of theme action links.
|
||||
* @param string[] $install_actions Array of theme action links.
|
||||
* @param object $api Object containing WordPress.org API theme data.
|
||||
* @param string $stylesheet Theme directory name.
|
||||
* @param WP_Theme $theme_info Theme object.
|
||||
|
|
|
@ -85,8 +85,8 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
|
|||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param array $update_actions Array of theme action links.
|
||||
* @param string $theme Theme directory name.
|
||||
* @param string[] $update_actions Array of theme action links.
|
||||
* @param string $theme Theme directory name.
|
||||
*/
|
||||
$update_actions = apply_filters( 'update_theme_complete_actions', $update_actions, $this->theme );
|
||||
|
||||
|
|
|
@ -320,8 +320,8 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||
* @since 3.0.0
|
||||
* @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
|
||||
*
|
||||
* @param array $themes The theme slugs.
|
||||
* @param array $args {
|
||||
* @param string[] $themes Array of the theme slugs.
|
||||
* @param array $args {
|
||||
* Optional. Other arguments for upgrading several themes at once. Default empty array.
|
||||
*
|
||||
* @type bool $clear_update_cache Whether to clear the update cache if successful.
|
||||
|
|
|
@ -381,7 +381,7 @@ if ( 'top' === $which ) {
|
|||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param array $comment_types An array of comment types. Accepts 'Comments', 'Pings'.
|
||||
* @param string[] $comment_types An array of comment types. Accepts 'Comments', 'Pings'.
|
||||
*/
|
||||
$comment_types = apply_filters(
|
||||
'admin_comment_types_dropdown', array(
|
||||
|
|
|
@ -396,7 +396,7 @@ class WP_List_Table {
|
|||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param array $views An array of available list table views.
|
||||
* @param string[] $views An array of available list table views.
|
||||
*/
|
||||
$views = apply_filters( "views_{$this->screen->id}", $views );
|
||||
|
||||
|
@ -447,7 +447,7 @@ class WP_List_Table {
|
|||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param array $actions An array of the available bulk actions.
|
||||
* @param string[] $actions An array of the available bulk actions.
|
||||
*/
|
||||
$this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions );
|
||||
$two = '';
|
||||
|
@ -503,8 +503,8 @@ class WP_List_Table {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param array $actions The list of actions
|
||||
* @param bool $always_visible Whether the actions should be always visible
|
||||
* @param string[] $actions An array of action links.
|
||||
* @param bool $always_visible Whether the actions should be always visible.
|
||||
* @return string
|
||||
*/
|
||||
protected function row_actions( $actions, $always_visible = false ) {
|
||||
|
|
|
@ -286,8 +286,8 @@ if ( ! empty( $views ) ) {
|
|||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param array $taxonomies An array of registered taxonomies to show for attachments.
|
||||
* @param string $post_type The post type. Default 'attachment'.
|
||||
* @param string[] $taxonomies An array of registered taxonomy names to show for attachments.
|
||||
* @param string $post_type The post type. Default 'attachment'.
|
||||
*/
|
||||
$taxonomies = apply_filters( 'manage_taxonomies_for_attachment_columns', $taxonomies, 'attachment' );
|
||||
$taxonomies = array_filter( $taxonomies, 'taxonomy_exists' );
|
||||
|
@ -317,9 +317,9 @@ if ( ! empty( $views ) ) {
|
|||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param array $posts_columns An array of columns displayed in the Media list table.
|
||||
* @param bool $detached Whether the list table contains media not attached
|
||||
* to any posts. Default true.
|
||||
* @param string[] $posts_columns An array of columns displayed in the Media list table.
|
||||
* @param bool $detached Whether the list table contains media not attached
|
||||
* to any posts. Default true.
|
||||
*/
|
||||
return apply_filters( 'manage_media_columns', $posts_columns, $this->detached );
|
||||
}
|
||||
|
@ -755,11 +755,11 @@ if ( ! empty( $views ) ) {
|
|||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param array $actions An array of action links for each attachment.
|
||||
* Default 'Edit', 'Delete Permanently', 'View'.
|
||||
* @param WP_Post $post WP_Post object for the current attachment.
|
||||
* @param bool $detached Whether the list table contains media not attached
|
||||
* to any posts. Default true.
|
||||
* @param string[] $actions An array of action links for each attachment.
|
||||
* Default 'Edit', 'Delete Permanently', 'View'.
|
||||
* @param WP_Post $post WP_Post object for the current attachment.
|
||||
* @param bool $detached Whether the list table contains media not attached
|
||||
* to any posts. Default true.
|
||||
*/
|
||||
return apply_filters( 'media_row_actions', $actions, $post, $this->detached );
|
||||
}
|
||||
|
|
|
@ -248,8 +248,8 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since MU (3.0.0)
|
||||
*
|
||||
* @param array $sites_columns An array of displayed site columns. Default 'cb',
|
||||
* 'blogname', 'lastupdated', 'registered', 'users'.
|
||||
* @param string[] $sites_columns An array of displayed site columns. Default 'cb',
|
||||
* 'blogname', 'lastupdated', 'registered', 'users'.
|
||||
*/
|
||||
return apply_filters( 'wpmu_blogs_columns', $sites_columns );
|
||||
}
|
||||
|
@ -273,6 +273,8 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
|||
* @param array $blog Current site.
|
||||
*/
|
||||
public function column_cb( $blog ) {
|
||||
var_dump($blog);
|
||||
exit;
|
||||
if ( ! is_main_site( $blog['blog_id'] ) ) :
|
||||
$blogname = untrailingslashit( $blog['domain'] . $blog['path'] );
|
||||
?>
|
||||
|
@ -569,10 +571,10 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param array $actions An array of action links to be displayed.
|
||||
* @param int $blog_id The site ID.
|
||||
* @param string $blogname Site path, formatted depending on whether it is a sub-domain
|
||||
* or subdirectory multisite installation.
|
||||
* @param string[] $actions An array of action links to be displayed.
|
||||
* @param int $blog_id The site ID.
|
||||
* @param string $blogname Site path, formatted depending on whether it is a sub-domain
|
||||
* or subdirectory multisite installation.
|
||||
*/
|
||||
$actions = apply_filters( 'manage_sites_action_links', array_filter( $actions ), $blog['blog_id'], $blogname );
|
||||
return $this->row_actions( $actions );
|
||||
|
|
|
@ -97,7 +97,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param array $all An array of WP_Theme objects to display in the list table.
|
||||
* @param WP_Theme[] $all Array of WP_Theme objects to display in the list table.
|
||||
*/
|
||||
'all' => apply_filters( 'all_themes', wp_get_themes() ),
|
||||
'search' => array(),
|
||||
|
@ -506,7 +506,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param array $actions An array of action links.
|
||||
* @param string[] $actions An array of action links.
|
||||
* @param WP_Theme $theme The current WP_Theme object.
|
||||
* @param string $context Status of the theme, one of 'all', 'enabled', or 'disabled'.
|
||||
*/
|
||||
|
@ -522,7 +522,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param array $actions An array of action links.
|
||||
* @param string[] $actions An array of action links.
|
||||
* @param WP_Theme $theme The current WP_Theme object.
|
||||
* @param string $context Status of the theme, one of 'all', 'enabled', or 'disabled'.
|
||||
*/
|
||||
|
@ -587,7 +587,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param array $theme_meta An array of the theme's metadata,
|
||||
* @param string[] $theme_meta An array of the theme's metadata,
|
||||
* including the version, author, and
|
||||
* theme URI.
|
||||
* @param string $stylesheet Directory name of the theme.
|
||||
|
|
|
@ -178,8 +178,8 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since MU (3.0.0)
|
||||
*
|
||||
* @param array $users_columns An array of user columns. Default 'cb', 'username',
|
||||
* 'name', 'email', 'registered', 'blogs'.
|
||||
* @param string[] $users_columns An array of user columns. Default 'cb', 'username',
|
||||
* 'name', 'email', 'registered', 'blogs'.
|
||||
*/
|
||||
return apply_filters( 'wpmu_users_columns', $users_columns );
|
||||
}
|
||||
|
@ -368,9 +368,8 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param array $actions An array of action links to be displayed.
|
||||
* Default 'Edit', 'View'.
|
||||
* @param int $userblog_id The site ID.
|
||||
* @param string[] $actions An array of action links to be displayed. Default 'Edit', 'View'.
|
||||
* @param int $userblog_id The site ID.
|
||||
*/
|
||||
$actions = apply_filters( 'ms_user_list_site_actions', $actions, $val->userblog_id );
|
||||
|
||||
|
@ -465,9 +464,8 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 3.2.0
|
||||
*
|
||||
* @param array $actions An array of action links to be displayed.
|
||||
* Default 'Edit', 'Delete'.
|
||||
* @param WP_User $user WP_User object.
|
||||
* @param string[] $actions An array of action links to be displayed. Default 'Edit', 'Delete'.
|
||||
* @param WP_User $user WP_User object.
|
||||
*/
|
||||
$actions = apply_filters( 'ms_user_row_actions', $actions, $user );
|
||||
return $this->row_actions( $actions );
|
||||
|
|
|
@ -121,8 +121,8 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param array $tabs The tabs shown on the Plugin Install screen. Defaults include 'featured', 'popular',
|
||||
* 'recommended', 'favorites', and 'upload'.
|
||||
* @param string[] $tabs The tabs shown on the Plugin Install screen. Defaults include 'featured', 'popular',
|
||||
* 'recommended', 'favorites', and 'upload'.
|
||||
*/
|
||||
$tabs = apply_filters( 'install_plugins_tabs', $tabs );
|
||||
|
||||
|
@ -131,7 +131,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param array $nonmenu_tabs The tabs that don't have a Menu item on the Plugin Install screen.
|
||||
* @param string[] $nonmenu_tabs The tabs that don't have a menu item on the Plugin Install screen.
|
||||
*/
|
||||
$nonmenu_tabs = apply_filters( 'install_plugins_nonmenu_tabs', $nonmenu_tabs );
|
||||
|
||||
|
@ -602,8 +602,8 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param array $action_links An array of plugin action hyperlinks. Defaults are links to Details and Install Now.
|
||||
* @param array $plugin The plugin currently being listed.
|
||||
* @param string[] $action_links An array of plugin action links. Defaults are links to Details and Install Now.
|
||||
* @param array $plugin The plugin currently being listed.
|
||||
*/
|
||||
$action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
|
||||
|
||||
|
|
|
@ -670,12 +670,12 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param array $actions An array of plugin action links. By default this can include 'activate',
|
||||
* 'deactivate', and 'delete'.
|
||||
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||
* @param array $plugin_data An array of plugin data. See `get_plugin_data()`.
|
||||
* @param string $context The plugin context. By default this can include 'all', 'active', 'inactive',
|
||||
* 'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
|
||||
* @param string[] $actions An array of plugin action links. By default this can include 'activate',
|
||||
* 'deactivate', and 'delete'.
|
||||
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||
* @param array $plugin_data An array of plugin data. See `get_plugin_data()`.
|
||||
* @param string $context The plugin context. By default this can include 'all', 'active', 'inactive',
|
||||
* 'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
|
||||
*/
|
||||
$actions = apply_filters( 'network_admin_plugin_action_links', $actions, $plugin_file, $plugin_data, $context );
|
||||
|
||||
|
@ -687,12 +687,12 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param array $actions An array of plugin action links. By default this can include 'activate',
|
||||
* 'deactivate', and 'delete'.
|
||||
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||
* @param array $plugin_data An array of plugin data. See `get_plugin_data()`.
|
||||
* @param string $context The plugin context. By default this can include 'all', 'active', 'inactive',
|
||||
* 'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
|
||||
* @param string[] $actions An array of plugin action links. By default this can include 'activate',
|
||||
* 'deactivate', and 'delete'.
|
||||
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||
* @param array $plugin_data An array of plugin data. See `get_plugin_data()`.
|
||||
* @param string $context The plugin context. By default this can include 'all', 'active', 'inactive',
|
||||
* 'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
|
||||
*/
|
||||
$actions = apply_filters( "network_admin_plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context );
|
||||
|
||||
|
@ -705,13 +705,13 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
|||
* @since 2.6.0 The `$context` parameter was added.
|
||||
* @since 4.9.0 The 'Edit' link was removed from the list of action links.
|
||||
*
|
||||
* @param array $actions An array of plugin action links. By default this can include 'activate',
|
||||
* 'deactivate', and 'delete'. With Multisite active this can also include
|
||||
* 'network_active' and 'network_only' items.
|
||||
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||
* @param array $plugin_data An array of plugin data. See `get_plugin_data()`.
|
||||
* @param string $context The plugin context. By default this can include 'all', 'active', 'inactive',
|
||||
* 'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
|
||||
* @param string[] $actions An array of plugin action links. By default this can include 'activate',
|
||||
* 'deactivate', and 'delete'. With Multisite active this can also include
|
||||
* 'network_active' and 'network_only' items.
|
||||
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||
* @param array $plugin_data An array of plugin data. See `get_plugin_data()`.
|
||||
* @param string $context The plugin context. By default this can include 'all', 'active', 'inactive',
|
||||
* 'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
|
||||
*/
|
||||
$actions = apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context );
|
||||
|
||||
|
@ -724,13 +724,13 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
|||
* @since 2.7.0
|
||||
* @since 4.9.0 The 'Edit' link was removed from the list of action links.
|
||||
*
|
||||
* @param array $actions An array of plugin action links. By default this can include 'activate',
|
||||
* 'deactivate', and 'delete'. With Multisite active this can also include
|
||||
* 'network_active' and 'network_only' items.
|
||||
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||
* @param array $plugin_data An array of plugin data. See `get_plugin_data()`.
|
||||
* @param string $context The plugin context. By default this can include 'all', 'active', 'inactive',
|
||||
* 'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
|
||||
* @param string[] $actions An array of plugin action links. By default this can include 'activate',
|
||||
* 'deactivate', and 'delete'. With Multisite active this can also include
|
||||
* 'network_active' and 'network_only' items.
|
||||
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||
* @param array $plugin_data An array of plugin data. See `get_plugin_data()`.
|
||||
* @param string $context The plugin context. By default this can include 'all', 'active', 'inactive',
|
||||
* 'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
|
||||
*/
|
||||
$actions = apply_filters( "plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context );
|
||||
|
||||
|
@ -824,14 +824,14 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param array $plugin_meta An array of the plugin's metadata,
|
||||
* including the version, author,
|
||||
* author URI, and plugin URI.
|
||||
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||
* @param array $plugin_data An array of plugin data.
|
||||
* @param string $status Status of the plugin. Defaults are 'All', 'Active',
|
||||
* 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use',
|
||||
* 'Drop-ins', 'Search'.
|
||||
* @param string[] $plugin_meta An array of the plugin's metadata,
|
||||
* including the version, author,
|
||||
* author URI, and plugin URI.
|
||||
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
||||
* @param array $plugin_data An array of plugin data.
|
||||
* @param string $status Status of the plugin. Defaults are 'All', 'Active',
|
||||
* 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use',
|
||||
* 'Drop-ins', 'Search'.
|
||||
*/
|
||||
$plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status );
|
||||
echo implode( ' | ', $plugin_meta );
|
||||
|
|
|
@ -233,9 +233,9 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param array $args URL parameters for the link.
|
||||
* @param string $label Link text.
|
||||
* @param string $class Optional. Class attribute. Default empty string.
|
||||
* @param string[] $args Associative array of URL parameters for the link.
|
||||
* @param string $label Link text.
|
||||
* @param string $class Optional. Class attribute. Default empty string.
|
||||
* @return string The formatted link string.
|
||||
*/
|
||||
protected function get_edit_link( $args, $label, $class = '' ) {
|
||||
|
@ -557,8 +557,8 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
|||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param array $taxonomies Array of taxonomies to show columns for.
|
||||
* @param string $post_type The post type.
|
||||
* @param string[] $taxonomies Array of taxonomy names to show columns for.
|
||||
* @param string $post_type The post type.
|
||||
*/
|
||||
$taxonomies = apply_filters( "manage_taxonomies_for_{$post_type}_columns", $taxonomies, $post_type );
|
||||
$taxonomies = array_filter( $taxonomies, 'taxonomy_exists' );
|
||||
|
@ -589,7 +589,7 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
|||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param array $post_columns An array of column names.
|
||||
* @param string[] $post_columns An associative array of column headings.
|
||||
*/
|
||||
$posts_columns = apply_filters( 'manage_pages_columns', $posts_columns );
|
||||
} else {
|
||||
|
@ -599,8 +599,8 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
|||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param array $posts_columns An array of column names.
|
||||
* @param string $post_type The post type slug.
|
||||
* @param string[] $post_columns An associative array of column headings.
|
||||
* @param string $post_type The post type slug.
|
||||
*/
|
||||
$posts_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type );
|
||||
}
|
||||
|
@ -612,7 +612,7 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
|||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array $post_columns An array of column names.
|
||||
* @param string[] $post_columns An associative array of column headings.
|
||||
*/
|
||||
return apply_filters( "manage_{$post_type}_posts_columns", $posts_columns );
|
||||
}
|
||||
|
@ -1335,10 +1335,10 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
|||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param array $actions An array of row action links. Defaults are
|
||||
* 'Edit', 'Quick Edit', 'Restore', 'Trash',
|
||||
* 'Delete Permanently', 'Preview', and 'View'.
|
||||
* @param WP_Post $post The post object.
|
||||
* @param string[] $actions An array of row action links. Defaults are
|
||||
* 'Edit', 'Quick Edit', 'Restore', 'Trash',
|
||||
* 'Delete Permanently', 'Preview', and 'View'.
|
||||
* @param WP_Post $post The post object.
|
||||
*/
|
||||
$actions = apply_filters( 'page_row_actions', $actions, $post );
|
||||
} else {
|
||||
|
@ -1350,10 +1350,10 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
|||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param array $actions An array of row action links. Defaults are
|
||||
* 'Edit', 'Quick Edit', 'Restore', 'Trash',
|
||||
* 'Delete Permanently', 'Preview', and 'View'.
|
||||
* @param WP_Post $post The post object.
|
||||
* @param string[] $actions An array of row action links. Defaults are
|
||||
* 'Edit', 'Quick Edit', 'Restore', 'Trash',
|
||||
* 'Delete Permanently', 'Preview', and 'View'.
|
||||
* @param WP_Post $post The post object.
|
||||
*/
|
||||
$actions = apply_filters( 'post_row_actions', $actions, $post );
|
||||
}
|
||||
|
|
|
@ -1222,8 +1222,8 @@ if ( $this->show_screen_options() ) :
|
|||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param array $view_mode_post_types Array of post types that can change view modes.
|
||||
* Default non-hierarchical post types with show_ui on.
|
||||
* @param string[] $view_mode_post_types Array of post types that can change view modes.
|
||||
* Default non-hierarchical post types with show_ui on.
|
||||
*/
|
||||
$view_mode_post_types = apply_filters( 'view_mode_post_types', $view_mode_post_types );
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class WP_Site_Icon {
|
|||
* List of site icon sizes.
|
||||
*
|
||||
* @since 4.3.0
|
||||
* @var array
|
||||
* @var int[]
|
||||
*/
|
||||
public $site_icon_sizes = array(
|
||||
/*
|
||||
|
@ -131,12 +131,12 @@ class WP_Site_Icon {
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds additional sizes to be made when creating the site_icon images.
|
||||
* Adds additional sizes to be made when creating the site icon images.
|
||||
*
|
||||
* @since 4.3.0
|
||||
*
|
||||
* @param array $sizes List of additional sizes.
|
||||
* @return array Additional image sizes.
|
||||
* @param array[] $sizes Array of arrays containing information for additional sizes.
|
||||
* @return array[] Array of arrays containing additional image sizes.
|
||||
*/
|
||||
public function additional_sizes( $sizes = array() ) {
|
||||
$only_crop_sizes = array();
|
||||
|
@ -146,7 +146,7 @@ class WP_Site_Icon {
|
|||
*
|
||||
* @since 4.3.0
|
||||
*
|
||||
* @param array $site_icon_sizes Sizes available for the Site Icon.
|
||||
* @param int[] $site_icon_sizes Array of sizes available for the Site Icon.
|
||||
*/
|
||||
$this->site_icon_sizes = apply_filters( 'site_icon_image_sizes', $this->site_icon_sizes );
|
||||
|
||||
|
@ -179,8 +179,8 @@ class WP_Site_Icon {
|
|||
*
|
||||
* @since 4.3.0
|
||||
*
|
||||
* @param array $sizes List of image sizes.
|
||||
* @return array List of intermediate image sizes.
|
||||
* @param string[] $sizes Array of image size names.
|
||||
* @return string[] Array of image size names.
|
||||
*/
|
||||
public function intermediate_image_sizes( $sizes = array() ) {
|
||||
/** This filter is documented in wp-admin/includes/class-wp-site-icon.php */
|
||||
|
|
|
@ -486,9 +486,9 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||
* @since 2.8.0
|
||||
* @deprecated 3.0.0 Use {$taxonomy}_row_actions instead.
|
||||
*
|
||||
* @param array $actions An array of action links to be displayed. Default
|
||||
* 'Edit', 'Quick Edit', 'Delete', and 'View'.
|
||||
* @param WP_Term $tag Term object.
|
||||
* @param string[] $actions An array of action links to be displayed. Default
|
||||
* 'Edit', 'Quick Edit', 'Delete', and 'View'.
|
||||
* @param WP_Term $tag Term object.
|
||||
*/
|
||||
$actions = apply_filters( 'tag_row_actions', $actions, $tag );
|
||||
|
||||
|
@ -499,9 +499,9 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array $actions An array of action links to be displayed. Default
|
||||
* 'Edit', 'Quick Edit', 'Delete', and 'View'.
|
||||
* @param WP_Term $tag Term object.
|
||||
* @param string[] $actions An array of action links to be displayed. Default
|
||||
* 'Edit', 'Quick Edit', 'Delete', and 'View'.
|
||||
* @param WP_Term $tag Term object.
|
||||
*/
|
||||
$actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag );
|
||||
|
||||
|
|
|
@ -76,8 +76,8 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
|||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param array $nonmenu_tabs The tabs that don't have a menu item on
|
||||
* the Install Themes screen.
|
||||
* @param string[] $nonmenu_tabs The tabs that don't have a menu item on
|
||||
* the Install Themes screen.
|
||||
*/
|
||||
$nonmenu_tabs = apply_filters( 'install_themes_nonmenu_tabs', $nonmenu_tabs );
|
||||
|
||||
|
@ -334,7 +334,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
|||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param array $actions An array of theme action hyperlinks. Defaults are
|
||||
* @param string[] $actions An array of theme action links. Defaults are
|
||||
* links to Install Now, Preview, and Details.
|
||||
* @param WP_Theme $theme Theme object.
|
||||
*/
|
||||
|
|
|
@ -452,10 +452,10 @@ class WP_Users_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param array $actions An array of action links to be displayed.
|
||||
* Default 'Edit', 'Delete' for single site, and
|
||||
* 'Edit', 'Remove' for Multisite.
|
||||
* @param WP_User $user_object WP_User object for the currently-listed user.
|
||||
* @param string[] $actions An array of action links to be displayed.
|
||||
* Default 'Edit', 'Delete' for single site, and
|
||||
* 'Edit', 'Remove' for Multisite.
|
||||
* @param WP_User $user_object WP_User object for the currently listed user.
|
||||
*/
|
||||
$actions = apply_filters( 'user_row_actions', $actions, $user_object );
|
||||
|
||||
|
@ -571,7 +571,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
|||
* @since 4.4.0
|
||||
*
|
||||
* @param WP_User $user_object The WP_User object.
|
||||
* @return array An array of user roles.
|
||||
* @return string[] An array of user roles.
|
||||
*/
|
||||
protected function get_role_list( $user_object ) {
|
||||
$wp_roles = wp_roles();
|
||||
|
@ -593,8 +593,8 @@ class WP_Users_List_Table extends WP_List_Table {
|
|||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param array $role_list An array of user roles.
|
||||
* @param WP_User $user_object A WP_User object.
|
||||
* @param string[] $role_list An array of user roles.
|
||||
* @param WP_User $user_object A WP_User object.
|
||||
*/
|
||||
return apply_filters( 'get_role_list', $role_list, $user_object );
|
||||
}
|
||||
|
|
|
@ -2899,17 +2899,16 @@ function get_attachment_taxonomies( $attachment, $output = 'names' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Retrieves all of the taxonomy names that are registered for attachments.
|
||||
* Retrieves all of the taxonomies that are registered for attachments.
|
||||
*
|
||||
* Handles mime-type-specific taxonomies such as attachment:image and attachment:video.
|
||||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @see get_taxonomies()
|
||||
*
|
||||
* @param string $output Optional. The type of taxonomy output to return. Accepts 'names' or 'objects'.
|
||||
* Default 'names'.
|
||||
* @return array The names of all taxonomy of $object_type.
|
||||
* @return string[]|WP_Taxonomy[] Array of names or objects of registered taxonomies for attachments.
|
||||
*/
|
||||
function get_taxonomies_for_attachments( $output = 'names' ) {
|
||||
$taxonomies = array();
|
||||
|
|
|
@ -178,7 +178,7 @@ function create_initial_taxonomies() {
|
|||
* @param string $operator Optional. The logical operation to perform. Accepts 'and' or 'or'. 'or' means only
|
||||
* one element from the array needs to match; 'and' means all elements must match.
|
||||
* Default 'and'.
|
||||
* @return array A list of taxonomy names or objects.
|
||||
* @return string[]|WP_Taxonomy[] An array of taxonomy names or objects.
|
||||
*/
|
||||
function get_taxonomies( $args = array(), $output = 'names', $operator = 'and' ) {
|
||||
global $wp_taxonomies;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* @type int $blog_id (Multisite) The blog ID used to calculate which themes are allowed.
|
||||
* Defaults to 0, synonymous for the current blog.
|
||||
* }
|
||||
* @return array Array of WP_Theme objects.
|
||||
* @return WP_Theme[] Array of WP_Theme objects.
|
||||
*/
|
||||
function wp_get_themes( $args = array() ) {
|
||||
global $wp_theme_directories;
|
||||
|
|
|
@ -600,7 +600,7 @@ function wp_maybe_auto_update() {
|
|||
*
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @return array
|
||||
* @return object[] Array of translation objects that have available updates.
|
||||
*/
|
||||
function wp_get_translation_updates() {
|
||||
$updates = array();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-42870';
|
||||
$wp_version = '5.0-alpha-42871';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue