rebase on oct-10-2023
This commit is contained in:
@@ -45,8 +45,10 @@ final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
|
||||
$custom_image_header = new Custom_Image_Header( $admin_head_callback, $admin_preview_callback );
|
||||
}
|
||||
|
||||
// If the value doesn't exist (removed or random),
|
||||
// use the header_image value.
|
||||
/*
|
||||
* If the value doesn't exist (removed or random),
|
||||
* use the header_image value.
|
||||
*/
|
||||
if ( ! $value ) {
|
||||
$value = $this->manager->get_setting( 'header_image' )->post_value();
|
||||
}
|
||||
|
||||
@@ -88,8 +88,10 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
|
||||
|
||||
if ( is_object( $this->setting ) ) {
|
||||
if ( $this->setting->default ) {
|
||||
// Fake an attachment model - needs all fields used by template.
|
||||
// Note that the default value must be a URL, NOT an attachment ID.
|
||||
/*
|
||||
* Fake an attachment model - needs all fields used by template.
|
||||
* Note that the default value must be a URL, NOT an attachment ID.
|
||||
*/
|
||||
$ext = substr( $this->setting->default, -3 );
|
||||
$type = in_array( $ext, array( 'jpg', 'png', 'gif', 'bmp', 'webp' ), true ) ? 'image' : 'document';
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
|
||||
} else {
|
||||
$value = false;
|
||||
|
||||
// Note that a ID of less than one indicates a nav_menu not yet inserted.
|
||||
// Note that an ID of less than one indicates a nav_menu not yet inserted.
|
||||
if ( $this->post_id > 0 ) {
|
||||
$post = get_post( $this->post_id );
|
||||
if ( $post && self::POST_TYPE === $post->post_type ) {
|
||||
|
||||
@@ -184,8 +184,10 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
|
||||
* @since 4.9.0
|
||||
*/
|
||||
protected function filter_drawer_content_template() {
|
||||
// @todo Use the .org API instead of the local core feature list.
|
||||
// The .org API is currently outdated and will be reconciled when the .org themes directory is next redesigned.
|
||||
/*
|
||||
* @todo Use the .org API instead of the local core feature list.
|
||||
* The .org API is currently outdated and will be reconciled when the .org themes directory is next redesigned.
|
||||
*/
|
||||
$feature_list = get_theme_feature_list( false );
|
||||
?>
|
||||
<# if ( 'wporg' === data.action ) { #>
|
||||
|
||||
Reference in New Issue
Block a user