Beispiel #1
1
 /**
  * Init the Table model by instantiating a Post model and loading the list of tables option.
  *
  * @since 1.0.0
  */
 public function __construct()
 {
     parent::__construct();
     $this->model_post = TablePress::load_model('post');
     $params = array('option_name' => 'tablepress_tables', 'default_value' => $this->default_tables);
     $this->tables = TablePress::load_class('TablePress_WP_Option', 'class-wp_option.php', 'classes', $params);
 }
 /**
  * Init Options Model by creating the object instances for the Plugin and User Options.
  *
  * @since 1.0.0
  */
 public function __construct()
 {
     parent::__construct();
     $params = array('option_name' => 'tablepress_plugin_options', 'default_value' => $this->default_plugin_options);
     $this->plugin_options = TablePress::load_class('TablePress_WP_Option', 'class-wp_option.php', 'classes', $params);
     $params = array('option_name' => 'tablepress_user_options', 'default_value' => $this->default_user_options);
     $this->user_options = TablePress::load_class('TablePress_WP_User_Option', 'class-wp_user_option.php', 'classes', $params);
     // Filter to map Meta capabilities to Primitive Capabilities.
     add_filter('map_meta_cap', array($this, 'map_tablepress_meta_caps'), 10, 4);
 }
 /**
  * Init the model by registering the Custom Post Type
  *
  * @since 1.0.0
  */
 public function __construct()
 {
     parent::__construct();
     $this->_register_post_type();
     // we are on WP "init" hook already
 }