content_restriction_settings['contentRestriction'] ) ) { $content_restriction_activated = $this->content_restriction_settings['contentRestriction']; } elseif ( ! empty( $this->general_settings['contentRestriction'] ) ) { $content_restriction_activated = $this->general_settings['contentRestriction']; } $roles_editor_available = file_exists( WPPB_PLUGIN_DIR . '/features/roles-editor/roles-editor.php' ); $admin_approval_available = defined( 'WPPB_PAID_PLUGIN_DIR' ); $login_registration_fields = array( array( 'name' => 'automaticallyLogIn', 'id' => 'wppb_settings_automatically_log_in', 'value' => 'Yes', 'checked' => ! empty( $this->general_settings['automaticallyLogIn'] ) && $this->general_settings['automaticallyLogIn'] === 'Yes', 'label' => __( 'Automatically log users in after registration', 'profile-builder' ), 'desc' => __( 'Log users in right after they register.', 'profile-builder' ), 'icon' => '', ), array( 'name' => 'emailConfirmation', 'id' => 'emailConfirmation', 'value' => 'yes', 'checked' => ! empty( $this->general_settings['emailConfirmation'] ) && $this->general_settings['emailConfirmation'] === 'yes', 'label' => __( 'Verify email addresses', 'profile-builder' ), 'desc' => __( 'Ask users to confirm their email before they can sign in.', 'profile-builder' ), 'icon' => '', ), array( 'name' => 'hide_admin_bar_for_subscriber', 'id' => 'hide_admin_bar_for_subscriber', 'value' => 'Yes', 'checked' => ! empty( $this->general_settings['hide_admin_bar_for'] ) && in_array( 'Subscriber', $this->general_settings['hide_admin_bar_for'], true ), 'label' => __( 'Hide the admin bar for the subscriber role', 'profile-builder' ), 'desc' => __( 'Hide the WordPress admin bar for Subscribers on the front end.', 'profile-builder' ), 'title' => __( 'You can modify each role individually in the settings', 'profile-builder' ), 'icon' => '', ), array( 'name' => 'adminApproval', 'id' => 'adminApproval', 'value' => 'yes', 'checked' => $admin_approval_available && ! empty( $this->general_settings['adminApproval'] ) && $this->general_settings['adminApproval'] === 'yes', 'disabled' => ! $admin_approval_available, 'label' => __( 'Admin Approval for new users', 'profile-builder' ), 'desc' => __( 'Hold new accounts until an admin approves them.', 'profile-builder' ), 'title' => ! $admin_approval_available ? __( 'Available in the Pro version', 'profile-builder' ) : '', 'icon' => '', ), ); $feature_fields = array( array( 'name' => 'contentRestriction', 'id' => 'contentRestriction', 'value' => 'yes', 'checked' => $content_restriction_activated === 'yes', 'label' => __( 'Content Restriction', 'profile-builder' ), 'desc' => __( 'Restrict posts and pages by logged-in status or role.', 'profile-builder' ), 'icon' => '', ), ); if ( $roles_editor_available ) { $feature_fields[] = array( 'name' => 'rolesEditor', 'id' => 'rolesEditor', 'value' => 'yes', 'checked' => ! empty( $this->general_settings['rolesEditor'] ) && $this->general_settings['rolesEditor'] === 'yes', 'label' => __( 'Roles Editor', 'profile-builder' ), 'desc' => __( 'Create and edit custom roles and capabilities.', 'profile-builder' ), 'icon' => '', ); } /** * Render a setup wizard toggle field row. * * @param array $field Field definition. */ $render_setup_field = static function ( $field ) { $disabled = ! empty( $field['disabled'] ); $title = ! empty( $field['title'] ) ? $field['title'] : ''; ?>

>

>
value="" >