php /*-----------------------------------------------------------------------------------*/ // Generate Dynamic CSS /*-----------------------------------------------------------------------------------*/ if( !function_exists( 'generate_dynamic_css' ) ){ function generate_dynamic_css(){ global $theme_options; $header_nav_border_color = $theme_options['header_nav_border_color']; $responsive_menu_bar_bg_color = $theme_options['responsive_menu_bar_bg_color']; $overall_link_color = $theme_options['overall_link_color']; $default_btn_bg = $theme_options['default_btn_bg']; $default_btn_text_color = $theme_options['default_btn_text_color']; $read_more_btn_bg = $theme_options['read_more_btn_bg']; $read_more_btn_text_color = $theme_options['read_more_btn_text_color']; $footer_border_color = $theme_options['footer_border_color']; $footer_link_color = $theme_options['footer_link_color']; $footer_social_icons_color = $theme_options['footer_social_icons_color']; $dynamic_css = array( //Header Navigation Border Color array( 'elements' => 'nav.main-menu ul > li ul li', 'property' => 'border-color', 'value' => $header_nav_border_color ), //Over All Link Color array( 'elements' => 'a', 'property' => 'color', 'value' => $overall_link_color['regular'] ), array( 'elements' => 'a:hover, a:focus', 'property' => 'color', 'value' => $overall_link_color['hover'] ), //Default Button Background and Text Color array( 'elements' => 'form input[type="submit"], .woocommerce a.added_to_cart, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, .woocommerce #respond input[type="submit"]', 'property' => 'background-color', 'value' => $default_btn_bg['regular'] ), array( 'elements' => 'form input[type="submit"]:hover, form input[type="submit"]:focus, .woocommerce a.added_to_cart:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit:hover, .woocommerce #respond input[type="submit"]:hover', 'property' => 'background-color', 'value' => $default_btn_bg['hover'] ), array( 'elements' => 'form input[type="submit"], .woocommerce a.added_to_cart, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, .woocommerce #respond input[type="submit"]', 'property' => 'color', 'value' => $default_btn_text_color['regular'] ), array( 'elements' => 'form input[type="submit"]:hover, form input[type="submit"]:focus, .woocommerce a.added_to_cart:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit:hover, .woocommerce #respond input[type="submit"]:hover', 'property' => 'color', 'value' => $default_btn_text_color['hover'] ), //Read More Button Background and Text Color array( 'elements' => '.read-more, .woocommerce ul.products li.product .button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt', 'property' => 'background-color', 'value' => $read_more_btn_bg['regular'] ), array( 'elements' => '.read-more:hover, .read-more:focus, .woocommerce ul.products li.product .button:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover', 'property' => 'background-color', 'value' => $read_more_btn_bg['hover'] ), array( 'elements' => '.read-more, .woocommerce ul.products li.product .button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt', 'property' => 'color', 'value' => $read_more_btn_text_color['regular'] ), array( 'elements' => '.read-more:hover, .read-more:focus, .woocommerce ul.products li.product .button:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover', 'property' => 'color', 'value' => $read_more_btn_text_color['hover'] ), //Footer Border Color array( 'elements' => '#main-footer, .footer-bottom, #main-footer .widget ul, #main-footer .widget ul li', 'property' => 'border-color', 'value' => $footer_border_color ), //Footer Link Color array( 'elements' => '#main-footer .widget a', 'property' => 'color', 'value' => $footer_link_color['regular'] ), array( 'elements' => '#main-footer .widget a:hover', 'property' => 'color', 'value' => $footer_link_color['hover'] ), array( 'elements' => '#main-footer .widget a:active', 'property' => 'color', 'value' => $footer_link_color['active'] ), //Footer Social Icons array( 'elements' => '.footer-bottom .footer-social-nav li .fa', 'property' => 'color', 'value' => $footer_social_icons_color['regular'] ), array( 'elements' => '.footer-bottom .footer-social-nav li .fa:hover', 'property' => 'color', 'value' => $footer_social_icons_color['hover'] ), array( 'elements' => '.footer-bottom .footer-social-nav li .fa:active', 'property' => 'color', 'value' => $footer_social_icons_color['active'] ) ); // hide home slider plus sign if configured from theme options if ( $theme_options['display_slider_plus_sign'] == '0' ) { $dynamic_css[] = array( 'elements' => '.home-slider .slide-content h1:after', 'property' => 'display', 'value' => 'none' ); } // media query max width 530px $dynamic_css_max_width_530px = array( //Responsive menu bar background color array( 'elements' => '.mean-container .mean-bar', 'property' => 'background-color', 'value' => $responsive_menu_bar_bg_color ), ); $prop_count = count($dynamic_css); if( $prop_count > 0 ){ echo "'; // end of styles } } } add_action('wp_head', 'generate_dynamic_css');
Warning: Cannot modify header information - headers already sent by (output started at /home/u820776560/domains/caracas.md/public_html/wp-content/themes/inspiry-medicalpress/css/dynamic-css.php:1) in /home/u820776560/domains/caracas.md/public_html/wp-includes/feed-rss2-comments.php on line 8
Comentarii la Caracas https://caracas.md 2016-03-24 09:18:21 hourly 1 https://wordpress.org/?v=5.2.13