/** * Init of class JB_Lib * @param void * @return void * @since 1.0 * @package JBTHEME * @category void * @author JACK BUI */ public function init() { $jb_post = JB_Posts::get_instance(); $jb_post->init(); $jb_option = JB_Options::get_instance(); $jb_option->init(); $this->ajaxInit(); }
public function __construct($post_type = '', $taxs = array(), $meta_data = array(), $localize = array()) { parent::__construct('jb_about', $taxs, $meta_data, $localize); $this->taxs = array(); $this->create_rules = array('post_title' => 'required', 'post_content' => 'required'); $this->meta = array('fb_url', 'tw_url', 'gplus_url', 'website_url'); $this->defautl_field = array('post_title', 'post_content', 'fb_url', 'tw_url', 'gplus_url', 'website_url'); $this->convert = array('ID', 'post_type', 'post_status', 'post_content', 'post_title', 'post_author', 'fb_url', 'tw_url', 'gplus_url', 'website_url'); }
public function __construct($post_type = '', $taxs = array(), $meta_data = array(), $localize = array()) { parent::__construct('jb_slider', $taxs, $meta_data, $localize); $this->taxs = array(); $this->create_rules = array('post_title' => 'required', 'the_post_thumbnail' => 'required'); $this->meta = array(); $this->defautl_field = array('post_title'); $this->convert = array('ID', 'post_type', 'post_status', 'post_content', 'post_title', 'post_author'); }
/** * Override convert function * * @param void * @return void * @since 1.0 * @package JBTHEME * @category void * @author JACK BUI */ public function convert($post_data = array(), $thumbnail = 'medium_post_thumbnail', $excerpt = true, $singular = false) { $data = parent::convert($post_data, $thumbnail, $excerpt, $singular); $data->work_category_slug = ''; $cat_list = $data->tax_input['work_category']; if (!empty($cat_list)) { foreach ($cat_list as $key => $cat) { $data->work_category_slug .= $cat->slug . ' '; } } return $data; }
function __construct() { self::$objects = array('post' => JB_Posts::get_instance()); }
public function wp_init() { $jb_post = JB_Posts::get_instance(); $jb_post->jb_register_post_type(); }