prefix = $prefix;
add_action( 'after_setup_theme', array( $this, 'custom_header_setup' ), 11 );
}
/**
* Get prefix.
*
* @access public
* @return sting
*/
public function get_prefix() {
return $this->prefix . '_';
}
/**
* Set up the WordPress core custom header arguments and settings.
*
* @uses add_theme_support() to register support for 3.4 and up.
* @uses theme_header_style() to style front-end.
*
* @since Artwork 1.0
*/
function custom_header_setup() {
$args = array(
// Text color and image (empty to use none).
'default-text-color' => '#676767',
// Callbacks for styling the header and the admin preview.
'wp-head-callback' => array( $this, 'header_style' ),
'admin-head-callback' => array( $this, 'header_style' ),
'admin-preview-callback' => array( $this, 'header_style' ),
);
add_theme_support( 'custom-header', $args );
$args_bg = array(
'default-color' => 'ffffff',
);
add_theme_support( 'custom-background', $args_bg );
add_theme_support( 'custom-logo', array(
/*'height' => 160,
'width' => 135,*/
'flex-height' => true,
'flex-width' => true,
'header-text' => array( 'site-title', 'site-description' ),
) );
}
/**
* Style the header text displayed on the blog.
*
* get_header_textcolor() options: Hide text (returns 'blank'), or any hex value.
*
* @since Artwork 1.0
*/
function header_style() {
$header_text_color = get_header_textcolor();
$color_text = get_option( $this->get_prefix() . 'color_text' );
$brand_color = get_option( $this->get_prefix() . 'color_primary' );
$section_color_primary = get_option( $this->get_prefix() . 'section_color_primary' );
$second_brand_color = get_option( $this->get_prefix() . 'color_second' );
$third_brand_color = get_option( $this->get_prefix() . 'color_third' );
$fourth_brand_color = get_option( $this->get_prefix() . 'color_fourth' );
$font_family = esc_html( get_theme_mod( $this->get_prefix() . "title_font_family", "Niconne" ) );
$font_weight_style = esc_html( get_theme_mod( $this->get_prefix() . "title_font_weight" ) );
$font_weight = preg_replace( "/[^0-9?! ]/", "", $font_weight_style );
$font_style = preg_replace( "/[^A-Za-z?! ]/", "", $font_weight_style );
$font_size = esc_html( get_theme_mod( $this->get_prefix() . "title_font_size", "90px" ) );
if ( $font_style == "" ) {
$font_style = "normal";
}
if ( $font_weight == "" ) {
$font_weight = "400";
}
if ( strcasecmp( $font_family, "Niconne" ) != 0 ) {
?>
"
rel='stylesheet' type='text/css'>
get_prefix() . "text_font_family", "Josefin Sans" ) );
$font_weight_style_text = esc_html( get_theme_mod( $this->get_prefix() . "text_font_weight", "400" ) );
$font_weight_text = preg_replace( "/[^0-9?! ]/", "", $font_weight_style_text );
$font_style_text = preg_replace( "/[^A-Za-z?! ]/", "", $font_weight_style_text );
if ( $font_style_text == "" ) {
$font_style_text = "normal";
}
if ( $font_weight_text == "" ) {
$font_weight_text = "400";
}
$font_size_text = esc_html( get_theme_mod( $this->get_prefix() . "text_font_size", "16px" ) );
if ( strcasecmp( $font_family_text, "Josefin Sans" ) != 0 ) {
?>
"
rel='stylesheet' type='text/css'>
get_prefix() . "tagline_font", 0 ) );
$logo_border = esc_html( get_theme_mod( $this->get_prefix() . "logo_border", 1 ) );
?>