=== Krevil User Registration & Login ===
Contributors: krevilraj
Donate link: 
Tags: registration, login, user, frontend, ajax
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A lightweight, developer-friendly plugin to create a dynamic registration form (with custom fields) and optional auto‑login—via a simple shortcode.

== Description ==

**Simple User Registration & Login** lets you build a flexible registration form from a table of custom fields and render it anywhere using a shortcode. It supports text, textarea, select, checkboxes, radio, number, date, email, URL, tel, and file upload types—plus basic validation, required flags, and user‑meta storage.

**Highlights**
- Shortcode‑based form: `[krevil_register]`
- Custom fields managed in wp‑admin (type, required, options, validation)
- Stores values in user meta on successful registration
- Optional auto‑login after registration
- Admin email notification and user “pending approval” email
- Translatable strings (`krevil-user-registration-login` text domain)
- Nonces and capability checks for security
- Clean, extensible code structure

== Features ==

- **Dynamic fields:** Configure label, slug, type, validation, required.
- **Multiple input types:** text, email, url, tel, number, date, textarea, select, checkboxes, radio, file.
- **Validation:** email/url/number/date/tel patterns; required checkbox groups enforced client‑side.
- **Email templates:** Admin/user messages customizable from the settings.
- **Auto‑login:** Toggle in settings.
- **Redirect after registration:** Optional URL from settings.
- **Security:** Nonces, sanitization, capability checks.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/krevil-user-registration-login/` or install via “Add New » Upload Plugin”.
2. Activate the plugin.
3. Go to **Settings » Simple user registration and login** to configure:
   - **General:** Redirect URL, Auto‑login
   - **Custom User Fields:** Add/edit/delete fields
   - **Mail Settings:** Admin/user email templates and toggles
4. Add the shortcode `[krevil_register]` to any page to display the registration form.

== Usage ==

- Place `[krevil_register]` in a page or post.
- Configure custom fields in **Settings » Simple user registration and login**.
- For **select/radio/checkboxes** options, use:
  - Select: `value1 : Label One | value2 : Label Two`
  - Checkboxes/Radio: `Label One | Label Two | Label Three`

== Frequently Asked Questions ==

= Can I auto‑login users after registration? =
Yes. Enable **Auto‑login** in the General tab.

= Where are field values stored? =
Values are saved as user meta under the configured slugs.

= How do I customize admin/user emails? =
Open **Settings » Simple user registration and login » Mail**, update subjects/bodies, and use tags:
`{site_name}`, `{user_login}`, `{user_email}`, `{first_name}`, `{last_name}`.

= Does the plugin send HTML emails? =
Yes. Messages are sent as HTML with proper headers set per email. The plugin does **not** globally force `wp_mail` filters.

= How do I add file upload fields? =
Create a field with type **file**. Files are uploaded to the Media Library and attachment IDs are saved in user meta.

== Screenshots ==
1. Settings – Custom User Fields table
2. Settings – Mail templates
3. Frontend – Registration form
4. Success notice with redirect

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
