From a4facedfeee65b6f30e107e1bf23e86890c0f71b Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sun, 10 Jan 2016 01:26:25 +0000 Subject: [PATCH] Docs: Various docblock corrections. See #32246 Built from https://develop.svn.wordpress.org/trunk@36250 git-svn-id: http://core.svn.wordpress.org/trunk@36217 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/custom-header.php | 9 +++++---- wp-admin/includes/class-wp-filesystem-base.php | 1 + wp-admin/includes/dashboard.php | 3 +++ wp-admin/includes/schema.php | 8 +++++++- wp-includes/class-feed.php | 12 ++++++++++++ wp-includes/class-wp-comment.php | 2 ++ wp-includes/class-wp-image-editor.php | 2 ++ wp-includes/class-wp-term.php | 3 ++- wp-includes/class-wp-theme.php | 3 ++- wp-includes/version.php | 2 +- 10 files changed, 37 insertions(+), 8 deletions(-) diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index a51991a31f..0955420961 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -261,6 +261,9 @@ class Custom_Image_Header { * Random image option is on by default if no header has been set. * * @since 3.0.0 + * + * @param string $type The header type. One of 'default' (for the Uploaded Images control) + * or 'uploaded' (for the Uploaded Images control). */ public function show_header_selector( $type = 'default' ) { if ( 'default' == $type ) { @@ -969,15 +972,13 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> * Choose a header image, selected from existing uploaded and default headers, * or provide an array of uploaded header data (either new, or from media library). * + * @since 3.4.0 + * * @param mixed $choice Which header image to select. Allows for values of 'random-default-image', * for randomly cycling among the default images; 'random-uploaded-image', for randomly cycling * among the uploaded images; the key of a default image registered for that theme; and * the key of an image uploaded for that theme (the basename of the URL). * Or an array of arguments: attachment_id, url, width, height. All are required. - * - * @since 3.4.0 - * - * @param array|object|string $choice */ final public function set_header_image( $choice ) { if ( is_array( $choice ) || is_object( $choice ) ) { diff --git a/wp-admin/includes/class-wp-filesystem-base.php b/wp-admin/includes/class-wp-filesystem-base.php index 7e6a80f00f..5c45c974bf 100644 --- a/wp-admin/includes/class-wp-filesystem-base.php +++ b/wp-admin/includes/class-wp-filesystem-base.php @@ -705,6 +705,7 @@ class WP_Filesystem_Base { * @since 2.5.0 * @abstract * + * @param string $file Path to file. * @return bool Whether $file is writable. */ public function is_writable( $file ) { diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index b7b1f9ad2c..2a95212aa1 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -1144,6 +1144,9 @@ function wp_dashboard_primary_output( $widget_id, $feeds ) { * Display plugins text for the WordPress news widget. * * @since 2.5.0 + * + * @param string $rss The RSS feed URL. + * @param array $args Array of arguments for this RSS feed. */ function wp_dashboard_plugins_output( $rss, $args = array() ) { // Plugin feeds plus link to install them diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 4f49dc21e1..95da444776 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -888,7 +888,13 @@ endif; * @global int $wp_db_version * @global WP_Rewrite $wp_rewrite * - * @param int $network_id ID of network to populate. + * @param int $network_id ID of network to populate. + * @param string $domain The domain name for the network (eg. "example.com"). + * @param string $email Email address for the network administrator. + * @param string $site_name The name of the network. + * @param string $path Optional. The path to append to the network's domain name. Default '/'. + * @param bool $subdomain_install Optional. Whether the network is a subdomain install or a subdirectory install. + * Default false, meaning the network is a subdirectory install. * @return bool|WP_Error True on success, or WP_Error on warning (with the install otherwise successful, * so the error code must be checked) or failure. */ diff --git a/wp-includes/class-feed.php b/wp-includes/class-feed.php index 919440f18e..59bf88ae1d 100644 --- a/wp-includes/class-feed.php +++ b/wp-includes/class-feed.php @@ -9,6 +9,11 @@ class WP_Feed_Cache extends SimplePie_Cache { * * @static * @access public + * + * @param string $location URL location (scheme is used to determine handler). + * @param string $filename Unique identifier for cache object. + * @param string $extension 'spi' or 'spc'. + * @return WP_Feed_Cache_Transient Feed cache handler object that uses transients. */ public function create($location, $filename, $extension) { return new WP_Feed_Cache_Transient($location, $filename, $extension); @@ -20,6 +25,13 @@ class WP_Feed_Cache_Transient { public $mod_name; public $lifetime = 43200; //Default lifetime in cache of 12 hours + /** + * Class instantiator. + * + * @param string $location URL location (scheme is used to determine handler). + * @param string $filename Unique identifier for cache object. + * @param string $extension 'spi' or 'spc'. + */ public function __construct($location, $filename, $extension) { $this->name = 'feed_' . $filename; $this->mod_name = 'feed_mod_' . $filename; diff --git a/wp-includes/class-wp-comment.php b/wp-includes/class-wp-comment.php index 6319ad4764..32c5442aae 100644 --- a/wp-includes/class-wp-comment.php +++ b/wp-includes/class-wp-comment.php @@ -350,6 +350,8 @@ final class WP_Comment { * unneeded database queries. * * @since 4.4.0 + * + * @param bool $set Whether the comment's children have already been populated. */ public function populated_children( $set ) { $this->populated_children = (bool) $set; diff --git a/wp-includes/class-wp-image-editor.php b/wp-includes/class-wp-image-editor.php index 8dc90c602d..adaa884c98 100644 --- a/wp-includes/class-wp-image-editor.php +++ b/wp-includes/class-wp-image-editor.php @@ -21,6 +21,8 @@ abstract class WP_Image_Editor { /** * Each instance handles a single file. + * + * @param string $file Path to the file to load. */ public function __construct( $file ) { $this->file = $file; diff --git a/wp-includes/class-wp-term.php b/wp-includes/class-wp-term.php index 30a0a8b8c4..d53d518494 100644 --- a/wp-includes/class-wp-term.php +++ b/wp-includes/class-wp-term.php @@ -237,7 +237,8 @@ final class WP_Term { * @since 4.4.0 * @access public * - * @return mixed + * @param string $key Property to get. + * @return mixed Property value. */ public function __get( $key ) { switch ( $key ) { diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index cf497f130f..a2df384d0f 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -350,7 +350,8 @@ final class WP_Theme implements ArrayAccess { /** * __get() magic method for properties formerly returned by current_theme_info() * - * @return mixed + * @param string $offset Property to get. + * @return mixed Property value. */ public function __get( $offset ) { switch ( $offset ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 2b3096e599..a780188a77 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36249'; +$wp_version = '4.5-alpha-36250'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.