Make WordPress Core

Changeset 48574


Ignore:
Timestamp:
07/23/2020 12:50:57 AM (4 years ago)
Author:
johnbillion
Message:

Docs: Various formatting improvements to inline docblocks.

See #49572

Location:
trunk/src
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-debug-data.php

    r48561 r48574  
    13001300     * @since 5.2.0
    13011301     *
    1302      * @param array $info_array Information gathered from the `WP_Debug_Data::debug_data` function.
    1303      * @param string $type      The data type to return, either 'info' or 'debug'.
     1302     * @param array  $info_array Information gathered from the `WP_Debug_Data::debug_data` function.
     1303     * @param string $type       The data type to return, either 'info' or 'debug'.
    13041304     * @return string The formatted data.
    13051305     */
  • trunk/src/wp-admin/includes/class-wp-screen.php

    r48508 r48574  
    468468     *
    469469     * @param WP_Screen $screen A screen object.
    470      * @param string $help Help text.
     470     * @param string    $help  Help text.
    471471     */
    472472    public static function add_old_compat_help( $screen, $help ) {
     
    497497     * @since 3.3.0
    498498     *
    499      * @param string $option Option ID
    500      * @param mixed $args Option-dependent arguments.
     499     * @param string $option Option ID.
     500     * @param mixed  $args  Option-dependent arguments.
    501501     */
    502502    public function add_option( $option, $args = array() ) {
  • trunk/src/wp-admin/includes/image.php

    r48508 r48574  
    88
    99/**
    10  * Crop an Image to a given size.
     10 * Crops an image to a given size.
    1111 *
    1212 * @since 2.1.0
  • trunk/src/wp-admin/includes/list-table.php

    r48104 r48574  
    7171 * @since 2.7.0
    7272 *
    73  * @param string  $screen   The handle for the screen to add help to. This is usually the hook name returned by the
     73 * @param string   $screen  The handle for the screen to add help to. This is usually the hook name returned by the
    7474 *                          add_*_page() functions.
    7575 * @param string[] $columns An array of columns with column IDs as the keys and translated column names as the values.
  • trunk/src/wp-admin/includes/meta-boxes.php

    r48436 r48574  
    1818 * @global string $action
    1919 *
    20  * @param WP_Post  $post Current post object.
    21  * @param array    $args {
     20 * @param WP_Post $post Current post object.
     21 * @param array   $args {
    2222 *     Array of arguments for building the post submit meta box.
    2323 *
     
    11861186 * @param string $class
    11871187 * @param string $value
    1188  * @param mixed $deprecated Never used.
     1188 * @param mixed  $deprecated Never used.
    11891189 */
    11901190function xfn_check( $class, $value = '', $deprecated = '' ) {
  • trunk/src/wp-admin/includes/misc.php

    r48420 r48574  
    11911191 * @since 5.0.0
    11921192 *
    1193  * @param array  $response The Heartbeat response.
     1193 * @param array $response The Heartbeat response.
    11941194 * @return array The Heartbeat response.
    11951195 */
  • trunk/src/wp-admin/includes/plugin.php

    r48566 r48574  
    859859 * @param bool            $network_wide Whether to enable the plugin for all sites in the network.
    860860 *                                      Default false.
    861  * @param bool $silent                  Prevent calling activation hooks. Default false.
     861 * @param bool            $silent       Prevent calling activation hooks. Default false.
    862862 * @return bool|WP_Error True when finished or WP_Error if there were errors during a plugin activation.
    863863 */
  • trunk/src/wp-admin/includes/post.php

    r48529 r48574  
    1414 * @since 2.6.0
    1515 *
    16  * @param bool $update Are we updating a pre-existing post?
     16 * @param bool  $update    Are we updating a pre-existing post?
    1717 * @param array $post_data Array of post data. Defaults to the contents of $_POST.
    1818 * @return array|WP_Error Array of post data on success, WP_Error on failure.
     
    15061506
    15071507/**
    1508  * Output HTML for the post thumbnail meta-box.
     1508 * Returns HTML for the post thumbnail meta box.
    15091509 *
    15101510 * @since 2.9.0
    15111511 *
    1512  * @param int $thumbnail_id ID of the attachment used for thumbnail
    1513  * @param int|WP_Post $post Optional. The post ID or object associated with the thumbnail, defaults to global $post.
    1514  * @return string html
     1512 * @param int         $thumbnail_id ID of the attachment used for thumbnail
     1513 * @param int|WP_Post $post         Optional. The post ID or object associated with the thumbnail, defaults to global $post.
     1514 * @return string The post thumbnail HTML.
    15151515 */
    15161516function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) {
  • trunk/src/wp-admin/includes/privacy-tools.php

    r48330 r48574  
    219219 * @since 5.4.0 Added the `$group_id` and `$groups_count` parameters.
    220220 *
    221  * @param array $group_data {
     221 * @param array  $group_data {
    222222 *     The group data to render.
    223223 *
  • trunk/src/wp-admin/includes/screen.php

    r48109 r48574  
    198198 *
    199199 * @param string $option An option name.
    200  * @param mixed $args Option-dependent arguments.
     200 * @param mixed  $args  Option-dependent arguments.
    201201 */
    202202function add_screen_option( $option, $args = array() ) {
  • trunk/src/wp-admin/includes/template.php

    r48573 r48574  
    17961796 * @global array $wp_settings_errors Storage array of errors registered during this pageload
    17971797 *
    1798  * @param string $setting Optional slug title of a specific setting whose errors you want.
    1799  * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
     1798 * @param string $setting  Optional. Slug title of a specific setting whose errors you want.
     1799 * @param bool   $sanitize Optional. Whether to re-sanitize the setting value before returning errors.
    18001800 * @return array Array of settings errors.
    18011801 */
  • trunk/src/wp-admin/users.php

    r48352 r48574  
    248248         * @since 5.2.0
    249249         *
    250          * @param boolean $users_have_additional_content Whether the users have additional content. Default false.
    251          * @param int[]   $userids                       Array of IDs for users being deleted.
     250         * @param bool  $users_have_additional_content Whether the users have additional content. Default false.
     251         * @param int[] $userids                       Array of IDs for users being deleted.
    252252         */
    253253        $users_have_content = (bool) apply_filters( 'users_have_additional_content', false, $userids );
  • trunk/src/wp-comments-post.php

    r47887 r48574  
    5151 * @param WP_Comment $comment         Comment object.
    5252 * @param WP_User    $user            Comment author's user object. The user may not exist.
    53  * @param boolean    $cookies_consent Comment author's consent to store cookies.
     53 * @param bool       $cookies_consent Comment author's consent to store cookies.
    5454 */
    5555do_action( 'set_comment_cookies', $comment, $user, $cookies_consent );
  • trunk/src/wp-includes/category-template.php

    r48197 r48574  
    10831083        $walker = new Walker_Category;
    10841084    } else {
     1085        /**
     1086         * @var Walker $walker
     1087         */
    10851088        $walker = $args[2]['walker'];
    10861089    }
     
    11061109        $walker = new Walker_CategoryDropdown;
    11071110    } else {
     1111        /**
     1112         * @var Walker $walker
     1113         */
    11081114        $walker = $args[2]['walker'];
    11091115    }
  • trunk/src/wp-includes/class-wp-embed.php

    r48135 r48574  
    102102     * This function should probably also only be used for sites that do not support oEmbed.
    103103     *
    104      * @param string $id An internal ID/name for the handler. Needs to be unique.
    105      * @param string $regex The regex that will be used to see if this handler should be used for a URL.
     104     * @param string   $id      An internal ID/name for the handler. Needs to be unique.
     105     * @param string   $regex    The regex that will be used to see if this handler should be used for a URL.
    106106     * @param callable $callback The callback function that will be called if the regex is matched.
    107      * @param int $priority Optional. Used to specify the order in which the registered handlers will be tested (default: 10). Lower numbers correspond with earlier testing, and handlers with the same priority are tested in the order in which they were added to the action.
     107     * @param int      $priority Optional. Used to specify the order in which the registered handlers will be tested.
     108     *                           Lower numbers correspond with earlier testing, and handlers with the same priority are
     109     *                           tested in the order in which they were added to the action. Default 10.
    108110     */
    109111    public function register_handler( $id, $regex, $callback, $priority = 10 ) {
  • trunk/src/wp-includes/class-wp-image-editor-imagick.php

    r48121 r48574  
    510510     * @since 3.5.0
    511511     *
    512      * @param int  $src_x The start x position to crop from.
    513      * @param int  $src_y The start y position to crop from.
    514      * @param int  $src_w The width to crop.
    515      * @param int  $src_h The height to crop.
    516      * @param int  $dst_w Optional. The destination width.
    517      * @param int  $dst_h Optional. The destination height.
     512     * @param int  $src_x   The start x position to crop from.
     513     * @param int  $src_y   The start y position to crop from.
     514     * @param int  $src_w   The width to crop.
     515     * @param int  $src_h   The height to crop.
     516     * @param int  $dst_w   Optional. The destination width.
     517     * @param int  $dst_h   Optional. The destination height.
    518518     * @param bool $src_abs Optional. If the source crop points are absolute.
    519519     * @return bool|WP_Error
  • trunk/src/wp-includes/class-wp-image-editor.php

    r48110 r48574  
    123123     * @abstract
    124124     *
    125      * @param int $src_x The start x position to crop from.
    126      * @param int $src_y The start y position to crop from.
    127      * @param int $src_w The width to crop.
    128      * @param int $src_h The height to crop.
    129      * @param int $dst_w Optional. The destination width.
    130      * @param int $dst_h Optional. The destination height.
     125     * @param int  $src_x  The start x position to crop from.
     126     * @param int  $src_y  The start y position to crop from.
     127     * @param int  $src_w  The width to crop.
     128     * @param int  $src_h  The height to crop.
     129     * @param int  $dst_w  Optional. The destination width.
     130     * @param int  $dst_h  Optional. The destination height.
    131131     * @param bool $src_abs Optional. If the source crop points are absolute.
    132132     * @return bool|WP_Error
     
    232232             * manually without the `$quality` argument.
    233233             *
    234              * set_quality() has priority over the filter.
     234             * The WP_Image_Editor::set_quality() method has priority over the filter.
    235235             *
    236236             * @since 3.5.0
     
    248248                 * manually without the `$quality` argument.
    249249                 *
    250                  * set_quality() has priority over the filter.
     250                 * The WP_Image_Editor::set_quality() method has priority over the filter.
    251251                 *
    252252                 * The filter is evaluated under two contexts: 'image_resize', and 'edit_image',
  • trunk/src/wp-includes/class-wp-role.php

    r46596 r48574  
    2626     *
    2727     * @since 2.0.0
    28      * @var array
     28     * @var bool[] Array of key/value pairs where keys represent a capability name and boolean values
     29     *             represent whether the role has that capability.
    2930     */
    3031    public $capabilities;
     
    3334     * Constructor - Set up object properties.
    3435     *
    35      * The list of capabilities, must have the key as the name of the capability
     36     * The list of capabilities must have the key as the name of the capability
    3637     * and the value a boolean of whether it is granted to the role.
    3738     *
     
    3940     *
    4041     * @param string $role         Role name.
    41      * @param bool[] $capabilities List of capabilities keyed by the capability name,
    42      *                             e.g. array( 'edit_posts' => true, 'delete_posts' => false ).
     42     * @param bool[] $capabilities Array of key/value pairs where keys represent a capability name and boolean values
     43     *                             represent whether the role has that capability.
    4344     */
    4445    public function __construct( $role, $capabilities ) {
     
    5253     * @since 2.0.0
    5354     *
    54      * @param string $cap Capability name.
    55      * @param bool $grant Whether role has capability privilege.
     55     * @param string $cap   Capability name.
     56     * @param bool   $grant Whether role has capability privilege.
    5657     */
    5758    public function add_cap( $cap, $grant = true ) {
     
    6263    /**
    6364     * Removes a capability from a role.
    64      *
    65      * This is a container for WP_Roles::remove_cap() to remove the
    66      * capability from the role. That is to say, that WP_Roles::remove_cap()
    67      * implements the functionality, but it also makes sense to use this class,
    68      * because you don't need to enter the role name.
    6965     *
    7066     * @since 2.0.0
     
    8076     * Determines whether the role has the given capability.
    8177     *
    82      * The capabilities is passed through the {@see 'role_has_cap'} filter.
    83      * The first parameter for the hook is the list of capabilities the class
    84      * has assigned. The second parameter is the capability name to look for.
    85      * The third and final parameter for the hook is the role name.
    86      *
    8778     * @since 2.0.0
    8879     *
    8980     * @param string $cap Capability name.
    90      * @return bool True if the role has the given capability. False otherwise.
     81     * @return bool Whether the role has the given capability.
    9182     */
    9283    public function has_cap( $cap ) {
     
    9687         * @since 2.0.0
    9788         *
    98          * @param bool[] $capabilities Associative array of capabilities for the role.
     89         * @param bool[] $capabilities Array of key/value pairs where keys represent a capability name and boolean values
     90         *                             represent whether the role has that capability.
    9991         * @param string $cap          Capability name.
    10092         * @param string $name         Role name.
  • trunk/src/wp-includes/class-wp-user.php

    r47848 r48574  
    5454
    5555    /**
    56      * The individual capabilities the user has been given.
    57      *
    58      * @since 2.0.0
    59      * @var array
     56     * Capabilities that the individual user has been granted outside of those inherited from their role.
     57     *
     58     * @since 2.0.0
     59     * @var bool[] Array of key/value pairs where keys represent a capability name and boolean values
     60     *             represent whether the user has that capability.
    6061     */
    6162    public $caps = array();
     
    7374     *
    7475     * @since 2.0.0
    75      * @var array
     76     * @var string[]
    7677     */
    7778    public $roles = array();
  • trunk/src/wp-includes/comment.php

    r48235 r48574  
    561561 * @param WP_Comment $comment         Comment object.
    562562 * @param WP_User    $user            Comment author's user object. The user may not exist.
    563  * @param boolean    $cookies_consent Optional. Comment author's consent to store cookies. Default true.
     563 * @param bool       $cookies_consent Optional. Comment author's consent to store cookies. Default true.
    564564 */
    565565function wp_set_comment_cookies( $comment, $user, $cookies_consent = true ) {
  • trunk/src/wp-includes/embed.php

    r48109 r48574  
    133133 * @see WP_oEmbed
    134134 *
    135  * @param string  $format   The format of URL that this provider can handle. You can use asterisks
    136  *                          as wildcards.
    137  * @param string  $provider The URL to the oEmbed provider.
    138  * @param boolean $regex    Optional. Whether the `$format` parameter is in a RegEx format. Default false.
     135 * @param string $format   The format of URL that this provider can handle. You can use asterisks
     136 *                         as wildcards.
     137 * @param string $provider The URL to the oEmbed provider.
     138 * @param bool  $regex    Optional. Whether the `$format` parameter is in a RegEx format. Default false.
    139139 */
    140140function wp_oembed_add_provider( $format, $provider, $regex = false ) {
  • trunk/src/wp-includes/post-template.php

    r48573 r48574  
    15231523        $walker = new Walker_Page;
    15241524    } else {
     1525        /**
     1526         * @var Walker $walker
     1527         */
    15251528        $walker = $r['walker'];
    15261529    }
     
    15521555        $walker = new Walker_PageDropdown;
    15531556    } else {
     1557        /**
     1558         * @var Walker $walker
     1559         */
    15541560        $walker = $args[2]['walker'];
    15551561    }
  • trunk/src/wp-includes/sitemaps.php

    r48553 r48574  
    6262 * @param string               $name     Unique name for the sitemap provider.
    6363 * @param WP_Sitemaps_Provider $provider The `Sitemaps_Provider` instance implementing the sitemap.
    64  * @return bool Returns true if the sitemap was added. False on failure.
     64 * @return bool Whether the sitemap was added.
    6565 */
    6666function wp_register_sitemap_provider( $name, WP_Sitemaps_Provider $provider ) {
  • trunk/src/wp-includes/sitemaps/class-wp-sitemaps.php

    r48543 r48574  
    225225     *
    226226     * @param bool     $bypass Pass-through of the pre_handle_404 filter value.
    227      * @param WP_Query $query The WP_Query object.
     227     * @param WP_Query $query  The WP_Query object.
    228228     * @return bool Bypass value.
    229229     */
     
    251251     *
    252252     * @param string $output robots.txt output.
    253      * @param bool   $public Whether the site is public or not.
     253     * @param bool   $public Whether the site is public.
    254254     * @return string The robots.txt output.
    255255     */
  • trunk/src/wp-includes/widgets/class-wp-nav-menu-widget.php

    r48349 r48574  
    9696         * @since 4.4.0 Added the `$instance` parameter.
    9797         *
    98          * @param array    $nav_menu_args {
     98         * @param array   $nav_menu_args {
    9999         *     An array of arguments passed to wp_nav_menu() to retrieve a navigation menu.
    100100         *
     
    102102         *     @type mixed         $menu        Menu ID, slug, or name.
    103103         * }
    104          * @param WP_Term  $nav_menu      Nav menu object for the current menu.
    105          * @param array    $args          Display arguments for the current widget.
    106          * @param array    $instance      Array of settings for the current widget.
     104         * @param WP_Term $nav_menu      Nav menu object for the current menu.
     105         * @param array   $args          Display arguments for the current widget.
     106         * @param array   $instance      Array of settings for the current widget.
    107107         */
    108108        wp_nav_menu( apply_filters( 'widget_nav_menu_args', $nav_menu_args, $nav_menu, $args, $instance ) );
Note: See TracChangeset for help on using the changeset viewer.