priority ); } /** * Register the menu page. */ public function register() { $function = ( $this->function ) ? array( $this, $this->function ) : NULL; add_submenu_page( $this->parent_slug, $this->get_page_title(), $this->get_menu_title(), apply_filters( 'ninja_forms_submenu_' . $this->get_menu_slug() . '_capability', $this->get_capability() ), $this->get_menu_slug(), $function ); } public function get_page_title() { return $this->page_title; } public function get_menu_title() { return ( $this->menu_title ) ? $this->menu_title : $this->get_page_title(); } public function get_menu_slug() { return ( $this->menu_slug ) ? $this->menu_slug : 'nf-' . strtolower( preg_replace( '/[^A-Za-z0-9-]+/', '-', $this->get_menu_title() ) ); } public function get_capability() { return $this->capability; } /** * Display the menu page. */ public abstract function display(); }