Make WordPress Core

Changeset 58075


Ignore:
Timestamp:
05/02/2024 01:17:45 PM (2 years ago)
Author:
johnbillion
Message:

Docs: Various docblock improvements.

See #60699

Location:
trunk/src
Files:
9 edited

Legend:

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

    r58069 r58075  
    557557
    558558/**
    559  * Flushes rewrite rules if siteurl, home or page_on_front changed.
     559 * Flushes rewrite rules if `siteurl`, `home` or `page_on_front` changed.
    560560 *
    561561 * @since 2.1.0
     
    577577
    578578/**
    579  * Resets global variables based on $_GET and $_POST.
     579 * Resets global variables based on `$_GET` and `$_POST`.
    580580 *
    581581 * This function resets global variables based on the names passed
    582  * in the $vars array to the value of $_POST[$var] or $_GET[$var] or ''
    583  * if neither is defined.
     582 * in the `$vars` array to the value of `$_POST[$var]` or `$_GET[$var]` or an
     583 * empty string if neither is defined.
    584584 *
    585585 * @since 2.0.0
     
    755755                                 * Filters a screen option value before it is set.
    756756                                 *
    757                                  * The filter can also be used to modify non-standard [items]_per_page
     757                                 * The filter can also be used to modify non-standard `[items]_per_page`
    758758                                 * settings. See the parent function for a full list of standard options.
    759759                                 *
     
    13051305
    13061306/**
    1307  * Adds the latest Heartbeat and REST-API nonce to the Heartbeat response.
     1307 * Adds the latest Heartbeat and REST API nonce to the Heartbeat response.
    13081308 *
    13091309 * @since 5.0.0
     
    13991399
    14001400        /**
    1401          * Filters the admin canonical url value.
     1401         * Filters the admin canonical URL value.
    14021402         *
    14031403         * @since 6.5.0
    14041404         *
    1405          * @param string $filtered_url The admin canonical url value.
     1405         * @param string $filtered_url The admin canonical URL value.
    14061406         */
    14071407        $filtered_url = apply_filters( 'wp_admin_canonical_url', $filtered_url );
  • trunk/src/wp-includes/block-bindings.php

    r58073 r58075  
    8888 *                                             The callback has a mixed return type; it may return a string to override
    8989 *                                             the block's original value, null, false to remove an attribute, etc.
    90  *     @type array    $uses_context (optional) Array of values to add to block `uses_context` needed by the source.
     90 *     @type string[] $uses_context (optional) Array of values to add to block `uses_context` needed by the source.
    9191 * }
    9292 * @return WP_Block_Bindings_Source|false Source when the registration was successful, or `false` on failure.
  • trunk/src/wp-includes/class-wp-block-bindings-registry.php

    r58073 r58075  
    3737         *
    3838         * @since 6.5.0
    39          * @var array
     39         * @var string[]
    4040         */
    4141        private $allowed_source_properties = array(
     
    4949         *
    5050         * @since 6.5.0
    51          * @var array
     51         * @var string[]
    5252         */
    5353        private $supported_blocks = array(
     
    9191         *                                             The callback has a mixed return type; it may return a string to override
    9292         *                                             the block's original value, null, false to remove an attribute, etc.
    93          *     @type array    $uses_context (optional) Array of values to add to block `uses_context` needed by the source.
     93         *     @type string[] $uses_context (optional) Array of values to add to block `uses_context` needed by the source.
    9494         * }
    9595         * @return WP_Block_Bindings_Source|false Source when the registration was successful, or `false` on failure.
  • trunk/src/wp-includes/class-wp-block-bindings-source.php

    r57641 r58075  
    3737        public $label;
    3838
    39 
    4039        /**
    4140         * The function used to get the value from the source.
     
    5049         *
    5150         * @since 6.5.0
    52          * @var array|null
     51         * @var string[]|null
    5352         */
    5453        public $uses_context = null;
  • trunk/src/wp-includes/class-wp-script-modules.php

    r57840 r58075  
    1919         *
    2020         * @since 6.5.0
    21          * @var array
     21         * @var array[]
    2222         */
    2323        private $registered = array();
     
    275275         * @since 6.5.0
    276276         *
    277          * @return array Script modules marked for enqueue, keyed by script module identifier.
     277         * @return array[] Script modules marked for enqueue, keyed by script module identifier.
    278278         */
    279279        private function get_marked_for_enqueue(): array {
     
    297297         * @since 6.5.0
    298298         *
    299 
    300299         * @param string[] $ids          The identifiers of the script modules for which to gather dependencies.
    301          * @param array    $import_types Optional. Import types of dependencies to retrieve: 'static', 'dynamic', or both.
     300         * @param string[] $import_types Optional. Import types of dependencies to retrieve: 'static', 'dynamic', or both.
    302301         *                               Default is both.
    303          * @return array List of dependencies, keyed by script module identifier.
     302         * @return array[] List of dependencies, keyed by script module identifier.
    304303         */
    305304        private function get_dependencies( array $ids, array $import_types = array( 'static', 'dynamic' ) ) {
     
    354353                 * @since 6.5.0
    355354                 *
    356                  * @param string $src Module source url.
     355                 * @param string $src Module source URL.
    357356                 * @param string $id  Module identifier.
    358357                 */
  • trunk/src/wp-includes/cron.php

    r57239 r58075  
    660660         *
    661661         * For plugins replacing wp-cron, return the number of events successfully
    662          * unscheduled (zero if no events were registered with the hook) or false
    663          * if unscheduling one or more events fails.
     662         * unscheduled (zero if no events were registered with the hook). If unscheduling
     663         * one or more events fails then return either a WP_Error object or false depending
     664         * on the value of the `$wp_error` parameter.
    664665         *
    665666         * @since 5.1.0
     
    10481049 *
    10491050 * The 'interval' is a number in seconds of when the cron job should run.
    1050  * So for 'hourly' the time is `HOUR_IN_SECONDS` (60 * 60 or 3600). For 'monthly',
    1051  * the value would be `MONTH_IN_SECONDS` (30 * 24 * 60 * 60 or 2592000).
     1051 * So for 'hourly' the time is `HOUR_IN_SECONDS` (`60 * 60` or `3600`). For 'monthly',
     1052 * the value would be `MONTH_IN_SECONDS` (`30 * 24 * 60 * 60` or `2592000`).
    10521053 *
    10531054 * The 'display' is the description. For the 'monthly' key, the 'display'
    10541055 * would be `__( 'Once Monthly' )`.
    10551056 *
    1056  * For your plugin, you will be passed an array. You can easily add your
    1057  * schedule by doing the following.
     1057 * For your plugin, you will be passed an array. You can add your
     1058 * schedule by doing the following:
    10581059 *
    10591060 *     // Filter parameter variable name is 'array'.
  • trunk/src/wp-includes/fonts/class-wp-font-face.php

    r56500 r58075  
    257257         * @since 6.4.0
    258258         *
    259          * @param array $font_faces The font-faces to generate @font-face CSS styles.
     259         * @param array[] $font_faces The font-faces to generate @font-face CSS styles.
    260260         * @return string The `@font-face` CSS styles.
    261261         */
  • trunk/src/wp-includes/fonts/class-wp-font-utils.php

    r58073 r58075  
    245245         * @access private
    246246         *
    247          * @return array A collection of mime types keyed by file extension.
     247         * @return string[] A collection of mime types keyed by file extension.
    248248         */
    249249        public static function get_allowed_font_mime_types() {
  • trunk/src/wp-includes/option.php

    r57920 r58075  
    30353035 * @since 6.6.0
    30363036 *
    3037  * @return array The values that trigger autoloading.
     3037 * @return string[] The values that trigger autoloading.
    30383038 */
    30393039function wp_autoload_values_to_autoload() {
     
    30473047         * @since 6.6.0
    30483048         *
    3049          * @param array $autoload_values Autoload values used to autoload option.
     3049         * @param string[] $autoload_values Autoload values used to autoload option.
    30503050         *                               Default list contains 'yes', 'on', 'auto-on', and 'auto'.
    30513051         */
Note: See TracChangeset for help on using the changeset viewer.