<?php
/**
 * Theme Ostrich 
 *
 * @package Ostrich Magazine
 * active callbacks.
 * 
 */

/*========================hero==============================*/
/**
 * Check if the hero is enabled
 */
function ostrich_magazine_if_hero_enabled( $control ) {
	return 0 != $control->manager->get_setting( 'ostrich_magazine_hero_enable' )->value();
}

/**
 * Check if the hero is category
 */
function ostrich_magazine_if_hero_cat( $control ) {
	return 'cat' === $control->manager->get_setting( 'ostrich_magazine_hero' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_hero_enable' )->value();
}

/**
 * Check if the hero is page
 */
function ostrich_magazine_if_hero_page( $control ) {
	return 'page' === $control->manager->get_setting( 'ostrich_magazine_hero' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_hero_enable' )->value();
}

/**
 * Check if the hero is post
 */
function ostrich_magazine_if_hero_post( $control ) {
	return 'post' === $control->manager->get_setting( 'ostrich_magazine_hero' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_hero_enable' )->value();
}


/*========================breaking_news==============================*/
/**
 * Check if the breaking_news is enabled
 */
function ostrich_magazine_if_breaking_news_enabled( $control ) {
	return 0 != $control->manager->get_setting( 'ostrich_magazine_breaking_news_enable' )->value();
}

/**
 * Check if the breaking_news is category
 */
function ostrich_magazine_if_breaking_news_cat( $control ) {
	return 'cat' === $control->manager->get_setting( 'ostrich_magazine_breaking_news' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_breaking_news_enable' )->value();
}

/**
 * Check if the breaking_news is page
 */
function ostrich_magazine_if_breaking_news_page( $control ) {
	return 'page' === $control->manager->get_setting( 'ostrich_magazine_breaking_news' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_breaking_news_enable' )->value();
}

/**
 * Check if the breaking_news is post
 */
function ostrich_magazine_if_breaking_news_post( $control ) {
	return 'post' === $control->manager->get_setting( 'ostrich_magazine_breaking_news' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_breaking_news_enable' )->value();
}


/*========================hot_topic==============================*/
/**
 * Check if the hot_topic is enabled
 */
function ostrich_magazine_if_hot_topic_enabled( $control ) {
	return 0 != $control->manager->get_setting( 'ostrich_magazine_hot_topic_enable' )->value();
}

/**
 * Check if the hot_topic is category
 */
function ostrich_magazine_if_hot_topic_cat( $control ) {
	return 'cat' === $control->manager->get_setting( 'ostrich_magazine_hot_topic' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_hot_topic_enable' )->value();
}

/**
 * Check if the hot_topic is page
 */
function ostrich_magazine_if_hot_topic_page( $control ) {
	return 'page' === $control->manager->get_setting( 'ostrich_magazine_hot_topic' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_hot_topic_enable' )->value();
}

/**
 * Check if the hot_topic is post
 */
function ostrich_magazine_if_hot_topic_post( $control ) {
	return 'post' === $control->manager->get_setting( 'ostrich_magazine_hot_topic' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_hot_topic_enable' )->value();
}



/*========================technology==============================*/
/**
 * Check if the technology is enabled
 */
function ostrich_magazine_if_technology_enabled( $control ) {
	return 0 != $control->manager->get_setting( 'ostrich_magazine_technology_enable' )->value();
}

/**
 * Check if the technology is category
 */
function ostrich_magazine_if_technology_cat( $control ) {
	return 'cat' === $control->manager->get_setting( 'ostrich_magazine_technology' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_technology_enable' )->value();
}

/**
 * Check if the technology is page
 */
function ostrich_magazine_if_technology_page( $control ) {
	return 'page' === $control->manager->get_setting( 'ostrich_magazine_technology' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_technology_enable' )->value();
}

/**
 * Check if the technology is post
 */
function ostrich_magazine_if_technology_post( $control ) {
	return 'post' === $control->manager->get_setting( 'ostrich_magazine_technology' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_technology_enable' )->value();
}

/*========================blog==============================*/
/**
 * Check if the blog is enabled
 */
function ostrich_magazine_if_blog_enabled( $control ) {
	return 0 != $control->manager->get_setting( 'ostrich_magazine_blog_enable' )->value();
}

/**
 * Check if the blog is category
 */
function ostrich_magazine_if_blog_cat( $control ) {
	return 'cat' === $control->manager->get_setting( 'ostrich_magazine_blog' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_blog_enable' )->value();
}

/**
 * Check if the blog is page
 */
function ostrich_magazine_if_blog_page( $control ) {
	return 'page' === $control->manager->get_setting( 'ostrich_magazine_blog' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_blog_enable' )->value();
}

/**
 * Check if the blog is post
 */
function ostrich_magazine_if_blog_post( $control ) {
	return 'post' === $control->manager->get_setting( 'ostrich_magazine_blog' )->value() && 0 != $control->manager->get_setting( 'ostrich_magazine_blog_enable' )->value();
}




/*========================latest==============================*/
/**
 * Check if the latest is enabled
 */
function ostrich_magazine_if_latest_enabled( $control ) {
	return 0 != $control->manager->get_setting( 'ostrich_magazine_latest_enable' )->value();
}

/*===================Footer=========================*/
/**
 * Check if the footer text is enabled
 */
function ostrich_magazine_if_footer_text_enable( $control ) {
	return $control->manager->get_setting( 'ostrich_magazine_enable_footer_text' )->value();
}

/**
 * Check if custom color scheme is enabled
 */
function ostrich_magazine_if_custom_color_scheme( $control ) {
	return 'custom' === $control->manager->get_setting( 'ostrich_magazine_color_scheme' )->value();
}


function ostrich_magazine_if_recent_enabled( $control ) {
	return 0 != $control->manager->get_setting( 'ostrich_magazine_recent_enable' )->value();
}