/** * put your comment there... * */ public static function enqueueStyles() { // Import related styles. CJTBlocksBlockView::enqueueStyles(); // Initialize style. $styles = array('views:blocks:cjt-block:public:css:{CJT_BLOCKS_PAGE_BLOCK-}block'); // IF WP < 3.8 add compatibility CSS file. $wpVersion = new CJT_Framework_Wordpress_Currentversion(); if ($wpVersion->isLess('3.8')) { $styles[] = 'views:blocks:cjt-block:public:css:{CJT_BLOCKS_PAGE_BLOCK-}block-wp-lt-3.8'; } // Include styles. self::useStyles(__CLASS__, $styles); }
} /** * * */ public function setBlock($block) { // Set block. $this->block = $block; // Get block state (opened/closes) $closedBlockId = "cjtoolbox-{$this->block->id}"; $closedMetaboxes = get_user_meta(get_current_user_id(), 'closedpostboxes_cjtoolbox', true); $this->isClosed = in_array($closedBlockId, (array) $closedMetaboxes); } /** * put your comment there... * * @param mixed $name * @param mixed $value */ public function setOption($name, $value) { $this->params->{$name} = $value; // Chains! return $this; } } // End class. // Hookable! CJTBlocksBlockView::define('CJTBlocksBlockView');
/** * put your comment there... * */ public static function enqueueStyles() { // Regular block styles. CJTBlocksBlockView::enqueueStyles(); // Import related styles. self::useStyles(__CLASS__, 'framework:css:{CJT-}toolbox', 'views:blocks:metabox:public:css:{CJT-}metabox'); }