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