Merged in feature/81-dev-dev01 (pull request #5)

auto-patch  81-dev-dev01-2023-12-05T22_45_26

* auto-patch  81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
Tony Volpe
2023-12-05 23:05:59 +00:00
parent ba16964e7a
commit 725d3043d5
1463 changed files with 142461 additions and 89421 deletions

View File

@@ -239,30 +239,37 @@ class Custom_Background {
<div class="wrap" id="custom-background">
<h1><?php _e( 'Custom Background' ); ?></h1>
<?php if ( current_user_can( 'customize' ) ) { ?>
<div class="notice notice-info hide-if-no-customize">
<p>
<?php
printf(
<?php
if ( current_user_can( 'customize' ) ) {
$message = sprintf(
/* translators: %s: URL to background image configuration in Customizer. */
__( 'You can now manage and live-preview Custom Backgrounds in the <a href="%s">Customizer</a>.' ),
admin_url( 'customize.php?autofocus[control]=background_image' )
);
?>
</p>
</div>
<?php } ?>
wp_admin_notice(
$message,
array(
'type' => 'info',
'additional_classes' => array( 'hide-if-no-customize' ),
)
);
}
<?php if ( ! empty( $this->updated ) ) { ?>
<div id="message" class="updated">
<p>
<?php
/* translators: %s: Home URL. */
printf( __( 'Background updated. <a href="%s">Visit your site</a> to see how it looks.' ), esc_url( home_url( '/' ) ) );
?>
</p>
</div>
<?php } ?>
if ( ! empty( $this->updated ) ) {
$updated_message = sprintf(
/* translators: %s: Home URL. */
__( 'Background updated. <a href="%s">Visit your site</a> to see how it looks.' ),
esc_url( home_url( '/' ) )
);
wp_admin_notice(
$updated_message,
array(
'id' => 'message',
'additional_classes' => array( 'updated' ),
)
);
}
?>
<h2><?php _e( 'Background Image' ); ?></h2>
@@ -564,8 +571,9 @@ class Custom_Background {
$thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' );
set_theme_mod( 'background_image_thumb', sanitize_url( $thumbnail[0] ) );
/** This action is documented in wp-admin/includes/class-custom-image-header.php */
do_action( 'wp_create_file_in_uploads', $file, $id ); // For replication.
/** This filter is documented in wp-admin/includes/class-custom-image-header.php */
$file = apply_filters( 'wp_create_file_in_uploads', $file, $id ); // For replication.
$this->updated = true;
}