Improve various `@param` docs for `src/wp-admin/*`.

See #30224.

Built from https://develop.svn.wordpress.org/trunk@30680


git-svn-id: http://core.svn.wordpress.org/trunk@30670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-12-01 01:00:22 +00:00
parent 65ab522a51
commit 2c32752abd
9 changed files with 34 additions and 24 deletions

View File

@ -27,6 +27,9 @@ class WP_Upgrader_Skin {
$this->options = wp_parse_args($args, $defaults);
}
/**
* @param WP_Upgrader $upgrader
*/
public function set_upgrader(&$upgrader) {
if ( is_object($upgrader) )
$this->upgrader =& $upgrader;
@ -216,6 +219,9 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
$this->upgrader->strings['skin_upgrade_end'] = __('All updates have been completed.');
}
/**
* @param string $string
*/
public function feedback($string) {
if ( isset( $this->upgrader->strings[$string] ) )
$string = $this->upgrader->strings[$string];
@ -721,6 +727,9 @@ class Automatic_Upgrader_Skin extends WP_Upgrader_Skin {
return $this->messages;
}
/**
* @param string|array|WP_Error $data
*/
public function feedback( $data ) {
if ( is_wp_error( $data ) )
$string = $data->get_error_message();

View File

@ -432,7 +432,7 @@ function media_handle_sideload($file_array, $post_id, $desc = null, $post_data =
*
* @since 2.5.0
*
* @param array $content_func
* @param string|callable $content_func
*/
function wp_iframe($content_func /* ... */) {
_wp_admin_html_begin();
@ -916,7 +916,7 @@ function media_upload_library() {
*
* @since 2.7.0
*
* @param object $post
* @param WP_Post $post
* @param string $checked
* @return string
*/
@ -944,7 +944,7 @@ function image_align_input_fields( $post, $checked = '' ) {
*
* @since 2.7.0
*
* @param object $post
* @param WP_Post $post
* @param bool|string $check
* @return array
*/
@ -1016,7 +1016,7 @@ function image_size_input_fields( $post, $check = '' ) {
*
* @since 2.7.0
*
* @param object $post
* @param WP_Post $post
* @param string $url_type
* @return string
*/
@ -2930,7 +2930,7 @@ function wp_add_id3_tag_data( &$metadata, $data ) {
* @since 3.6.0
*
* @param string $file Path to file.
* @return array|boolean Returns array of metadata, if found.
* @return array|bool Returns array of metadata, if found.
*/
function wp_read_video_metadata( $file ) {
if ( ! file_exists( $file ) )

View File

@ -190,7 +190,7 @@ function install_search_form( $type_selector = true ) {
* Upload from zip
* @since 2.8.0
*
* @param string $page
* @param integer $page
*/
function install_plugins_upload( $page = 1 ) {
?>

View File

@ -1120,7 +1120,7 @@ function postbox_classes( $id, $page ) {
*
* @since 2.5.0
*
* @param int|object $id Post ID or post object.
* @param integer $id Post ID or post object.
* @param string $title (optional) Title
* @param string $name (optional) Name
* @return array With two entries of type string
@ -1185,7 +1185,7 @@ function get_sample_permalink($id, $title = null, $name = null) {
*
* @since 2.5.0
*
* @param int|object $id Post ID or post object.
* @param integer $id Post ID or post object.
* @param string $new_title Optional. New title.
* @param string $new_slug Optional. New slug.
* @return string The HTML of the sample permalink slug editor.
@ -1308,7 +1308,7 @@ function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) {
* @since 2.5.0
*
* @param int $post_id ID of the post to check for editing
* @return bool|int False: not locked or locked by current user. Int: user ID of user with lock.
* @return integer False: not locked or locked by current user. Int: user ID of user with lock.
*/
function wp_check_post_lock( $post_id ) {
if ( !$post = get_post( $post_id ) )

View File

@ -60,7 +60,7 @@ function get_hidden_columns( $screen ) {
*
* @since 2.7.0
*
* @param string|WP_Screen $screen
* @param WP_Screen $screen
*/
function meta_box_prefs( $screen ) {
global $wp_meta_boxes;
@ -650,7 +650,7 @@ final class WP_Screen {
* @param string $option Option name.
* @param string $key Optional. Specific array key for when the option is an array.
* Default false.
* @return mixed The option value if set, null otherwise.
* @return string The option value if set, null otherwise.
*/
public function get_option( $option, $key = false ) {
if ( ! isset( $this->_options[ $option ] ) )

View File

@ -403,7 +403,7 @@ function get_inline_data($post) {
*
* @since 2.7.0
*
* @param string|int $position
* @param int $position
* @param bool $checkbox
* @param string $mode
* @param bool $table_row
@ -707,10 +707,10 @@ function meta_form( $post = null ) {
*
* @since 0.71
*
* @param int|bool $edit Accepts 1|true for editing the date, 0|false for adding the date.
* @param int|bool $for_post Accepts 1|true for applying the date to a post, 0|false for a comment.
* @param int|bool $tab_index The tabindex attribute to add. Default 0.
* @param int|bool $multi Optional. Whether the additional fields and buttons should be added.
* @param int $edit Accepts 1|true for editing the date, 0|false for adding the date.
* @param int $for_post Accepts 1|true for applying the date to a post, 0|false for a comment.
* @param int $tab_index The tabindex attribute to add. Default 0.
* @param int $multi Optional. Whether the additional fields and buttons should be added.
* Default 0|false.
*/
function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
@ -813,7 +813,7 @@ function page_template_dropdown( $default = '' ) {
* @param int $parent Optional. The parent page ID. Default 0.
* @param int $level Optional. Page depth level. Default 0.
*
* @return void|bool Boolean False if page has no children, otherwise print out html elements
* @return null|false Boolean False if page has no children, otherwise print out html elements
*/
function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) {
global $wpdb;
@ -992,7 +992,8 @@ function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advan
*
* @since 2.5.0
*
* @param string|object $screen Screen identifier
* @staticvar bool $already_sorted
* @param string|WP_Screen $screen Screen identifier
* @param string $context box context
* @param mixed $object gets passed to the box callback function as first parameter
* @return int number of meta_boxes

View File

@ -138,7 +138,7 @@ function theme_update_available( $theme ) {
* @since 3.8.0
*
* @param WP_Theme $theme WP_Theme object.
* @return string|bool HTML for the update link, or false if invalid info was passed.
* @return false|string HTML for the update link, or false if invalid info was passed.
*/
function get_theme_update_available( $theme ) {
static $themes_update;

View File

@ -30,7 +30,7 @@ if ( !function_exists('wp_install') ) :
* @param string $user_name User's username.
* @param string $user_email User's email.
* @param bool $public Whether blog is public.
* @param null $deprecated Optional. Not used.
* @param string $deprecated Optional. Not used.
* @param string $user_password Optional. User's chosen password. Will default to a random password.
* @param string $language Optional. Language chosen.
* @return array Array keys 'url', 'user_id', 'password', 'password_message'.
@ -1532,7 +1532,7 @@ function maybe_add_column($table_name, $column_name, $create_ddl) {
*
* @since 1.2.0
*
* @return array List of options.
* @return stdClass List of options.
*/
function get_alloptions_110() {
global $wpdb;
@ -1975,7 +1975,7 @@ function make_site_theme_from_oldschool($theme_name, $template) {
*
* @param string $theme_name
* @param string $template
* @return bool|null
* @return null|false
*/
function make_site_theme_from_default($theme_name, $template) {
$site_dir = WP_CONTENT_DIR . "/themes/$template";
@ -2039,7 +2039,7 @@ function make_site_theme_from_default($theme_name, $template) {
*
* @since 1.5.0
*
* @return string|bool
* @return false|string
*/
function make_site_theme() {
// Name the theme after the blog.

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-beta2-30679';
$wp_version = '4.1-beta2-30680';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.