/** * Print the custom colors, as defined in the admin. * * @since 0.1.0 * * @return void */ public function custom_styles() { ?> <style type="text/css"> #av-overlay-wrap { background: #<?php echo esc_attr(av_get_background_color()); ?> ; } #av-overlay { background: #<?php echo esc_attr(av_get_overlay_color()); ?> ; } </style> <?php /** * Trigger action after setting the custom color styles. */ do_action('av_custom_styles'); }
/** * Prints the background color settings field. * * @since 0.1 */ function av_settings_callback_bgcolor_field() { ?> <fieldset> <legend class="screen-reader-text"> <span><?php esc_html_e('Background Color'); ?> </span> </legend> <?php $default_color = ''; if (current_theme_supports('custom-background', 'default-color')) { $default_color = ' data-default-color="#' . esc_attr(get_theme_support('custom-background', 'default-color')) . '"'; } ?> <input type="text" name="_av_bgcolor" id="_av_bgcolor" value="#<?php echo esc_attr(av_get_background_color()); ?> "<?php echo $default_color; ?> /> </fieldset> <?php }