<?php /** * Created by PhpStorm. * User: Hoang * Date: 15/06/2015 * Time: 21:16 */ HW_HOANGWEB::load_fieldtype('APF_hw_admin_table'); /** * Class HWAWC_SaveWidgets_options */ class HWAWC_SaveWidgets_options extends AdminPageFramework { /** * page slug constant */ const PAGE_SLUG = 'hw_widgets_settings'; /** * setup form fields */ public function setUp() { // Set the root menu $this->setRootMenuPage('Settings'); // specifies to which parent menu to add. // Add the sub menus and the pages $this->addSubMenuItems(array('title' => 'Lưu cấu hình widgets', 'page_slug' => self::PAGE_SLUG)); //define tabs $this->addInPageTabs(self::PAGE_SLUG, array('tab_slug' => 'widgets-config', 'title' => __('Cấu hình widgets'))); $this->setInPageTabTag('h2');
<?php #/root> if (class_exists('HW_HOANGWEB')) { HW_HOANGWEB::load_fieldtype('APF_hw_condition_rules'); } //load query rules apf field if (class_exists('AdminPageFramework_MetaBox')) { class HW_Conditions_Metabox extends AdminPageFramework_MetaBox { private static $instance; //current class instance /** * set class instance * @param $inst: an object instanceof this class */ public static function setInstance($inst) { if ($inst instanceof HW_Conditions_Metabox) { self::$instance = $inst; } } /** * return once instance for this class * @return mixed */ public static function getInstance() { return self::$instance; } /**
<?php #root>includes/hoangweb-core.php if (!defined('ABSPATH')) { exit; } if (!class_exists('AdminPageFramework')) { #include_once(HW_HOANGWEB_PATH.'/lib/admin-page-framework/admin-page-framework.min.php'); //require admin page framework HW_HOANGWEB::load_class('AdminPageFramework'); } //load hw_table_fields type HW_HOANGWEB::load_fieldtype('APF_hw_table_fields'); HW_HOANGWEB::load_class('HW_POST'); //register_class('HW_POST', HW_HOANGWEB_PATH.'/classes/hw_posts.class.php'); if (function_exists('hwskin_load_APF_Fieldtype')) { hwskin_load_APF_Fieldtype(HW_SKIN::SKIN_FILES); } /** * Interface HW_AdminPageFramework_Interface */ interface HW_AdminPageFramework_Interface { /** * @param $menu_arg * @return mixed */ public static function valid_custom_submenu($menu_arg); } /** * Interface HW_APF_Field_Page_Interface */