WordPress build repository browser

Changeset 60582


Ignore:
Timestamp:
11/19/2025 06:17:32 AM (6 days ago)
Author:
westonruter
Message:

Docs: Add missing descriptions and fix types for some @return tags.

Props huzaifaalmesbah, sabernhardt, westonruter.
See #64224.
Fixes #64262.

Built from https://develop.svn.wordpress.org/trunk@61270

Location:
trunk
Files:
10 edited

Legend:

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

    r60559 r60582  
    22772277 *
    22782278 * @param array $options
    2279  * @return array
     2279 * @return array Updated allowed options.
    22802280 */
    22812281function option_update_filter( $options ) {
     
    22982298 * @param array        $new_options
    22992299 * @param string|array $options
    2300  * @return array
     2300 * @return array Updated allowed options.
    23012301 */
    23022302function add_allowed_options( $new_options, $options = '' ) {
     
    23332333 * @param array        $del_options
    23342334 * @param string|array $options
    2335  * @return array
     2335 * @return array Updated allowed options.
    23362336 */
    23372337function remove_allowed_options( $del_options, $options = '' ) {
  • trunk/wp-admin/includes/upgrade.php

    r60342 r60582  
    28322832 *
    28332833 * @param string $setting Option name.
    2834  * @return mixed
     2834 * @return mixed Option value.
    28352835 */
    28362836function __get_option( $setting ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
     
    33753375 * @param string $theme_name The name of the theme.
    33763376 * @param string $template   The directory name of the theme.
    3377  * @return bool
     3377 * @return bool True on success, false on failure.
    33783378 */
    33793379function make_site_theme_from_oldschool( $theme_name, $template ) {
  • trunk/wp-admin/includes/user.php

    r59238 r60582  
    307307 *
    308308 * @param int $user_id User ID.
    309  * @return array
     309 * @return object[] The user's draft posts, with 'ID' and 'post_title' keys.
    310310 */
    311311function get_users_drafts( $user_id ) {
     
    604604 *
    605605 * @param string $text
    606  * @return string
     606 * @return string User site invitation email message.
    607607 */
    608608function admin_created_user_email( $text ) {
  • trunk/wp-admin/includes/widgets.php

    r56061 r60582  
    7070 * @param array $a First array.
    7171 * @param array $b Second array.
    72  * @return int
     72 * @return int Comparison result.
    7373 */
    7474function _sort_name_callback( $a, $b ) {
     
    130130 *
    131131 * @param array $params
    132  * @return array
     132 * @return array Widget control arguments.
    133133 */
    134134function wp_list_widget_controls_dynamic_sidebar( $params ) {
     
    158158 *
    159159 * @param string $id_base
    160  * @return int
     160 * @return int Next available widget ID number.
    161161 */
    162162function next_widget_id_number( $id_base ) {
     
    186186 *
    187187 * @param array $sidebar_args
    188  * @return array
     188 * @return array Passed through value of `$sidebar_args` param.
    189189 */
    190190function wp_widget_control( $sidebar_args ) {
     
    323323/**
    324324 * @param string $classes
    325  * @return string
     325 * @return string Modified body classes.
    326326 */
    327327function wp_widgets_access_body_class( $classes ) {
  • trunk/wp-includes/block-supports/elements.php

    r57555 r60582  
    2828 * @param  array $block   Block object.
    2929 * @param  array $options Per element type options e.g. whether to skip serialization.
    30  * @return boolean Whether the block needs an elements class name.
     30 * @return bool Whether the block needs an elements class name.
    3131 */
    3232function wp_should_add_elements_class_name( $block, $options ) {
  • trunk/wp-includes/class-wp-theme-json-resolver.php

    r58724 r60582  
    682682     * @since 5.9.0
    683683     *
    684      * @return integer|null
     684     * @return int|null ID for a post of type `wp_global_styles`, or null if not available.
    685685     */
    686686    public static function get_user_global_styles_post_id() {
     
    705705     * @deprecated 6.2.0 Use wp_theme_has_theme_json() instead.
    706706     *
    707      * @return bool
     707     * @return bool Whether the active theme has a theme.json file.
    708708     */
    709709    public static function theme_has_support() {
     
    781781     * @param array  $variation Theme.json shaped style variation object.
    782782     * @param string $scope     Scope to check e.g. theme, block etc.
    783      * @return boolean
     783     * @return bool Whether the supplied style variation matches the provided scope.
    784784     */
    785785    private static function style_variation_has_scope( $variation, $scope ) {
     
    806806     *
    807807     * @param string $scope The scope or type of style variation to retrieve e.g. theme, block etc.
    808      * @return array
     808     * @return array The style variations defined by the theme.
    809809     */
    810810    public static function get_style_variations( $scope = 'theme' ) {
  • trunk/wp-includes/comment.php

    r60560 r60582  
    27702770 *
    27712771 * @param bool $defer
    2772  * @return bool
     2772 * @return bool Whether comment counting is deferred.
    27732773 */
    27742774function wp_defer_comment_counting( $defer = null ) {
     
    33723372 *
    33733373 * @param string $source_uri
    3374  * @return string
     3374 * @return string Validated source URI.
    33753375 */
    33763376function pingback_ping_source_uri( $source_uri ) {
  • trunk/wp-includes/formatting.php

    r60530 r60582  
    804804 *
    805805 * @param array $matches preg_replace_callback matches array
    806  * @return string
     806 * @return string Text with newlines replaced with placeholders.
    807807 */
    808808function _autop_newline_preservation_helper( $matches ) {
     
    46814681 *
    46824682 * @param string $text
    4683  * @return string
     4683 * @return string Escaped text.
    46844684 */
    46854685function esc_html( $text ) {
     
    47064706 *
    47074707 * @param string $text
    4708  * @return string
     4708 * @return string Escaped text.
    47094709 */
    47104710function esc_attr( $text ) {
     
    47314731 *
    47324732 * @param string $text
    4733  * @return string
     4733 * @return string Escaped text.
    47344734 */
    47354735function esc_textarea( $text ) {
     
    48104810 *
    48114811 * @param string $tag_name
    4812  * @return string
     4812 * @return string Sanitized tag name.
    48134813 */
    48144814function tag_escape( $tag_name ) {
     
    56845684 * @param string $path   A path.
    56855685 * @param string $suffix If the filename ends in suffix this will also be cut off.
    5686  * @return string
     5686 * @return string The base name of the given path.
    56875687 */
    56885688function wp_basename( $path, $suffix = '' ) {
  • trunk/wp-includes/functions.php

    r60508 r60582  
    65696569 * @param array $a
    65706570 * @param array $b
    6571  * @return int
     6571 * @return int Comparison result.
    65726572 */
    65736573function _wp_timezone_choice_usort_callback( $a, $b ) {
     
    66266626 * @param string $selected_zone Selected timezone.
    66276627 * @param string $locale        Optional. Locale to load the timezones in. Default current site locale.
    6628  * @return string
     6628 * @return string HTML select element for timezones.
    66296629 */
    66306630function wp_timezone_choice( $selected_zone, $locale = null ) {
     
    68286828 *
    68296829 * @param string $str Header comment to clean up.
    6830  * @return string
     6830 * @return string Cleaned header comment.
    68316831 */
    68326832function _cleanup_header_comment( $str ) {
  • trunk/wp-includes/version.php

    r60581 r60582  
    1717 * @global string $wp_version
    1818 */
    19 $wp_version = '7.0-alpha-61269';
     19$wp_version = '7.0-alpha-61270';
    2020
    2121/**
Note: See TracChangeset for help on using the changeset viewer.