Make WordPress Core

Changeset 56414


Ignore:
Timestamp:
08/18/2023 05:27:16 PM (9 months ago)
Author:
johnbillion
Message:

Docs: Miscellaneous docblock corrections and improvements.

See #58833

Location:
trunk/src
Files:
13 edited

Legend:

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

    r56176 r56414  
    855855 *                                      Default false.
    856856 * @param bool            $silent       Prevent calling activation hooks. Default false.
    857  * @return bool|WP_Error True when finished or WP_Error if there were errors during a plugin activation.
     857 * @return true|WP_Error True when finished or WP_Error if there were errors during a plugin activation.
    858858 */
    859859function activate_plugins( $plugins, $redirect = '', $network_wide = false, $silent = false ) {
     
    24412441 * @param string $plugin   Single plugin to resume.
    24422442 * @param string $redirect Optional. URL to redirect to. Default empty string.
    2443  * @return bool|WP_Error True on success, false if `$plugin` was not paused,
     2443 * @return true|WP_Error True on success, false if `$plugin` was not paused,
    24442444 *                       `WP_Error` on failure.
    24452445 */
  • trunk/src/wp-admin/includes/schema.php

    r56176 r56414  
    980980 * @param bool   $subdomain_install Optional. Whether the network is a subdomain installation or a subdirectory installation.
    981981 *                                  Default false, meaning the network is a subdirectory installation.
    982  * @return bool|WP_Error True on success, or WP_Error on warning (with the installation otherwise successful,
     982 * @return true|WP_Error True on success, or WP_Error on warning (with the installation otherwise successful,
    983983 *                       so the error code must be checked) or failure.
    984984 */
  • trunk/src/wp-includes/block-supports/utils.php

    r53076 r56414  
    1919 * @param string        $feature     Optional name of individual feature to check.
    2020 *
    21  * @return boolean Whether to serialize block support styles & classes.
     21 * @return bool Whether to serialize block support styles & classes.
    2222 */
    2323function wp_should_skip_block_supports_serialization( $block_type, $feature_set, $feature = null ) {
  • trunk/src/wp-includes/block-template-utils.php

    r56413 r56414  
    309309 *     Arguments to retrieve templates. Optional, empty by default.
    310310 *
    311  *     @type array $slug__in     List of slugs to include.
    312  *     @type array $slug__not_in List of slugs to skip.
    313  *     @type string $area         A 'wp_template_part_area' taxonomy value to filter by (for 'wp_template_part' template type only).
    314  *     @type string $post_type    Post type to get the templates for.
     311 *     @type string[] $slug__in     List of slugs to include.
     312 *     @type string[] $slug__not_in List of slugs to skip.
     313 *     @type string   $area         A 'wp_template_part_area' taxonomy value to filter by (for 'wp_template_part' template type only).
     314 *     @type string   $post_type    Post type to get the templates for.
    315315 * }
    316316 *
  • trunk/src/wp-includes/class-wp-block-type.php

    r55673 r56414  
    334334     * @param string $name Deprecated property name.
    335335     *
    336      * @return boolean Returns true when for the new property the first item in the array exists,
    337      *                     or false otherwise.
     336     * @return bool Returns true when for the new property the first item in the array exists,
     337     *              or false otherwise.
    338338     */
    339339    public function __isset( $name ) {
  • trunk/src/wp-includes/class-wp-navigation-fallback.php

    r56257 r56414  
    3232         * @since 6.3.0
    3333         *
    34          * @param bool Whether to create a fallback navigation menu. Default true.
     34         * @param bool $create Whether to create a fallback navigation menu. Default true.
    3535         */
    3636        $should_create_fallback = apply_filters( 'wp_navigation_should_create_fallback', true );
  • trunk/src/wp-includes/class-wp-theme-json.php

    r56382 r56414  
    26862686     * @param array      $path       Path to inspect.
    26872687     * @param bool|array $override   Data to compute whether to override the preset.
    2688      * @return boolean
     2688     * @return bool
    26892689     */
    26902690    protected static function should_override_preset( $theme_json, $path, $override ) {
  • trunk/src/wp-includes/cron.php

    r56394 r56414  
    5858
    5959    /**
    60      * Filter to preflight or hijack scheduling an event.
     60     * Filter to override scheduling an event.
    6161     *
    6262     * Returning a non-null value will short-circuit adding the event to the
     
    377377
    378378    /**
    379      * Filter to preflight or hijack rescheduling of a recurring event.
     379     * Filter to override rescheduling of a recurring event.
    380380     *
    381381     * Returning a non-null value will short-circuit the normal rescheduling
     
    474474
    475475    /**
    476      * Filter to preflight or hijack unscheduling of events.
     476     * Filter to override unscheduling of events.
    477477     *
    478478     * Returning a non-null value will short-circuit the normal unscheduling
     
    527527 * Unschedules all events attached to the hook with the specified arguments.
    528528 *
    529  * Warning: This function may return Boolean FALSE, but may also return a non-Boolean
    530  * value which evaluates to FALSE. For information about casting to booleans see the
     529 * Warning: This function may return boolean false, but may also return a non-boolean
     530 * value which evaluates to false. For information about casting to booleans see the
    531531 * {@link https://www.php.net/manual/en/language.types.boolean.php PHP documentation}. Use
    532532 * the `===` operator for testing the return value of this function.
     
    564564
    565565    /**
    566      * Filter to preflight or hijack clearing a scheduled hook.
     566     * Filter to override clearing a scheduled hook.
    567567     *
    568568     * Returning a non-null value will short-circuit the normal unscheduling
     
    638638 * Can be useful for plugins when deactivating to clean up the cron queue.
    639639 *
    640  * Warning: This function may return Boolean FALSE, but may also return a non-Boolean
    641  * value which evaluates to FALSE. For information about casting to booleans see the
     640 * Warning: This function may return boolean false, but may also return a non-boolean
     641 * value which evaluates to false. For information about casting to booleans see the
    642642 * {@link https://www.php.net/manual/en/language.types.boolean.php PHP documentation}. Use
    643643 * the `===` operator for testing the return value of this function.
     
    654654function wp_unschedule_hook( $hook, $wp_error = false ) {
    655655    /**
    656      * Filter to preflight or hijack clearing all events attached to the hook.
     656     * Filter to override clearing all events attached to the hook.
    657657     *
    658658     * Returning a non-null value will short-circuit the normal unscheduling
     
    750750function wp_get_scheduled_event( $hook, $args = array(), $timestamp = null ) {
    751751    /**
    752      * Filter to preflight or hijack retrieving a scheduled event.
     752     * Filter to override retrieving a scheduled event.
    753753     *
    754754     * Returning a non-null value will short-circuit the normal process,
     
    966966 * @since 5.7.0 Functionality moved to _wp_cron() to which this becomes a wrapper.
    967967 *
    968  * @return bool|int|void On success an integer indicating number of events spawned (0 indicates no
    969  *                       events needed to be spawned), false if spawning fails for one or more events or
    970  *                       void if the function registered _wp_cron() to run on the action.
     968 * @return false|int|void On success an integer indicating number of events spawned (0 indicates no
     969 *                        events needed to be spawned), false if spawning fails for one or more events or
     970 *                        void if the function registered _wp_cron() to run on the action.
    971971 */
    972972function wp_cron() {
     
    11611161function wp_get_ready_cron_jobs() {
    11621162    /**
    1163      * Filter to preflight or hijack retrieving ready cron jobs.
     1163     * Filter to override retrieving ready cron jobs.
    11641164     *
    11651165     * Returning an array will short-circuit the normal retrieval of ready
  • trunk/src/wp-includes/functions.php

    r56326 r56414  
    86018601 * @param int|float $expected  The expected value.
    86028602 * @param int|float $actual    The actual number.
    8603  * @param int|float $precision The allowed variation.
     8603 * @param int|float $precision Optional. The allowed variation. Default 1.
    86048604 * @return bool Whether the numbers match within the specified precision.
    86058605 */
  • trunk/src/wp-includes/functions.wp-scripts.php

    r56033 r56414  
    7474 * Called by admin-header.php and {@see 'wp_head'} hook. Since it is called by wp_head on every page load,
    7575 * the function does not instantiate the WP_Scripts object unless script names are explicitly passed.
    76  * Makes use of already-instantiated $wp_scripts global if present. Use provided {@see 'wp_print_scripts'}
     76 * Makes use of already-instantiated `$wp_scripts` global if present. Use provided {@see 'wp_print_scripts'}
    7777 * hook to register/enqueue new scripts.
    7878 *
     
    114114 *
    115115 * Code will only be added if the script is already in the queue.
    116  * Accepts a string $data containing the Code. If two or more code blocks
    117  * are added to the same script $handle, they will be printed in the order
     116 * Accepts a string `$data` containing the code. If two or more code blocks
     117 * are added to the same script `$handle`, they will be printed in the order
    118118 * they were added, i.e. the latter added code can redeclare the previous.
    119119 *
     
    202202 * Works only if the script has already been registered.
    203203 *
    204  * Accepts an associative array $l10n and creates a JavaScript object:
    205  *
    206  *     "$object_name" = {
     204 * Accepts an associative array `$l10n` and creates a JavaScript object:
     205 *
     206 *     "$object_name": {
    207207 *         key: value,
    208208 *         key: value,
     
    338338 * Enqueues a script.
    339339 *
    340  * Registers the script if $src provided (does NOT overwrite), and enqueues it.
     340 * Registers the script if `$src` provided (does NOT overwrite), and enqueues it.
    341341 *
    342342 * @see WP_Dependencies::add()
  • trunk/src/wp-includes/l10n.php

    r56003 r56414  
    15181518 *     @type string   $id                           ID attribute of the select element. Default 'locale'.
    15191519 *     @type string   $name                         Name attribute of the select element. Default 'locale'.
    1520  *     @type array    $languages                    List of installed languages, contain only the locales.
     1520 *     @type string[] $languages                    List of installed languages, contain only the locales.
    15211521 *                                                  Default empty array.
    15221522 *     @type array    $translations                 List of available translations. Default result of
  • trunk/src/wp-includes/post.php

    r56200 r56414  
    49754975 * @since 5.7.0
    49764976 *
    4977  * @param string $post_date     The date in mysql format.
    4978  * @param string $post_date_gmt The GMT date in mysql format.
     4977 * @param string $post_date     The date in mysql format (`Y-m-d H:i:s`).
     4978 * @param string $post_date_gmt The GMT date in mysql format (`Y-m-d H:i:s`).
    49794979 * @return string|false A valid Gregorian-calendar date string, or false on failure.
    49804980 */
  • trunk/src/wp-includes/theme.php

    r56194 r56414  
    42694269 * @since 5.9.0
    42704270 *
    4271  * @return boolean Whether the active theme is a block-based theme or not.
     4271 * @return bool Whether the active theme is a block-based theme or not.
    42724272 */
    42734273function wp_is_block_theme() {
Note: See TracChangeset for help on using the changeset viewer.