Make WordPress Core

Changeset 55293


Ignore:
Timestamp:
02/07/2023 09:19:46 PM (4 years ago)
Author:
johnbillion
Message:

Docs: Miscellaneous improvements and corrections to docblocks.

See #56792

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r55276 r55293  
    388388         *     @type bool   $current Optional. Whether this is the currently selected view.
    389389         * }
    390          * @return array An array of link markup. Keys match the `$link_data` input array.
     390         * @return string[] An array of link markup. Keys match the `$link_data` input array.
    391391         */
    392392        protected function get_views_links( $link_data = array() ) {
  • trunk/src/wp-admin/includes/class-wp-screen.php

    r54665 r55293  
    145145         *
    146146         * @since 4.4.0
    147          * @var array
     147         * @var string[]
    148148         */
    149149        private $_screen_reader_content = array();
    … …  
    722722         * @see set_screen_reader_content() For more information on the array format.
    723723         *
    724          * @return array An associative array of screen reader text strings.
     724         * @return string[] An associative array of screen reader text strings.
    725725         */
    726726        public function get_screen_reader_content() {
  • trunk/src/wp-admin/includes/nav-menu.php

    r55276 r55293  
    11531153
    11541154/**
    1155  * Saves nav menu items
     1155 * Saves nav menu items.
    11561156 *
    11571157 * @since 3.6.0
    … …  
    11591159 * @param int|string $nav_menu_selected_id    ID, slug, or name of the currently-selected menu.
    11601160 * @param string     $nav_menu_selected_title Title of the currently-selected menu.
    1161  * @return array The menu updated message
     1161 * @return string[] The menu updated messages.
    11621162 */
    11631163function wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title ) {
  • trunk/src/wp-includes/cron.php

    r55170 r55293  
    7878         *
    7979         * @param null|bool|WP_Error $result   The value to return instead. Default null to continue adding the event.
    80          * @param stdClass           $event    {
     80         * @param object             $event    {
    8181         *     An object containing an event's data.
    8282         *
    … …  
    8585         *     @type string|false $schedule  How often the event should subsequently recur.
    8686         *     @type array        $args      Array containing each separate argument to pass to the hook's callback function.
    87          *     @type int          $interval  The interval time in seconds for the schedule. Only present for recurring events.
     87         *     @type int          $interval  Optional. The interval time in seconds for the schedule. Only present for recurring events.
    8888         * }
    8989         * @param bool               $wp_error Whether to return a WP_Error on failure.
    … …  
    165165         * @since 3.1.0
    166166         *
    167          * @param stdClass|false $event {
     167         * @param object|false $event {
    168168         *     An object containing an event's data, or boolean false to prevent the event from being scheduled.
    169169         *
    … …  
    172172         *     @type string|false $schedule  How often the event should subsequently recur.
    173173         *     @type array        $args      Array containing each separate argument to pass to the hook's callback function.
    174          *     @type int          $interval  The interval time in seconds for the schedule. Only present for recurring events.
     174         *     @type int          $interval  Optional. The interval time in seconds for the schedule. Only present for recurring events.
    175175         * }
    176176         */
    … …  
    386386         *
    387387         * @param null|bool|WP_Error $pre      Value to return instead. Default null to continue adding the event.
    388          * @param stdClass           $event    {
     388         * @param object             $event    {
    389389         *     An object containing an event's data.
    390390         *
    … …  
    723723 * @param int|null $timestamp Optional. Unix timestamp (UTC) of the event. If not specified, the next scheduled event
    724724 *                            is returned. Default null.
    725  * @return object|false The event object. False if the event does not exist.
     725 * @return object|false {
     726 *     The event object. False if the event does not exist.
     727 *
     728 *     @type string       $hook      Action hook to execute when the event is run.
     729 *     @type int          $timestamp Unix timestamp (UTC) for when to next run the event.
     730 *     @type string|false $schedule  How often the event should subsequently recur.
     731 *     @type array        $args      Array containing each separate argument to pass to the hook's callback function.
     732 *     @type int          $interval  Optional. The interval time in seconds for the schedule. Only present for recurring events.
     733 * }
    726734 */
    727735function wp_get_scheduled_event( $hook, $args = array(), $timestamp = null ) {
  • trunk/src/wp-includes/rest-api.php

    r55104 r55293  
    12931293 * @param string $date   RFC3339 timestamp.
    12941294 * @param bool   $is_utc Whether the provided date should be interpreted as UTC. Default false.
    1295  * @return array|null Local and UTC datetime strings, in MySQL datetime format (Y-m-d H:i:s),
    1296  *                    null on failure.
     1295 * @return array|null {
     1296 *     Local and UTC datetime strings, in MySQL datetime format (Y-m-d H:i:s),
     1297 *     null on failure.
     1298 *
     1299 *     @type string $0 Local datetime string.
     1300 *     @type string $1 UTC datetime string.
     1301 * }
    12971302 */
    12981303function rest_get_date_with_gmt( $date, $is_utc = false ) {
    … …  
    15501555
    15511556/**
    1552  * Converts an object-like value to an object.
     1557 * Converts an object-like value to an array.
    15531558 *
    15541559 * @since 5.5.0
    15551560 *
    15561561 * @param mixed $maybe_object The value being evaluated.
    1557  * @return array Returns the object extracted from the value.
     1562 * @return array Returns the object extracted from the value as an associative array.
    15581563 */
    15591564function rest_sanitize_object( $maybe_object ) {
    … …  
    15821587 * @since 5.5.0
    15831588 *
    1584  * @param mixed $value The value to check.
    1585  * @param array $types The list of possible types.
     1589 * @param mixed    $value The value to check.
     1590 * @param string[] $types The list of possible types.
    15861591 * @return string The best matching type, an empty string if no types match.
    15871592 */
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php

    r54123 r55293  
    361361         * @param WP_REST_Request $request   Full details about the request.
    362362         * @param string          $parameter Parameter name.
    363          * @return array|WP_Error List of valid subtypes, or WP_Error object on failure.
     363         * @return string[]|WP_Error List of valid subtypes, or WP_Error object on failure.
    364364         */
    365365        public function sanitize_subtypes( $subtypes, $request, $parameter ) {
  • trunk/src/wp-includes/rest-api/search/class-wp-rest-search-handler.php

    r54133 r55293  
    3838         *
    3939         * @since 5.0.0
    40          * @var array
     40         * @var string[]
    4141         */
    4242        protected $subtypes = array();
    … …  
    5858         * @since 5.0.0
    5959         *
    60          * @return array Array of object subtype identifiers.
     60         * @return string[] Array of object subtype identifiers.
    6161         */
    6262        public function get_subtypes() {
Note: See TracChangeset for help on using the changeset viewer.