';
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 business_solutions_enqueue_google_fontss() {
$business_solutions_heading_font_family = get_theme_mod('business_solutions_heading_font_family', '');
$business_solutions_body_font_family = get_theme_mod('business_solutions_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'
);
$business_solutions_google_fonts_url = '';
if (!empty($google_fonts[$business_solutions_heading_font_family]) || !empty($google_fonts[$business_solutions_body_font_family])) {
$fonts = array();
if (!empty($google_fonts[$business_solutions_heading_font_family])) {
$fonts[] = $google_fonts[$business_solutions_heading_font_family];
}
if (!empty($google_fonts[$business_solutions_body_font_family])) {
$fonts[] = $google_fonts[$business_solutions_body_font_family];
}
// Build Google Fonts URL
$business_solutions_google_fonts_url = add_query_arg(
'family',
implode('|', $fonts),
'https://fonts.googleapis.com/css2'
);
}
if ($business_solutions_google_fonts_url) {
wp_enqueue_style('business-solutions-google-fonts', $business_solutions_google_fonts_url, false);
}
}
add_action('wp_enqueue_scripts', 'business_solutions_enqueue_google_fontss');
/*-----------------------Typography Function---------------------------------------*/
function business_solutions_apply_typography() {
$business_solutions_heading_font_family = get_theme_mod('business_solutions_heading_font_family');
$business_solutions_body_font_family = get_theme_mod('business_solutions_body_font_family');
$business_solutions_custom_css = '';
if ($business_solutions_body_font_family) {
$business_solutions_custom_css .= "body, a, a:active, a:hover { font-family: " . esc_html($business_solutions_body_font_family) . " !important; }";
}
if ($business_solutions_heading_font_family) {
$business_solutions_custom_css .= "h1, h2, h3, h4, h5, h6 { font-family: " . esc_html($business_solutions_heading_font_family) . " !important; }";
}
if (!empty($business_solutions_custom_css)) {
wp_add_inline_style('business-solutions-style', $business_solutions_custom_css);
}
}
add_action('wp_enqueue_scripts', 'business_solutions_apply_typography');
function business_solutions_custom_css() {
$business_solutions_slider_section = get_theme_mod('business_solutions_slider_setting', false);
if (!$business_solutions_slider_section) {
echo '';
}
}
add_action('wp_head', 'business_solutions_custom_css');
/**
* AJAX handler to dismiss Whizzie notice
*/
if ( ! function_exists( 'business_solutions_dismiss_whizzie_notice' ) ) {
function business_solutions_dismiss_whizzie_notice() {
update_user_meta(
get_current_user_id(),
'business_solutions_whizzie_dismissed',
true
);
wp_die();
}
}
add_action(
'wp_ajax_business_solutions_dismiss_whizzie_notice',
'business_solutions_dismiss_whizzie_notice'
);
/**
* Check if Whizzie notice is dismissed
*/
if ( ! function_exists( 'business_solutions_is_whizzie_dismissed' ) ) {
function business_solutions_is_whizzie_dismissed() {
return (bool) get_user_meta(
get_current_user_id(),
'business_solutions_whizzie_dismissed',
true
);
}
}
/**
* Reset Whizzie notice when theme is activated
*/
add_action( 'after_switch_theme', function () {
$users = get_users( array(
'fields' => 'ID',
) );
foreach ( $users as $user_id ) {
delete_user_meta( $user_id, 'business_solutions_whizzie_dismissed' );
}
});
/**
* Display the admin notice unless dismissed.
*/
function business_solutions_dashboard_notice() {
// Check if the notice is dismissed
$dismissed = get_user_meta(get_current_user_id(), 'business_solutions_dismissable_notice', true);
// Display the notice only if not dismissed
if (!$dismissed) {
?>