Beispiel #1
0
    public function &getBlockView()
    {
        return $this->blockView;
    }
    /**
     * put your comment there...
     * 
     * @param mixed $pin
     * @param mixed $type
     */
    public function getPinCheckbox($name, $pin)
    {
        $checked = $this->getBlockView()->getBlock()->pinPoint & $pin ? 'checked=checked' : '';
        // Get checkbox value from pin.
        $value = dechex($pin);
        $checkbox = "<input type='checkbox' name='cjtoolbox[{$this->getBlockView()->getBlock()->id}][{$name}][]' value='{$value}' {$checked} />";
        return $checkbox;
    }
    /**
     * 
     * 
     */
    public function setBlock($block)
    {
        $this->blockView->setBlock($block);
    }
}
// End class.
// Hookable!!
CJTBlocksCjtBlockView::define('CJTBlocksCjtBlockView');
Beispiel #2
0
 /**
  * Enqueue styles.
  * 
  * Callback for admin_print_styles-[$hook_manage].
  */
 public static function enququeStyles()
 {
     // Enquque single block styles.
     CJTBlocksCjtBlockView::enqueueStyles();
     // Styles list.
     $styles = array('framework:css:{CJT-}toolbox', 'views:blocks:manager:public:css:{CJT-}blocks');
     // IF WP < 3.8 add compatibility CSS file.
     $wpVersion = new CJT_Framework_Wordpress_Currentversion();
     if ($wpVersion->isLess('3.8')) {
         $styles[] = 'views:blocks:manager:public:css:{CJT-}blocks-wp-lt-3.8';
     }
     // Include styles.
     self::useStyles(__CLASS__, $styles);
 }