';
if (!is_home()) {
echo '
';
bloginfo('name');
echo " >> ";
if (is_category() || is_single()) {
the_category(' >> ');
if (is_single()) {
echo ' >>
' . esc_html(get_the_title()) . '';
}
} elseif (is_page()) {
echo '
' . esc_html(get_the_title()) . '';
}
}
echo '
';
}
function artist_painter_enqueue_google_fontss() {
$artist_painter_heading_font_family = get_theme_mod('artist_painter_heading_font_family', '');
$artist_painter_body_font_family = get_theme_mod('artist_painter_body_font_family', '');
// Google Fonts URL builder
$google_fonts = array(
'Arial' => '',
'Verdana' => '',
'Helvetica' => '',
'Times New Roman'=> '',
'Georgia' => '',
'Courier New' => '',
'Trebuchet MS' => '',
'Tahoma' => '',
'Palatino' => '',
'Garamond' => '',
'Impact' => '',
'Comic Sans MS' => '',
'Lucida Sans' => '',
'Arial Black' => '',
'Gill Sans' => '',
'Segoe UI' => '',
'Open Sans' => 'Open+Sans:wght@400;700',
'Roboto' => 'Roboto:wght@400;700',
'Lato' => 'Lato:wght@400;700',
'Montserrat' => 'Montserrat:wght@400;700',
'Libre Baskerville' => 'Libre+Baskerville:wght@400;700'
);
$artist_painter_google_fonts_url = '';
if (!empty($google_fonts[$artist_painter_heading_font_family]) || !empty($google_fonts[$artist_painter_body_font_family])) {
$fonts = array();
if (!empty($google_fonts[$artist_painter_heading_font_family])) {
$fonts[] = $google_fonts[$artist_painter_heading_font_family];
}
if (!empty($google_fonts[$artist_painter_body_font_family])) {
$fonts[] = $google_fonts[$artist_painter_body_font_family];
}
// Build Google Fonts URL
$artist_painter_google_fonts_url = add_query_arg(
'family',
implode('|', $fonts),
'https://fonts.googleapis.com/css2'
);
}
if ($artist_painter_google_fonts_url) {
wp_enqueue_style('artist-painter-google-fonts', $artist_painter_google_fonts_url, false);
}
}
add_action('wp_enqueue_scripts', 'artist_painter_enqueue_google_fontss');
/*-----------------------Typography Function---------------------------------------*/
function artist_painter_apply_typography() {
$artist_painter_heading_font_family = get_theme_mod('artist_painter_heading_font_family');
$artist_painter_body_font_family = get_theme_mod('artist_painter_body_font_family');
$artist_painter_custom_css = '';
if ($artist_painter_body_font_family) {
$artist_painter_custom_css .= "body, a, a:active, a:hover { font-family: " . esc_html($artist_painter_body_font_family) . " !important; }";
}
if ($artist_painter_heading_font_family) {
$artist_painter_custom_css .= "h1, h2, h3, h4, h5, h6 { font-family: " . esc_html($artist_painter_heading_font_family) . " !important; }";
}
if (!empty($artist_painter_custom_css)) {
wp_add_inline_style('artist-painter-style', $artist_painter_custom_css);
}
}
add_action('wp_enqueue_scripts', 'artist_painter_apply_typography');
/*-----------------------Menu Typography Start---------------------------------------*/
function artist_painter_menu_customizer_css() {
$artist_painter_menu_font_weight = get_theme_mod('artist_painter_menu_font_weight', '400');
$artist_painter_menu_text_transform = get_theme_mod('artist_painter_menu_text_transform', 'capitalize');
$artist_painter_custom_css = "
.main-navigation ul li a {
font-weight: " . esc_html($artist_painter_menu_font_weight) . ";
text-transform: " . esc_html($artist_painter_menu_text_transform) . ";
}
";
wp_add_inline_style('artist-painter-style', $artist_painter_custom_css);
}
add_action('wp_enqueue_scripts', 'artist_painter_menu_customizer_css');
/*-----------------------Menu Typography End---------------------------------------*/
function artist_painter_custom_csss() {
$artist_painter_slider_section = get_theme_mod('artist_painter_slider_setting', false);
if (!$artist_painter_slider_section) {
echo '';
}
}
add_action('wp_head', 'artist_painter_custom_csss');
/**
* Display the admin notice unless dismissed.
*/
function artist_painter_dashboard_notice() {
// Check if the notice is dismissed
$dismissed = get_user_meta(get_current_user_id(), 'artist_painter_dismissable_notice', true);
// Display the notice only if not dismissed
if (!$dismissed) {
?>