} /** * * */ 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');