public static function create_page_template($args = array()) { $plugin_path = isset($args['plugin_path']) ? $args['plugin_path'] : ''; $folder_path = isset($args['folder_path']) ? $args['folder_path'] : ''; $templates = isset($args['templates']) ? $args['templates'] : array(); if (empty($plugin_path) || !is_array($templates)) { return; } $page_template = new SB_Page_Template(); $page_template->set_plugin_path($plugin_path); if (!empty($folder_path)) { $page_template->set_folder_path($folder_path); } $page_template->add_array_templates($templates); $page_template->hook(); }