*/ public static function get_subtabs(): array { return array( self::SUB_PAGES => __( 'Pages', '4wp-account' ), self::SUB_ACCOUNT_MENU => __( 'Account Menu', '4wp-account' ), self::SUB_BLOCKS => __( 'Blocks / Shortcodes', '4wp-account' ), ); } /** * @param string $sub Current sub-tab. */ public static function render( string $sub ): void { $sub = array_key_exists( $sub, self::get_subtabs() ) ? $sub : self::SUB_PAGES; ?>

'forwp-account', 'tab' => 'settings', 'section' => $sub, ), admin_url( 'admin.php' ) ); } /** * Pages: account page selector. */ private static function render_pages_section(): void { $page_id = AccountMenu::get_account_page_id(); $pages = get_pages( array( 'sort_column' => 'post_title', 'sort_order' => 'ASC', ) ); $page_url = AccountMenu::get_account_page_url(); $hide_toolbar = get_option( 'forwp_account_hide_toolbar_subscribers', '0' ); $redirect_url = get_option( 'forwp_account_subscriber_redirect_url', '' ); $replace_login = get_option( WpLoginGate::OPTION, '0' ); $has_entry = WpLoginGate::page_has_auth_entry( $page_id ); $marker = ''; if ( $page_id > 0 ) { $page = get_post( $page_id ); if ( $page instanceof \WP_Post ) { $marker = WpLoginGate::detect_auth_marker( $page ); } } ?>

forwp/account [forwp_account]
forwp/account-menu [forwp_account_menu]
forwp/auth-buttons [forwp_account_signin_buttons providers="gmail,github"]
— [forwp_account_login provider="gmail"]

forwp/auth-buttons — [forwp_account_signin_buttons providers="gmail,github"]

forwp/account —

forwp/account-link —

forwp/account-menu —

[forwp_account] / [forwp_account_link] / [forwp_account_menu] —

0 && get_edit_post_link( $notif_page_id, 'raw' ) ) : ?> · 0 && get_edit_post_link( $favorites_page_id, 'raw' ) ) : ?> ·

$post Raw POST. */ public static function save( array $post ): void { if ( isset( $post['forwp_account_page_id'] ) ) { $page_id = absint( $post['forwp_account_page_id'] ); AccountMenu::set_account_page_id( $page_id ); update_option( 'forwp_account_hide_toolbar_subscribers', ! empty( $post['forwp_account_hide_toolbar_subscribers'] ) ? '1' : '0' ); if ( isset( $post['forwp_account_subscriber_redirect_url'] ) ) { update_option( 'forwp_account_subscriber_redirect_url', sanitize_text_field( $post['forwp_account_subscriber_redirect_url'] ) ); } WpLoginGate::set_enabled( ! empty( $post['forwp_account_replace_wp_login'] ), $page_id ); } // phpcs:ignore WordPress.Security.NonceVerification.Missing $sub = isset( $post['forwp_account_settings_sub'] ) ? sanitize_key( (string) $post['forwp_account_settings_sub'] ) : self::SUB_PAGES; if ( self::SUB_ACCOUNT_MENU === $sub ) { AccountMenuTab::save( $post ); } } }