Пример #1
0
    /**
     * Generates the style tag and CSS needed for the theme options.
     *
     * By using the "Customizer_Library_Styles" filter, different components can print CSS in the header.
     * It is organized this way to ensure there is only one "style" tag.
     *
     * @since  1.0.0.
     *
     * @return void
     */
    function customizer_library_gateway_styles()
    {
        do_action('customizer_library_styles');
        // Echo the rules
        $css = Customizer_Library_Styles()->build();
        $home_hero_bg = get_theme_mod('home_hero_bg', customizer_library_get_default('home_hero_bg'));
        $home_hero_bg_color = get_theme_mod('home_hero_bg_color', customizer_library_get_default('home_hero_bg_color'));
        $header_bg = get_theme_mod('header_bg', customizer_library_get_default('header_bg'));
        $header_color = get_theme_mod('header_color', customizer_library_get_default('header_color'));
        $bg_attachement = get_theme_mod('bg_attachement', customizer_library_get_default('bg_attachement'));
        echo "\n<!-- Begin Custom CSS -->\n<style type=\"text/css\" id=\"rescue_custom_css\">\n";
        ?>

	.home-header-bg {
		background:url( '<?php 
        echo esc_url($home_hero_bg);
        ?>
' ) <?php 
        echo esc_attr($home_hero_bg_color);
        ?>
 no-repeat center center <?php 
        echo esc_attr($bg_attachement);
        ?>
;
		-webkit-background-size: cover;
		-moz-background-size: cover;
		-o-background-size: cover;
		background-size: cover;
	}
	.header-bg { 
		background:url( '<?php 
        echo esc_url($header_bg);
        ?>
' ) <?php 
        echo esc_attr($header_color);
        ?>
 no-repeat center center <?php 
        echo esc_attr($bg_attachement);
        ?>
; 
		-webkit-background-size: cover;
		-moz-background-size: cover;
		-o-background-size: cover;
		background-size: cover;
	}

	<?php 
        echo "\n</style>\n<!-- End Custom CSS -->\n";
        if (!empty($css)) {
            echo "\n<!-- Begin Custom CSS -->\n<style type=\"text/css\" id=\"gateway-custom-css\">\n";
            echo $css;
            echo "\n</style>\n<!-- End Custom CSS -->\n";
        }
    }
Пример #2
0
 /**
  * Generates the style tag and CSS needed for the theme options.
  *
  * By using the "Customizer_Library_Styles" filter, different components can print CSS in the header.
  * It is organized this way to ensure there is only one "style" tag.
  *
  * @since  1.0.0.
  *
  * @return void
  */
 function customizer_library_demo_styles()
 {
     do_action('customizer_library_styles');
     // Echo the rules
     $css = Customizer_Library_Styles()->build();
     if (!empty($css)) {
         echo "\n<!-- Begin Custom CSS -->\n<style type=\"text/css\" id=\"demo-custom-css\">\n";
         echo $css;
         echo "\n</style>\n<!-- End Custom CSS -->\n";
     }
 }
Пример #3
0
    /**
     * Generates the style tag and CSS needed for the theme options.
     *
     * By using the "Customizer_Library_Styles" filter, different components can print CSS in the header.
     * It is organized this way to ensure there is only one "style" tag.
     *
     * @since  1.0.0.
     *
     * @return void
     */
    function customizer_library_demo_styles()
    {
        do_action('customizer_library_styles');
        echo "\n<!-- Begin Custom CSS -->\n<style type=\"text/css\" id=\"politics-custom-css\">\n";
        $politics_plug_logo_height = get_theme_mod('politics-logo-height', customizer_library_get_default('politics-logo-height'));
        $politics_logo_width = get_theme_mod('politics-logo-width', customizer_library_get_default('politics-logo-width'));
        if ($politics_plug_logo_height || $politics_logo_width) {
            ?>
		.site-branding img {
			height: <?php 
            echo esc_attr($politics_plug_logo_height);
            ?>
;
			width: <?php 
            echo esc_attr($politics_logo_width);
            ?>
;
		}
	<?php 
        }
        $home_paralax_bg = get_theme_mod('home_paralax_bg', customizer_library_get_default('home_paralax_bg'));
        $home_paralax_bg_color = get_theme_mod('home_paralax_bg_color', customizer_library_get_default('home_paralax_bg_color'));
        ?>



  .home .home_paralax::before {
    background-color: <?php 
        echo esc_attr($home_paralax_bg_color);
        ?>
;
    background: url('<?php 
        echo esc_url($home_paralax_bg);
        ?>
') no-repeat center center;
    background-size: cover;
  }

	<?php 
        // Echo the rules
        $css = Customizer_Library_Styles()->build();
        if (!empty($css)) {
            echo $css;
        }
        echo "\n</style>\n<!-- End Custom CSS -->\n";
    }
Пример #4
0
 /**
  * Generates the style tag and CSS needed for the theme options.
  *
  * By using the "Customizer_Library_Styles" filter, different components can print CSS in the header.
  * It is organized this way to ensure there is only one "style" tag.
  *
  * @since  1.0.0.
  *
  * @return void
  */
 function gather_display_customizations()
 {
     do_action('customizer_library_styles');
     // Echo the rules
     $css = Customizer_Library_Styles()->build();
     if (!empty($css)) {
         echo "\n<!-- Begin Gather Custom CSS -->\n<style type=\"text/css\" id=\"gather-custom-css\">\n";
         echo $css;
         echo "\n</style>\n<!-- End Gather Custom CSS -->\n";
     }
 }