'default', 'emailConfirmation' => 'no', 'activationLandingPage' => '', 'adminApproval' => 'no', 'loginWith' => 'usernameemail', 'rolesEditor' => 'no' ) ); } /** * Function that adds content to the "General Settings" submenu page * * @since v.2.0 * * @return string */ function wppb_general_settings_content() { wppb_generate_default_settings_defaults(); ?>

  • '.dirname( dirname( plugin_basename( __FILE__ ) ) ).'\assets\css\style-front-end.css' ); ?>
  • All Users > Email Confirmation%2$s.', 'profile-builder' ), '', '' )?>

  • All Users > Admin Approval%2$s.', 'profile-builder' ), '', '' )?>
$role_name ) { echo '
'; } } ?>
  • Roles Editor%2$s.', 'profile-builder' ), '', '' )?>

', '' )?>

$settings_value ){ if( $settings_name == "minimum_password_length" || $settings_name == "activationLandingPage" ) $wppb_generalSettings[$settings_name] = filter_var( $settings_value, FILTER_SANITIZE_NUMBER_INT ); elseif( $settings_name == "extraFieldsLayout" || $settings_name == "emailConfirmation" || $settings_name == "adminApproval" || $settings_name == "loginWith" || $settings_name == "minimum_password_strength" ) $wppb_generalSettings[$settings_name] = filter_var( $settings_value, FILTER_SANITIZE_STRING ); elseif( $settings_name == "adminApprovalOnUserRole" ){ if( is_array( $settings_value ) && !empty( $settings_value ) ){ foreach( $settings_value as $key => $value ){ $wppb_generalSettings[$settings_name][$key] = filter_var( $value, FILTER_SANITIZE_STRING ); } } } } } return $wppb_generalSettings; } /* * Function that pushes settings errors to the user * * @since v.2.0.7 */ function wppb_general_settings_admin_notices() { settings_errors( 'wppb_general_settings' ); } add_action( 'admin_notices', 'wppb_general_settings_admin_notices' ); /* * Function that return user roles * * @since v.2.2.0 * * @return array */ function wppb_adminApproval_onUserRole() { global $wp_roles; $wp_roles = new WP_Roles(); $roles = $wp_roles->get_names(); unset( $roles['administrator'] ); return $roles; }