| Server IP : 14.225.204.176 / Your IP : 216.73.216.252 Web Server : nginx/1.24.0 System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64 User : root ( 0) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/php/langngon.com/wp-content/themes/langngon/class/ |
Upload File : |
<?php
/**
* Custom categories for the theme.
*
* @copyright ZiniMedia 2016
* @version Release: 1.0
* @package penguinmag\class
* @author ZiniMedia-BM
*/
if(!class_exists('ZiniCategorySettings')){
class ZiniCategorySettings{
private $numberOfItems = null;
private $modeLayout = null;
private $categoryMetaInfo = null;
/**
* Sets values for constructor
*/
function __construct(){
$this->numberOfItems = get_field('zini_category_number_of_items','option');
$this->modeLayout = get_field('zini_category_mode_layout', 'option');
$this->categoryMetaInfo = get_field('zini_category_meta_info', 'option');
}
function __destruct(){}
/**
* Get value for number of items.
* @return int
*/
public function getNumberOfItems(){
if ($this->numberOfItems) {
return $this->numberOfItems;
} else
$this->numberOfItems = get_option('posts_per_page');
return $this->numberOfItems;
}
/**
* Set value for number of items
* @param $numberOfItems
*/
public function setNumberOfItems($numberOfItems){
$this->numberOfItems= $numberOfItems;
}
/**
* Get value for mode layout
* @return number
*/
public function getModeLayout(){
return $this->modeLayout;
}
/**
* Set value for mode layout
* @param $modeLayout
*/
public function setModeLayout($modeLayout){
$this->modeLayout = $modeLayout;
}
/**
* Get value for category meta info
* @return array
*/
public function getCategoryMetaInfo(){
if ($this->categoryMetaInfo)
return $this->categoryMetaInfo;
return array('');
}
/**
* Set value for category meta info
* @param $categoryMetaInfo
*/
public function setCategoryMetaInfo($categoryMetaInfo){
$this->categoryMetaInfo =$categoryMetaInfo;
}
/**
* Check enable image in category
* @return boolen
*/
public function checkEnableImage(){
if (in_array("category_img", $this->categoryMetaInfo))
return true;
return false;
}
/**
* Check enable author in category
* @return boolen
*/
public function checkEnableAuthor(){
if (in_array("category_author", $this->categoryMetaInfo))
return true;
return false;
}
/**
* Check enable date in category
* @return boolen
*/
public function checkEnableDate(){
if (in_array("category_date", $this->categoryMetaInfo))
return true;
return false;
}
}
}
?>