Beispiel #1
0
 /**
  * Add inline CSS for the font customizations.
  *
  * @action wp_enqueue_scripts
  * @since  1.0.0
  */
 public function enqueue_inline_css()
 {
     foreach ($this->font_types as $name => $args) {
         if (empty($name) || empty($args['css'])) {
             continue;
         }
         $css = sprintf(Rock_Customizer::parse_css_rules($args['css']), $this->get_font($name));
         wp_add_inline_style(Rock_Customizer::$stylesheet . '-fonts', $css);
     }
 }
Beispiel #2
0
 /**
  * Custom header CSS.
  *
  * @see   $this->header()
  * @since 1.0.0
  */
 public function header_css()
 {
     $color = get_header_textcolor();
     $css = $this->get_color_css('header_textcolor');
     if ('blank' === $color) {
         $css = array('.site-title, .site-description' => array('position' => 'absolute', 'clip' => 'rect(1px, 1px, 1px, 1px)'));
     }
     if ($color && $css) {
         printf("<style type='text/css'>\n%s\n</style>", sprintf(Rock_Customizer::parse_css_rules($css), $color));
     }
 }