ID, 'bizflow_show_nav', true) !== 'show') { $canShow = false; } else { $canShow = true; } } return $canShow; } } if (!function_exists('bizflow_should_show_archive_categories')) { /** * Whether to show categories for individual post on archive and blog pages * * @return boolean */ function bizflow_should_show_archive_categories() { $show = true; //Check option set in customizer if (get_option(BIZFLOW . 'archive_cat_link', bizflow_get_default_options()['archive_cat_link']) == 'hide') { $show = false; } return apply_filters('bizflow_show_archive_categories', $show); } } if (!function_exists('bizflow_should_show_archive_read_more')) { /** * Whether to show read more link for individual post on archive and blog pages * * @return boolean */ function bizflow_should_show_archive_read_more() { $show = true; //Check customizer option if (get_option(BIZFLOW . 'archive_read_more', bizflow_get_default_options()['archive_read_more']) == 'hide') { $show = false; } return apply_filters('bizflow_show_archive_read_more', $show); } } if (!function_exists('bizflow_should_show_single_categories')) { /** * Whether to show categories for individual post on single post page * * @return boolean */ function bizflow_should_show_single_categories() { $show = true; //Check customizer option if (get_option(BIZFLOW . 'single_cat_link', bizflow_get_default_options()['single_cat_link']) == 'hide') { $show = false; } return apply_filters('bizflow_show_single_categories', $show); } } if (!function_exists('bizflow_should_show_single_tags')) { /** * Whether to show tags for individual post on single post page * * @return boolean */ function bizflow_should_show_single_tags() { $show = true; //Check customizer option if (get_option(BIZFLOW . 'single_tag_link', bizflow_get_default_options()['single_tag_link']) == 'hide') { $show = false; } return apply_filters('bizflow_show_single_tags', $show); } } if (!function_exists('bizflow_should_show_author')) { /** * Whether to show author for individual post on single post page * * @return boolean */ function bizflow_should_show_author() { global $post; $hide = true; //Check customizer option if (get_option(BIZFLOW . 'single_author', bizflow_get_default_options()['single_author']) == 'hide') { return !$hide; } if (get_post_meta($post->ID, 'bizflow_hide_author', true) != 'hide') { $hide = false; } return !$hide; } } if (!function_exists('bizflow_should_show_date')) { /** * Whether to show date for individual post on single post page * * @return boolean */ function bizflow_should_show_date() { global $post; $hide = true; //Check customizer option if (get_option(BIZFLOW . 'single_date', bizflow_get_default_options()['single_date']) == 'hide') { return !$hide; } if (get_post_meta($post->ID, 'bizflow_hide_date', true) != 'hide') { $hide = false; } return !$hide; } } if (!function_exists('bizflow_get_sidebar_config')) { /** * Whether to display sidebar, if yes how many * * left, right, none, both * * @return string */ function bizflow_get_sidebar_config() { //Check customizer option $sidebar_config = get_option(BIZFLOW . 'sidebar_config', bizflow_get_default_options()['sidebar_config']); if (is_page()) { //Let pages have scope of a different setup based on post meta global $post; $page_sidebar_config = get_post_meta($post->ID, 'bizflow_page_sidebar_config', true); if (isset($page_sidebar_config) && $page_sidebar_config && $page_sidebar_config != 'default') { $sidebar_config = $page_sidebar_config; } } return apply_filters('bizflow_sidebar_config', $sidebar_config); } } if (!function_exists('bizflow_has_different_bg_color')) { /** * Whether body element has a different background color than content area * * @return boolean */ function bizflow_has_different_bg_color() { $has_different_bg = true; //Check customizer options $body_bg = (get_theme_mod('background_color', false)) ? '#' . get_theme_mod('background_color', false) : '#efefef'; $content_bg = (get_option(BIZFLOW . 'content_bg')) ? get_option('content_bg') : '#ffffff'; //Compare values if (strtolower($body_bg) == strtolower($content_bg)) { $has_different_bg = false; } return apply_filters('bizflow_has_different_bg_color', $has_different_bg); } }