=== Chout - Custom Login Page ===
Contributors:        nmtnguyen56
Donate link:         https://chout.id.vn/donate
Tags:                login, custom login, login page, recaptcha, security
Requires at least:   6.4
Tested up to:        7.0
Stable tag:          1.28.0
Requires PHP:        7.4
License:             GPLv2 or later
License URI:         https://www.gnu.org/licenses/gpl-2.0.html

Customize the logo, links, colors and background on the WordPress login page. Give your WordPress login page a custom and professional look.

== Description ==

**Custom Login Page** allows you to easily customize the appearance of your WordPress login page. Impress your clients or brand your website right from the login screen.

With this plugin, you can:

* **Customize the Login Logo:**
   * Upload your own logo.
   * Set a custom URL for the logo link (defaults to your site's homepage).
   * Define a specific height for your logo.
   * The width is automatically calculated based on the height, which helps prevent image distortion, maintain the correct aspect ratio, and ensure the link area is not exceeded.
* **Format Login Page Content:**
   * Set a custom background image for the entire page.
   * Choose a fallback background color if not using an image.
* **Customize the Login Form:**
   * Change the form's background color and adjust its opacity.
   * Set a custom border width, color (with opacity), and border radius for the form.
   * Modify the text, background and border colors for input fields.
   * Customize link colors (normal and hover states).
* **Format Login Button:**
   * Change the background color and text color for the login button (normal and hover states).
	* **Hide Elements:**
	   * Option to hide the "Privacy Policy" link.
	   * Option to hide the language switcher (if present).
	   * Option to hide the "Back to [Site Name]" link.
	* **Protect Login with Google reCAPTCHA:**
	   * Choose reCAPTCHA v2 Checkbox or reCAPTCHA v3 Score.
	   * Enter the site key and secret key directly in the Customizer.
	   * Select the light or dark theme for the reCAPTCHA v2 checkbox and v3 badge.
	   * Adjust the v3 score threshold.
	* **Visual Customizer Workflow:**
	   * Easy-to-use interface under `Appearance` > `Customize` > `Custom Login Page`.
	   * Shows a sample login screen in the Customizer preview.
   * Uses the WordPress Media Uploader for image selection.
   * Includes a color picker for easy color selection.
   * Reset to default options directly inside the Customizer.
* **Lightweight and Secure:**
   * Clean code following WordPress standards.
   * Properly sanitizes all inputs and escapes outputs.
* **Translation Ready:** This plugin is ready for translation.
   * A `.pot` (Portable Object Template) file named `err-custom-login-page.pot` is included in the `languages/` folder. Translators can use this file to create new language packs.
   * The text domain used is `err-custom-login-page`.
   
This plugin provides a simple yet powerful way to transform your standard WordPress login page into a branded and visually appealing entry point for your website.

== Installation ==

1.  **Via WordPress Plugin Uploader:**
   * Download the plugin ZIP file (`err-custom-login-page.zip`).
   * In your WordPress admin panel, go to `Plugins` > `Add New`.
   * Click `Upload Plugin` at the top.
   * Click `Choose File` and select the downloaded ZIP file.
   * Click `Install Now`.
   * Activate the plugin through the 'Plugins' menu in WordPress.

2.  **Via FTP:**
   * Download the plugin ZIP file (`err-custom-login-page.zip`).
   * Extract the ZIP file. You will get a folder named `err-custom-login-page`.
   * Upload the `err-custom-login-page` folder to the `/wp-content/plugins/` directory on your server.
   * Activate the plugin through the 'Plugins' menu in WordPress.

3.  **Configuration:**
    * After activation, navigate to `Appearance` > `Customize` > `Custom Login Page` in your WordPress admin panel to customize the login page with a live sample preview.

== Frequently Asked Questions ==

= Where can I configure the plugin? =

You can configure all options under `Appearance` > `Customize` > `Custom Login Page`.

= How do I select an image for the logo or background? =

The plugin uses the native WordPress Media Uploader. In the Customizer, open the image control for the logo or background, then choose an existing image from your Media Library or upload a new one.

= What happens if I don't set a body background image? =

If no body background image is selected, the "Body Background Color (Fallback)" will be used. If that is also not set, it will default to the standard WordPress login page background color.

= Can I reset the settings to default? =

Yes, the Customizer section includes a "Reset All Options to Default" button. After clicking it, publish the Customizer changes to save the reset.

= Which Google reCAPTCHA versions are supported? =

The plugin supports reCAPTCHA v2 Checkbox and reCAPTCHA v3 Score. Both require a matching site key and secret key from Google. You can choose either the light or dark theme for the v2 checkbox and v3 badge.

= Does this plugin connect to an external service? =

Yes. If Google reCAPTCHA is enabled and configured, the plugin connects to Google reCAPTCHA to render the challenge or score badge and to verify login attempts. See the External Services section below for details.

= Is the plugin translation ready? =

Yes, the plugin is translation ready. The text domain is `err-custom-login-page`. A Vietnamese translation is already included. You can create your own translations using tools like Poedit.

= My logo looks stretched or too small. How can I fix this? =

Try adjusting the "Logo Height (px)" setting. If you leave it blank, the plugin will try to size it automatically based on the image dimensions, but for best results, provide a logo that is appropriately sized for a login page and then fine-tune with the height setting if needed. Using a PNG with a transparent background is recommended for logos.

== External Services ==

This plugin can connect to Google reCAPTCHA, a service provided by Google LLC, when the site administrator enables Google reCAPTCHA in the Customizer and enters a Site Key and Secret Key.

Google reCAPTCHA is optional. If it is disabled, or if the required keys are not configured, this plugin does not load Google reCAPTCHA scripts and does not send reCAPTCHA verification requests to Google.

When Google reCAPTCHA is enabled:

* The WordPress login screen loads the Google reCAPTCHA API script from `https://www.google.com/recaptcha/api.js`.
* The visitor's browser communicates with Google to display the reCAPTCHA v2 checkbox or the reCAPTCHA v3 badge and to generate a reCAPTCHA response token.
* During a login attempt, the plugin sends the reCAPTCHA response token, the configured Secret Key, and the visitor IP address if available to Google's verification endpoint at `https://www.google.com/recaptcha/api/siteverify`.
* The configured Site Key is displayed in the browser as required by Google reCAPTCHA. The configured Secret Key is stored in WordPress options and is used only for server-side verification.
* This plugin does not store the visitor's reCAPTCHA response token or Google's verification response.

Google may collect and process visitor data as described in Google's own policies. Site owners should review those policies before enabling reCAPTCHA.

Service: Google reCAPTCHA - https://www.google.com/recaptcha/

Terms of Service: https://policies.google.com/terms

Privacy Policy: https://policies.google.com/privacy

== Screenshots ==

1.  **Customizer Settings:** The visual Customizer section where you can adjust the login page options.
2.  **Customized Login Page Example:** An example of a login page customized with a new logo, background and colors.

== Changelog ==

= 1.28.0 =
* Feature: Added input field background and border color controls.
* Feature: Added Google reCAPTCHA v2 Checkbox and v3 Score protection for the login form.
* Feature: Added a light/dark theme selector for reCAPTCHA.

= 1.26.0 =
* Initial public release.
* Feature: Customize login page logo, logo URL and logo height.
* Feature: Customize body background image and color.
* Feature: Customize login form background color, opacity, border (width, color, opacity, radius).
* Feature: Customize form text color, input text color, link colors (normal & hover).
* Feature: Customize login button background and text colors (normal & hover).
* Feature: Options to hide privacy policy link, language switcher and "back to site" link.
* Feature: Visual Customizer settings and reset to default functionality.
* Feature: Added Vietnamese translation.

== Upgrade Notice ==

= 1.28.0 =
Added input field background and border color controls.
Added Google reCAPTCHA v2 Checkbox and v3 Score protection for the login form.

= 1.26.7 =
Update the Customizer workflow.

= 1.26.5 =
Change name.

= 1.26.0 =
This is the first version of the plugin. Enjoy customizing your WordPress login page!

== Support ==

If you have any issues or suggestions, please use the plugin's support forum on WordPress.org or contact the author via their Author URI.

== Donations ==

If you find this plugin useful and would like to support its development, please consider making a [donation](https://chout.id.vn/donate). Thank you!
