本文整理汇总了PHP中TablePress::load_model方法的典型用法代码示例。如果您正苦于以下问题:PHP TablePress::load_model方法的具体用法?PHP TablePress::load_model怎么用?PHP TablePress::load_model使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TablePress
的用法示例。
在下文中一共展示了TablePress::load_model方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* 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);
}
示例2: __construct
/**
* Initialize all controllers, by loading Plugin and User Options, and performing an update check
*
* @since 1.0.0
*/
public function __construct()
{
$this->model_options = TablePress::load_model('options');
$this->model_table = TablePress::load_model('table');
// update check, in all controllers (frontend and admin), to make sure we always have up-to-date options
$this->plugin_update_check();
// should be done very early
// Admin Page Menu entry, needed for construction of plugin URLs
$this->parent_page = apply_filters('tablepress_admin_menu_parent_page', $this->model_options->get('admin_menu_parent_page'));
$this->is_top_level_page = in_array($this->parent_page, array('top', 'middle', 'bottom'), true);
}