class-twenty-twenty-one-customize-notice-control.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. * Customize Notice Control class.
  11. *
  12. * @since Twenty Twenty-One 1.0
  13. *
  14. * @see WP_Customize_Control
  15. */
  16. class Twenty_Twenty_One_Customize_Notice_Control extends WP_Customize_Control {
  17. /**
  18. * The control type.
  19. *
  20. * @since Twenty Twenty-One 1.0
  21. *
  22. * @var string
  23. */
  24. public $type = 'twenty-twenty-one-notice';
  25. /**
  26. * Renders the control content.
  27. *
  28. * This simply prints the notice we need.
  29. *
  30. * @since Twenty Twenty-One 1.0
  31. *
  32. * @return void
  33. */
  34. public function render_content() {
  35. ?>
  36. <div class="notice notice-warning">
  37. <p><?php esc_html_e( 'To access the Dark Mode settings, select a light background color.', 'twentytwentyone' ); ?></p>
  38. <p><a href="<?php echo esc_url( __( 'https://wordpress.org/support/article/twenty-twenty-one/#dark-mode-support', 'twentytwentyone' ) ); ?>">
  39. <?php esc_html_e( 'Learn more about Dark Mode.', 'twentytwentyone' ); ?>
  40. </a></p>
  41. </div><!-- .notice -->
  42. <?php
  43. }
  44. }