wp/wp-includes/class-wp-customize-panel.php
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
--- a/wp/wp-includes/class-wp-customize-panel.php	Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/class-wp-customize-panel.php	Fri Sep 05 18:40:08 2025 +0200
@@ -16,6 +16,7 @@
  *
  * @see WP_Customize_Manager
  */
+#[AllowDynamicProperties]
 class WP_Customize_Panel {
 
 	/**
@@ -72,7 +73,7 @@
 	 * Theme features required to support the panel.
 	 *
 	 * @since 4.0.0
-	 * @var string|string[]
+	 * @var mixed[]
 	 */
 	public $theme_supports = '';
 
@@ -146,7 +147,7 @@
 	 *                                            of panels and sections. Default 160.
 	 *     @type string          $capability      Capability required for the panel.
 	 *                                            Default `edit_theme_options`.
-	 *     @type string|string[] $theme_supports  Theme features required to support the panel.
+	 *     @type mixed[]         $theme_supports  Theme features required to support the panel.
 	 *     @type string          $title           Title of the panel to show in UI.
 	 *     @type string          $description     Description to show in the UI.
 	 *     @type string          $type            Type of the panel.
@@ -241,7 +242,7 @@
 			return false;
 		}
 
-		if ( $this->theme_supports && ! current_theme_supports( ... (array) $this->theme_supports ) ) {
+		if ( $this->theme_supports && ! current_theme_supports( ...(array) $this->theme_supports ) ) {
 			return false;
 		}
 
@@ -347,7 +348,12 @@
 		<li id="accordion-panel-{{ data.id }}" class="accordion-section control-section control-panel control-panel-{{ data.type }}">
 			<h3 class="accordion-section-title" tabindex="0">
 				{{ data.title }}
-				<span class="screen-reader-text"><?php _e( 'Press return or enter to open this panel' ); ?></span>
+				<span class="screen-reader-text">
+					<?php
+					/* translators: Hidden accessibility text. */
+					_e( 'Press return or enter to open this panel' );
+					?>
+				</span>
 			</h3>
 			<ul class="accordion-sub-container control-panel-content"></ul>
 		</li>
@@ -367,7 +373,12 @@
 	protected function content_template() {
 		?>
 		<li class="panel-meta customize-info accordion-section <# if ( ! data.description ) { #> cannot-expand<# } #>">
-			<button class="customize-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></button>
+			<button class="customize-panel-back" tabindex="-1"><span class="screen-reader-text">
+				<?php
+				/* translators: Hidden accessibility text. */
+				_e( 'Back' );
+				?>
+			</span></button>
 			<div class="accordion-section-title">
 				<span class="preview-notice">
 				<?php
@@ -376,7 +387,12 @@
 				?>
 				</span>
 				<# if ( data.description ) { #>
-					<button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
+					<button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text">
+						<?php
+						/* translators: Hidden accessibility text. */
+						_e( 'Help' );
+						?>
+					</span></button>
 				<# } #>
 			</div>
 			<# if ( data.description ) { #>