/** * create hw_skin instance * @param $ref */ public static function create_skin_manager(&$ref) { if (class_exists('HW_SKIN')) { $skin = new HW_SKIN($ref, HWRP_PLUGIN_PATH, 'hw_relatedposts_skins', 'hw-relatedposts-skin.php', 'skins'); $skin->plugin_url = HWRP_PLUGIN_URL; //set plugin url or url to app that use hw_skin $skin->enable_external_callback = false; //turn off/on external callback $skin->custom_skins_preview = true; //use own skins viewer /*$skin->set_template_header_info(array( //since all module use common template header: HW Template, importer/exporter that use same 'name' => 'HWRP Template', 'description' => 'Description', 'author' => 'Author' ));*/ $skin->add_skin_name_list(array('hw-category-posts.php')); $skin->match_skin_name_list('#hw-yarpp-template-.*#'); //set migrate data + compatible vars from active skin if found together (new) //set migrate data with this skin $skin->migrate(array('cat_posts' => 'wp_query', 'metaFields' => array(), 'arrExlpodeFields' => array('title', 'excerpt', 'comment_num', 'date', 'thumb', 'author'), 'instance' => array(), 'hwtpl_wrapper_id' => 'hwtpl_wrapper_id-hw-loop-template', 'hwtpl_scrollbar_wrapper_class' => 'hwtpl_scrollbar_wrapper_class-hw-loop-template', 'hwtpl_pagination_class' => 'hwtpl_pagination_class', 'awc_enable_grid_posts' => false, 'before_widget' => '', 'after_widget' => '', 'open_title_link' => '', 'close_title_link' => '', 'before_title' => '', 'widget_title' => '', 'after_title' => '')); $skin->enable_template_engine(); if (is_object($ref)) { $ref->skin = $skin; } } }