diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index aea415910c..a9ca5553ad 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -2276,7 +2276,7 @@ function user_can_access_admin_page() { * @global array $new_allowed_options * * @param array $options - * @return array + * @return array Updated allowed options. */ function option_update_filter( $options ) { global $new_allowed_options; @@ -2297,7 +2297,7 @@ function option_update_filter( $options ) { * * @param array $new_options * @param string|array $options - * @return array + * @return array Updated allowed options. */ function add_allowed_options( $new_options, $options = '' ) { if ( '' === $options ) { @@ -2332,7 +2332,7 @@ function add_allowed_options( $new_options, $options = '' ) { * * @param array $del_options * @param string|array $options - * @return array + * @return array Updated allowed options. */ function remove_allowed_options( $del_options, $options = '' ) { if ( '' === $options ) { diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index c8235c314f..04b7016b83 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -2831,7 +2831,7 @@ function get_alloptions_110() { * @global wpdb $wpdb WordPress database abstraction object. * * @param string $setting Option name. - * @return mixed + * @return mixed Option value. */ function __get_option( $setting ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore global $wpdb; @@ -3374,7 +3374,7 @@ function make_db_current_silent( $tables = 'all' ) { * * @param string $theme_name The name of the theme. * @param string $template The directory name of the theme. - * @return bool + * @return bool True on success, false on failure. */ function make_site_theme_from_oldschool( $theme_name, $template ) { $home_path = get_home_path(); diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 2f348ba841..f597cac132 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -306,7 +306,7 @@ function get_user_to_edit( $user_id ) { * @global wpdb $wpdb WordPress database abstraction object. * * @param int $user_id User ID. - * @return array + * @return object[] The user's draft posts, with 'ID' and 'post_title' keys. */ function get_users_drafts( $user_id ) { global $wpdb; @@ -603,7 +603,7 @@ function use_ssl_preference( $user ) { * @since MU (3.0.0) * * @param string $text - * @return string + * @return string User site invitation email message. */ function admin_created_user_email( $text ) { $roles = get_editable_roles(); diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php index 682f596d94..20cb5e159f 100644 --- a/wp-admin/includes/widgets.php +++ b/wp-admin/includes/widgets.php @@ -69,7 +69,7 @@ function wp_list_widgets() { * * @param array $a First array. * @param array $b Second array. - * @return int + * @return int Comparison result. */ function _sort_name_callback( $a, $b ) { return strnatcasecmp( $a['name'], $b['name'] ); @@ -129,7 +129,7 @@ function wp_list_widget_controls( $sidebar, $sidebar_name = '' ) { * @global array $wp_registered_widgets * * @param array $params - * @return array + * @return array Widget control arguments. */ function wp_list_widget_controls_dynamic_sidebar( $params ) { global $wp_registered_widgets; @@ -157,7 +157,7 @@ function wp_list_widget_controls_dynamic_sidebar( $params ) { * @global array $wp_registered_widgets * * @param string $id_base - * @return int + * @return int Next available widget ID number. */ function next_widget_id_number( $id_base ) { global $wp_registered_widgets; @@ -185,7 +185,7 @@ function next_widget_id_number( $id_base ) { * @global array $sidebars_widgets * * @param array $sidebar_args - * @return array + * @return array Passed through value of `$sidebar_args` param. */ function wp_widget_control( $sidebar_args ) { global $wp_registered_widgets, $wp_registered_widget_controls, $sidebars_widgets; @@ -322,7 +322,7 @@ function wp_widget_control( $sidebar_args ) { /** * @param string $classes - * @return string + * @return string Modified body classes. */ function wp_widgets_access_body_class( $classes ) { return "$classes widgets_access "; diff --git a/wp-includes/block-supports/elements.php b/wp-includes/block-supports/elements.php index 5678dfc0fc..c699b5badb 100644 --- a/wp-includes/block-supports/elements.php +++ b/wp-includes/block-supports/elements.php @@ -27,7 +27,7 @@ function wp_get_elements_class_name( $block ) { * * @param array $block Block object. * @param array $options Per element type options e.g. whether to skip serialization. - * @return boolean Whether the block needs an elements class name. + * @return bool Whether the block needs an elements class name. */ function wp_should_add_elements_class_name( $block, $options ) { if ( ! isset( $block['attrs']['style']['elements'] ) ) { diff --git a/wp-includes/class-wp-theme-json-resolver.php b/wp-includes/class-wp-theme-json-resolver.php index 3246992a42..1924d1a471 100644 --- a/wp-includes/class-wp-theme-json-resolver.php +++ b/wp-includes/class-wp-theme-json-resolver.php @@ -681,7 +681,7 @@ class WP_Theme_JSON_Resolver { * * @since 5.9.0 * - * @return integer|null + * @return int|null ID for a post of type `wp_global_styles`, or null if not available. */ public static function get_user_global_styles_post_id() { if ( null !== static::$user_custom_post_type_id ) { @@ -704,7 +704,7 @@ class WP_Theme_JSON_Resolver { * @since 5.9.0 Added a check in the parent theme. * @deprecated 6.2.0 Use wp_theme_has_theme_json() instead. * - * @return bool + * @return bool Whether the active theme has a theme.json file. */ public static function theme_has_support() { _deprecated_function( __METHOD__, '6.2.0', 'wp_theme_has_theme_json()' ); @@ -780,7 +780,7 @@ class WP_Theme_JSON_Resolver { * * @param array $variation Theme.json shaped style variation object. * @param string $scope Scope to check e.g. theme, block etc. - * @return boolean + * @return bool Whether the supplied style variation matches the provided scope. */ private static function style_variation_has_scope( $variation, $scope ) { if ( 'block' === $scope ) { @@ -805,7 +805,7 @@ class WP_Theme_JSON_Resolver { * Added basic caching for read theme.json partial files. * * @param string $scope The scope or type of style variation to retrieve e.g. theme, block etc. - * @return array + * @return array The style variations defined by the theme. */ public static function get_style_variations( $scope = 'theme' ) { $variation_files = array(); diff --git a/wp-includes/comment.php b/wp-includes/comment.php index a2d7409d0c..36dea1418d 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -2769,7 +2769,7 @@ function wp_update_comment( $commentarr, $wp_error = false ) { * @since 2.5.0 * * @param bool $defer - * @return bool + * @return bool Whether comment counting is deferred. */ function wp_defer_comment_counting( $defer = null ) { static $_defer = false; @@ -3371,7 +3371,7 @@ function weblog_ping( $server = '', $path = '' ) { * @see wp_http_validate_url() * * @param string $source_uri - * @return string + * @return string Validated source URI. */ function pingback_ping_source_uri( $source_uri ) { return (string) wp_http_validate_url( $source_uri ); diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index e50c3b3eee..e6ff44d123 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -803,7 +803,7 @@ function wp_replace_in_html_tags( $haystack, $replace_pairs ) { * @access private * * @param array $matches preg_replace_callback matches array - * @return string + * @return string Text with newlines replaced with placeholders. */ function _autop_newline_preservation_helper( $matches ) { return str_replace( "\n", '', $matches[0] ); @@ -4680,7 +4680,7 @@ function esc_js( $text ) { * @since 2.8.0 * * @param string $text - * @return string + * @return string Escaped text. */ function esc_html( $text ) { $safe_text = wp_check_invalid_utf8( $text ); @@ -4705,7 +4705,7 @@ function esc_html( $text ) { * @since 2.8.0 * * @param string $text - * @return string + * @return string Escaped text. */ function esc_attr( $text ) { $safe_text = wp_check_invalid_utf8( $text ); @@ -4730,7 +4730,7 @@ function esc_attr( $text ) { * @since 3.1.0 * * @param string $text - * @return string + * @return string Escaped text. */ function esc_textarea( $text ) { $safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) ); @@ -4809,7 +4809,7 @@ EOF; * @since 6.5.5 Allow hyphens in tag names (i.e. custom elements). * * @param string $tag_name - * @return string + * @return string Sanitized tag name. */ function tag_escape( $tag_name ) { $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9-_:]/', '', $tag_name ) ); @@ -5683,7 +5683,7 @@ function _sanitize_text_fields( $str, $keep_newlines = false ) { * * @param string $path A path. * @param string $suffix If the filename ends in suffix this will also be cut off. - * @return string + * @return string The base name of the given path. */ function wp_basename( $path, $suffix = '' ) { return urldecode( basename( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ), $suffix ) ); diff --git a/wp-includes/functions.php b/wp-includes/functions.php index bb19b8e5f9..68a29f444f 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -6568,7 +6568,7 @@ function wp_timezone_override_offset() { * * @param array $a * @param array $b - * @return int + * @return int Comparison result. */ function _wp_timezone_choice_usort_callback( $a, $b ) { // Don't use translated versions of Etc. @@ -6625,7 +6625,7 @@ function _wp_timezone_choice_usort_callback( $a, $b ) { * * @param string $selected_zone Selected timezone. * @param string $locale Optional. Locale to load the timezones in. Default current site locale. - * @return string + * @return string HTML select element for timezones. */ function wp_timezone_choice( $selected_zone, $locale = null ) { static $mo_loaded = false, $locale_loaded = null; @@ -6827,7 +6827,7 @@ function wp_timezone_choice( $selected_zone, $locale = null ) { * @see https://core.trac.wordpress.org/ticket/8497 * * @param string $str Header comment to clean up. - * @return string + * @return string Cleaned header comment. */ function _cleanup_header_comment( $str ) { return trim( preg_replace( '/\s*(?:\*\/|\?>).*/', '', $str ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index ef1f22f80d..0a2035d21e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '7.0-alpha-61269'; +$wp_version = '7.0-alpha-61270'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.