Last active
October 10, 2017 04:18
-
-
Save westonruter/9defddf56888db0fbb8c4c05f3a3bd6f to your computer and use it in GitHub Desktop.
Add help text to the end of the Custom CSS section in the Customizer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'customize_register', function( $wp_customize ) { | |
| $custom_css_section = $wp_customize->get_section( 'custom_css' ); | |
| if ( $custom_css_section ) { | |
| // @todo The section-description-buttons should really not be part of the description help text. | |
| $custom_css_section->description = preg_replace( | |
| '/(?=<p class="section-description-buttons)|$/', | |
| '<p>' . __( 'Here are some additional instructions for the theme, for example certain class names or IDs to target.' ) . '</p>', | |
| $custom_css_section->description, | |
| 1 | |
| ); | |
| } | |
| }, 11 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment