WordPress.org

Make WordPress Core

Changeset 49120


Ignore:
Timestamp:
10/10/2020 08:00:30 PM (14 months ago)
Author:
johnbillion
Message:

Docs: Standardise the type name for booleans and integers.

This brings these docs inline with the documentation standards.

Props ravipatel, justinahinon

Fixes #51426

Location:
trunk/src
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/media.php

    r49108 r49120  
    177177 *
    178178 * @param string  $html    The image HTML markup to send.
    179  * @param integer $id      Image attachment ID.
     179 * @param int    $id      Image attachment ID.
    180180 * @param string  $caption Image caption.
    181181 * @param string  $title   Image title attribute (not used).
     
    13201320 *
    13211321 * @param string  $html
    1322  * @param integer $attachment_id
     1322 * @param int    $attachment_id
    13231323 * @param array   $attachment
    13241324 * @return string
     
    22762276 * @param string  $type
    22772277 * @param object  $errors
    2278  * @param integer $id
     2278 * @param int    $id
    22792279 */
    22802280function media_upload_type_form( $type = 'file', $errors = null, $id = null ) {
     
    23502350 * @param string  $type
    23512351 * @param object  $errors
    2352  * @param integer $id
     2352 * @param int    $id
    23532353 */
    23542354function media_upload_type_url_form( $type = null, $errors = null, $id = null ) {
  • trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php

    r49108 r49120  
    129129 * @since Twenty Fourteen 1.0
    130130 *
    131  * @return boolean true if blog has more than 1 category
     131 * @return bool true if blog has more than 1 category
    132132 */
    133133function twentyfourteen_categorized_blog() {
  • trunk/src/wp-content/themes/twentyseventeen/inc/template-tags.php

    r48104 r49120  
    128128 *
    129129 * @param WP_Customize_Partial $partial Partial associated with a selective refresh request.
    130  * @param integer              $id Front page section to display.
     130 * @param int                  $id Front page section to display.
    131131 */
    132132function twentyseventeen_front_page_section( $partial = null, $id = 0 ) {
  • trunk/src/wp-content/themes/twentythirteen/functions.php

    r48782 r49120  
    516516     * @since Twenty Thirteen 1.0
    517517     *
    518      * @param boolean $echo (optional) Whether to echo the date. Default true.
     518     * @param bool $echo (optional) Whether to echo the date. Default true.
    519519     * @return string The HTML-formatted post date.
    520520     */
  • trunk/src/wp-content/themes/twentytwenty/inc/template-tags.php

    r48199 r49120  
    2727 *
    2828 * @param array   $args Arguments for displaying the site logo either as an image or text.
    29  * @param boolean $echo Echo or return the HTML.
     29 * @param bool    $echo Echo or return the HTML.
    3030 * @return string Compiled HTML based on our arguments.
    3131 */
     
    8989 * Displays the site description.
    9090 *
    91  * @param boolean $echo Echo or return the html.
     91 * @param bool $echo Echo or return the html.
    9292 * @return string The HTML to display.
    9393 */
  • trunk/src/wp-includes/Text/Diff.php

    r32990 r49120  
    7676     * @since Text_Diff 1.1.0
    7777     *
    78      * @return integer The number of new lines
     78     * @return int The number of new lines
    7979     */
    8080    function countAddedLines()
     
    9595     * @since Text_Diff 1.1.0
    9696     *
    97      * @return integer The number of deleted lines
     97     * @return int The number of deleted lines
    9898     */
    9999    function countDeletedLines()
     
    140140     * Checks for an empty diff.
    141141     *
    142      * @return boolean True if two sequences were identical.
     142     * @return bool True if two sequences were identical.
    143143     */
    144144    function isEmpty()
     
    157157     * This is mostly for diagnostic purposes.
    158158     *
    159      * @return integer The length of the LCS.
     159     * @return int The length of the LCS.
    160160     */
    161161    function lcs()
     
    211211     *
    212212     * @param string $line  The line to trim.
    213      * @param integer $key  The index of the line in the array. Not used.
     213     * @param int    $key   The index of the line in the array. Not used.
    214214     */
    215215    static function trimNewlines(&$line, $key)
  • trunk/src/wp-includes/blocks.php

    r48794 r49120  
    813813 *                                 label, style (name of the stylesheet to be enqueued),
    814814 *                                 inline_style (string containing the CSS to be added).
    815  * @return boolean True if the block style was registered with success and false otherwise.
     815 * @return bool True if the block style was registered with success and false otherwise.
    816816 */
    817817function register_block_style( $block_name, $style_properties ) {
     
    826826 * @param string $block_name       Block type name including namespace.
    827827 * @param array  $block_style_name Block style name.
    828  * @return boolean True if the block style was unregistered with success and false otherwise.
     828 * @return bool True if the block style was unregistered with success and false otherwise.
    829829 */
    830830function unregister_block_style( $block_name, $block_style_name ) {
  • trunk/src/wp-includes/class-http.php

    r49108 r49120  
    10771077     *
    10781078     * @param string $maybe_ip A suspected IP address.
    1079      * @return integer|bool Upon success, '4' or '6' to represent a IPv4 or IPv6 address, false upon failure
     1079     * @return int|bool Upon success, '4' or '6' to represent a IPv4 or IPv6 address, false upon failure
    10801080     */
    10811081    public static function is_ip_address( $maybe_ip ) {
  • trunk/src/wp-includes/class-wp-block-styles-registry.php

    r48198 r49120  
    3939     *                                 style (name of the stylesheet to be enqueued),
    4040     *                                 inline_style (string containing the CSS to be added).
    41      * @return boolean True if the block style was registered with success and false otherwise.
     41     * @return bool True if the block style was registered with success and false otherwise.
    4242     */
    4343    public function register( $block_name, $style_properties ) {
     
    7070     * @param string $block_name       Block type name including namespace.
    7171     * @param string $block_style_name Block style name.
    72      * @return boolean True if the block style was unregistered with success and false otherwise.
     72     * @return bool True if the block style was unregistered with success and false otherwise.
    7373     */
    7474    public function unregister( $block_name, $block_style_name ) {
  • trunk/src/wp-includes/class-wp-block-type.php

    r48969 r49120  
    193193     * @since 5.0.0
    194194     *
    195      * @return boolean Whether block type is dynamic.
     195     * @return bool Whether block type is dynamic.
    196196     */
    197197    public function is_dynamic() {
  • trunk/src/wp-includes/class-wp-hook.php

    r47219 r49120  
    491491     * @link https://www.php.net/manual/en/iterator.valid.php
    492492     *
    493      * @return boolean
     493     * @return bool Whether the current position is valid.
    494494     */
    495495    public function valid() {
  • trunk/src/wp-includes/class-wp-http-requests-hooks.php

    r48586 r49120  
    4646     * @param string $hook       Hook name.
    4747     * @param array  $parameters Parameters to pass to callbacks.
    48      * @return boolean True if hooks were run, false if nothing was hooked.
     48     * @return bool True if hooks were run, false if nothing was hooked.
    4949     */
    5050    public function dispatch( $hook, $parameters = array() ) {
  • trunk/src/wp-includes/class-wp-simplepie-file.php

    r47122 r49120  
    2424     *
    2525     * @param string       $url             Remote file URL.
    26      * @param integer      $timeout         Optional. How long the connection should stay open in seconds.
     26     * @param int          $timeout         Optional. How long the connection should stay open in seconds.
    2727     *                                      Default 10.
    28      * @param integer      $redirects       Optional. The number of allowed redirects. Default 5.
     28     * @param int          $redirects       Optional. The number of allowed redirects. Default 5.
    2929     * @param string|array $headers         Optional. Array or string of headers to send with the request.
    3030     *                                      Default null.
    3131     * @param string       $useragent       Optional. User-agent value sent. Default null.
    32      * @param boolean      $force_fsockopen Optional. Whether to force opening internet or unix domain socket
     32     * @param bool         $force_fsockopen Optional. Whether to force opening internet or unix domain socket
    3333     *                                      connection or not. Default false.
    3434     */
  • trunk/src/wp-includes/class-wp-simplepie-sanitize-kses.php

    r47219 r49120  
    2828     *
    2929     * @param mixed   $data The data that needs to be sanitized.
    30      * @param integer $type The type of data that it's supposed to be.
     30     * @param int    $type The type of data that it's supposed to be.
    3131     * @param string  $base Optional. The `xml:base` value to use when converting relative
    3232     *                      URLs to absolute ones. Default empty.
  • trunk/src/wp-includes/class-wp-widget.php

    r48580 r49120  
    545545     * @since 2.8.0
    546546     *
    547      * @param integer $number Optional. The unique order number of this widget instance
    548      *                        compared to other instances of the same class. Default -1.
     547     * @param int $number Optional. The unique order number of this widget instance
     548     *                    compared to other instances of the same class. Default -1.
    549549     */
    550550    public function _register_one( $number = -1 ) {
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r49108 r49120  
    55755575     * @since 2.8.0
    55765576     *
    5577      * @param integer $post_ID   Post ID.
    5578      * @param array   $enclosure Enclosure data.
     5577     * @param int  $post_ID   Post ID.
     5578     * @param array $enclosure Enclosure data.
    55795579     */
    55805580    public function add_enclosure_if_new( $post_ID, $enclosure ) {
  • trunk/src/wp-includes/pomo/po.php

    r48590 r49120  
    284284        /**
    285285         * @param string $filename
    286          * @return boolean
     286         * @return bool
    287287         */
    288288        function import_from_file( $filename ) {
     
    455455         * @param resource $f
    456456         * @param string   $action
    457          * @return boolean
     457         * @return bool
    458458         */
    459459        function read_line( $f, $action = 'read' ) {
  • trunk/src/wp-includes/pomo/streams.php

    r47902 r49120  
    6363         * Reads an array of 32-bit Integers from the Stream
    6464         *
    65          * @param integer $count How many elements should be read
     65         * @param int $count How many elements should be read
    6666         * @return mixed Array of integers or false if there isn't
    6767         *  enough data or on error
     
    176176        /**
    177177         * @param int $pos
    178          * @return boolean
     178         * @return bool
    179179         */
    180180        function seekto( $pos ) {
  • trunk/src/wp-includes/pomo/translations.php

    r47808 r49120  
    117117         * from their headers.
    118118         *
    119          * @param integer $count number of items
     119         * @param int $count number of items
    120120         */
    121121        function select_plural_form( $count ) {
  • trunk/src/wp-includes/rest-api.php

    r49109 r49120  
    12451245 * @since 4.7.0
    12461246 *
    1247  * @return integer 401 if the user is not logged in, 403 if the user is logged in.
     1247 * @return int 401 if the user is not logged in, 403 if the user is logged in.
    12481248 */
    12491249function rest_authorization_required_code() {
     
    13421342 *
    13431343 * @param bool|string|int $value The value being evaluated.
    1344  * @return boolean Returns the proper associated boolean value.
     1344 * @return bool Returns the proper associated boolean value.
    13451345 */
    13461346function rest_sanitize_boolean( $value ) {
     
    13631363 *
    13641364 * @param bool|string $maybe_bool The value being evaluated.
    1365  * @return boolean True if a boolean, otherwise false.
     1365 * @return bool True if a boolean, otherwise false.
    13661366 */
    13671367function rest_is_boolean( $maybe_bool ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r48782 r49120  
    13711371     * @since 4.9.0 Added the `$validate` parameter.
    13721372     *
    1373      * @param string  $template Page template filename.
    1374      * @param integer $post_id  Post ID.
    1375      * @param bool    $validate Whether to validate that the template selected is valid.
     1373     * @param string $template Page template filename.
     1374     * @param int    $post_id  Post ID.
     1375     * @param bool   $validate Whether to validate that the template selected is valid.
    13761376     */
    13771377    public function handle_template( $template, $post_id, $validate = false ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

    r48782 r49120  
    11741174     * @since 4.7.0
    11751175     *
    1176      * @param integer $user_id User ID.
    1177      * @param array   $roles   New user roles.
     1176     * @param int  $user_id User ID.
     1177     * @param array $roles   New user roles.
    11781178     * @return true|WP_Error True if the current user is allowed to make the role change,
    11791179     *                       otherwise a WP_Error object.
  • trunk/src/wp-includes/widgets/class-wp-widget-custom-html.php

    r48782 r49120  
    5959     * @since 4.9.0
    6060     *
    61      * @param integer $number Optional. The unique order number of this widget instance
    62      *                        compared to other instances of the same class. Default -1.
     61     * @param int $number Optional. The unique order number of this widget instance
     62     *                    compared to other instances of the same class. Default -1.
    6363     */
    6464    public function _register_one( $number = -1 ) {
  • trunk/src/wp-includes/widgets/class-wp-widget-media.php

    r49108 r49120  
    9797     * @since 4.8.0
    9898     *
    99      * @param integer $number Optional. The unique order number of this widget instance
    100      *                        compared to other instances of the same class. Default -1.
     99     * @param int $number Optional. The unique order number of this widget instance
     100     *                    compared to other instances of the same class. Default -1.
    101101     */
    102102    public function _register_one( $number = -1 ) {
  • trunk/src/wp-includes/widgets/class-wp-widget-text.php

    r48782 r49120  
    4646     * Add hooks for enqueueing assets when registering all widget instances of this widget class.
    4747     *
    48      * @param integer $number Optional. The unique order number of this widget instance
    49      *                        compared to other instances of the same class. Default -1.
     48     * @param int $number Optional. The unique order number of this widget instance
     49     *                    compared to other instances of the same class. Default -1.
    5050     */
    5151    public function _register_one( $number = -1 ) {
Note: See TracChangeset for help on using the changeset viewer.