init(); $this->initHooks(); do_action( ace()->getPrefixedActionHook( 'init_admin_menu_page' ), $this ); } /** * Init **/ protected function init() {} /** * Init hooks **/ protected function initHooks() { add_action( 'admin_menu', array( $this, 'adminMenu' ) ); add_action( 'admin_notices', array( $this, 'optionUpdateMessage' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'adminEnqueueScripts' ) ); } /** * Init hooks * @param string $hook **/ public function adminEnqueueScripts( $hook ) {} function optionUpdateMessage() { if( !empty( $_REQUEST['settings-updated'] ) && isset( $_REQUEST['page'] ) && $_REQUEST['page'] === $this->menuSlug ) echo '
' . __( 'Saved.', 'ace' ) . '