/** * add meta box to yarpp setting page */ function _hwrp_add_custom_meta_box() { if (class_exists('HWRP_Meta_Box_Settings')) { add_meta_box('hw_yarpp_setting', __('Hoangweb cài đặt bài viết liên quan', 'hwrp'), array(HWRP_Meta_Box_Settings::getInstance(), 'display'), 'settings_page_hw_yarpp', 'normal', 'core'); add_meta_box('hwrp_shortcode', __('Hiển thị bài viết liên quan'), array(HWRP_Meta_Box_Settings::getInstance(), 'display_how_to_use'), 'settings_page_hw_yarpp', 'normal', 'core'); } }
/** * create first of all instance for this class * @return HWRP_Meta_Box_Settings */ public static function getInstance() { if (!self::$instance) { self::$instance = new self(); } return self::$instance; }