/** * Custom CSS Customizer Preview * * Since the Javascript for the fonts will get repeated in * many themes, its being placed here so it can be easily * placed in each theme that requires it. * * @since 2.1.0 */ function themeblvd_customizer_preview_styles() { // Global option name $option_name = themeblvd_get_option_name(); // Output ?> /* Custom CSS */ wp.customize('<?php echo $option_name; ?> [custom_styles]',function( value ) { value.bind(function(css) { $('.preview_custom_styles').remove(); $('head').append('<style class="preview_custom_styles">'+css+'</style>'); }); }); <?php }
/** * Delete dismissable nag option when theme is switched. * * This ensures that the user is again reminded via nag of required * and/or recommended plugins if they re-activate the theme. * * @since 2.1.1 */ public function update_dismiss() { delete_user_meta(get_current_user_id(), themeblvd_get_option_name() . '_tgmpa_dismissed_notice'); }