diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-admin/includes/class-custom-background.php --- a/wp/wp-admin/includes/class-custom-background.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-admin/includes/class-custom-background.php Fri Sep 05 18:40:08 2025 +0200 @@ -11,6 +11,7 @@ * * @since 3.0.0 */ +#[AllowDynamicProperties] class Custom_Background { /** @@ -38,11 +39,14 @@ private $updated; /** - * Constructor - Register administration header callback. + * Constructor - Registers administration header callback. * * @since 3.0.0 - * @param callable $admin_header_callback - * @param callable $admin_image_div_callback Optional custom image div output callback. + * + * @param callable $admin_header_callback Optional. Administration header callback. + * Default empty string. + * @param callable $admin_image_div_callback Optional. Custom image div output callback. + * Default empty string. */ public function __construct( $admin_header_callback = '', $admin_image_div_callback = '' ) { $this->admin_header_callback = $admin_header_callback; @@ -57,12 +61,19 @@ } /** - * Set up the hooks for the Custom Background admin page. + * Sets up the hooks for the Custom Background admin page. * * @since 3.0.0 */ public function init() { - $page = add_theme_page( __( 'Background' ), __( 'Background' ), 'edit_theme_options', 'custom-background', array( $this, 'admin_page' ) ); + $page = add_theme_page( + _x( 'Background', 'custom background' ), + _x( 'Background', 'custom background' ), + 'edit_theme_options', + 'custom-background', + array( $this, 'admin_page' ) + ); + if ( ! $page ) { return; } @@ -77,7 +88,7 @@ } /** - * Set up the enqueue for the CSS & JavaScript files. + * Sets up the enqueue for the CSS & JavaScript files. * * @since 3.0.0 */ @@ -97,7 +108,7 @@ get_current_screen()->set_help_sidebar( '
' . __( 'For more information:' ) . '
' . '' . __( 'Documentation on Custom Background' ) . '
' . - '' . __( 'Support' ) . '
' + '' . __( 'Support forums' ) . '
' ); wp_enqueue_media(); @@ -106,7 +117,7 @@ } /** - * Execute custom background modification. + * Executes custom background modification. * * @since 3.0.0 */ @@ -222,7 +233,7 @@ } /** - * Display the custom background page. + * Displays the custom background page. * * @since 3.0.0 */ @@ -231,30 +242,37 @@- Visit your site to see how it looks.' ), home_url( '/' ) ); - ?> -
-