1
0
Fork 0
mirror of https://github.com/WordPress/WordPress.git synced 2025-12-08 05:15:15 +08:00

Compare commits

...

5 commits

Author SHA1 Message Date
Sergey Biryukov
7413166cfe Docs: Add missing descriptions for WP_Customize_Header_Image_Control methods.
Follow-up to [20545], [21037], [21354], [21383], [27497].

Props pmbaldha, nikitasolanki1812, sabernhardt, SergeyBiryukov.
Fixes #63660.
Built from https://develop.svn.wordpress.org/trunk@61271


git-svn-id: http://core.svn.wordpress.org/trunk@60583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-19 17:26:28 +00:00
Weston Ruter
a49aba3014 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


git-svn-id: http://core.svn.wordpress.org/trunk@60582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-19 06:17:32 +00:00
Weston Ruter
32de466672 Posts, Post Types: Ensure get_post_class() returns a list.
This avoids the REST API erroneously returning an object in the `class_list` property returned by `WP_REST_Posts_Controller::prepare_item_for_response()`.

Developed in https://github.com/WordPress/wordpress-develop/pull/10515

Props dlh, mamaduka, westonruter.
Fixes #64247.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-19 06:03:30 +00:00
Weston Ruter
e8d1cb9adc Media: Remove Comments column from Media list view when attachment pages are not enabled.
Developed in https://github.com/WordPress/wordpress-develop/pull/10471

Follow-up to [56657].

Props akshat2802, knutsp, shailu25, soyebsalar01, westonruter.
See #57913.
Fixes #64201.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-19 02:46:35 +00:00
Sergey Biryukov
8335c4c775 Twenty Twenty-Five: Update Fira Sans font for the theme from version 4.203 to 4.301.
This aims to resolve rendering issues with the backtick character.

Follow-up to [59146].

Props lakshyajeet, jonsurrell.
Fixes #63964.
Built from https://develop.svn.wordpress.org/trunk@61267


git-svn-id: http://core.svn.wordpress.org/trunk@60579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-18 23:37:32 +00:00
29 changed files with 51 additions and 31 deletions

View file

@ -367,7 +367,7 @@ class WP_Media_List_Table extends WP_List_Table {
if ( ! $this->detached ) {
$posts_columns['parent'] = _x( 'Uploaded to', 'column name' );

if ( post_type_supports( 'attachment', 'comments' ) ) {
if ( post_type_supports( 'attachment', 'comments' ) && get_option( 'wp_attachment_pages_enabled' ) ) {
$posts_columns['comments'] = sprintf(
'<span class="vers comment-grey-bubble" title="%1$s" aria-hidden="true"></span><span class="screen-reader-text">%2$s</span>',
esc_attr__( 'Comments' ),

View file

@ -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 ) {

View file

@ -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();

View file

@ -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();

View file

@ -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 ";

View file

@ -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'] ) ) {

View file

@ -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();

View file

@ -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 );

View file

@ -65,6 +65,9 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
}

/**
* Enqueues control related scripts/styles.
*
* @since 3.9.0
*/
public function enqueue() {
wp_enqueue_media();
@ -96,6 +99,10 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
}

/**
* Prepares the control.
*
* @since 3.9.0
*
* @global Custom_Image_Header $custom_image_header
*/
public function prepare_control() {
@ -113,6 +120,9 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
}

/**
* Prints header image template.
*
* @since 3.9.0
*/
public function print_header_image_template() {
?>
@ -179,6 +189,10 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
}

/**
* Gets current image source.
*
* @since 3.9.0
*
* @return string|void
*/
public function get_current_image_src() {
@ -190,6 +204,9 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
}

/**
* Renders the control's content.
*
* @since 3.9.0
*/
public function render_content() {
$visibility = $this->get_current_image_src() ? '' : ' style="display:none" ';

View file

@ -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", '<WPPreserveNewline />', $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 ) );

View file

@ -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 ) );

View file

@ -606,7 +606,10 @@ function get_post_class( $css_class = '', $post = null ) {
*/
$classes = apply_filters( 'post_class', $classes, $css_class, $post->ID );

return array_unique( $classes );
$classes = array_unique( $classes );
$classes = array_values( $classes );

return $classes;
}

/**

View file

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '7.0-alpha-61262';
$wp_version = '7.0-alpha-61271';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.