public function admin_scripts()
 {
     wp_register_script('cpacic-admin-cpac-settings', plugins_url('assets/js/admin/cpac-settings.js', __FILE__), array('jquery'));
     if ($this->cpac && $this->cpac->is_settings_screen()) {
         wp_enqueue_script('cpacic-admin-cpac-settings');
         wp_enqueue_media();
     }
 }
 /**
  * Basic setup for this add-on
  *
  * @since 1.0
  */
 public function init_addon()
 {
     $storage_models = array();
     // Abstract
     include_once 'classes/model.php';
     // Posts
     include_once 'classes/post.php';
     if ($post_types = $this->cpac->get_post_types()) {
         foreach ($post_types as $post_type) {
             if ($storage_model = $this->cpac->get_storage_model($post_type)) {
                 new CACIE_Editable_Model_Post($storage_model);
             }
         }
     }
     // Users
     include_once 'classes/user.php';
     if ($storage_model = $this->cpac->get_storage_model('wp-users')) {
         new CACIE_Editable_Model_User($storage_model);
     }
     // Media
     include_once 'classes/media.php';
     if ($storage_model = $this->cpac->get_storage_model('wp-media')) {
         new CACIE_Editable_Model_Media($storage_model);
     }
     // Taxonomy
     include_once 'classes/taxonomy.php';
     if ($taxonomies = $this->cpac->get_taxonomies()) {
         foreach ($taxonomies as $taxonomy) {
             if ($storage_model = $this->cpac->get_storage_model('wp-taxonomy_' . $taxonomy)) {
                 new CACIE_Editable_Model_Taxonomy($storage_model);
             }
         }
     }
     // Comment
     include_once 'classes/comment.php';
     if ($storage_model = $this->cpac->get_storage_model('wp-comments')) {
         new CACIE_Editable_Model_Comment($storage_model);
     }
 }
 /**
  * @since 2.5
  */
 public static function instance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }