开发者 |
husobj
wpexpertsio |
---|---|
更新时间 | 2022年11月25日 20:49 |
PHP版本: | 5.6 及以上 |
WordPress版本: | 6.0 |
版权: | GPLv2 or later |
Please note, this plugin works by setting a cookie to allow access to the site. If you are using a caching plugin or web hosting such as WP Engine that has in-built caching, you will need to configure the caching service to be disabled if the Password Protected cookie is set.翻译 If you would like to translate this plugin you can easily contribute at the Translating WordPress page. The stable plugin needs to be 95% translated for a language file to be available to download/update via WordPress.
Install and configure the Login Logo plugin by Mark Jaquith or the Uber Login Logo plugin. This will change the logo on your password entry page AND also your admin login page.
In the settings, check the 'Allow Feeds' checkbox.
In the settings, check the 'Allow Administrators' checkbox.
You must be an administrator (have the manage_options capability) and in the Password Protected settings, check the 'Allow Administrators' checkbox.
Just add a "password-protected=logout" query to your URL. eg. http://www.example.com/?password-protected=logout
If you go to your WordPress admin login page /wp-login.php
and it shows the admin login fields, you should still be able to login and disable the plugin.
If the admin login screen insteads shows the Password Protected field, you will need to access your site via SFTP/SSH and delete the Password Protected plugin folder in the plugins folder wp-content/plugins/password-protected
.
If passing a redirect URL using 'redirect_to' when logging out you need you may need to use the allowed domain names filter to allow redirecting to an external domain.
Please log issues and bugs on the plugin's GitHub page. You can also submit suggested enhancements if you like.
If you can, please fork the code and submit a pull request via GitHub. If you're not comfortable using Git, then please just submit it to the issues link above.
If you would like to translate this plugin you can easily contribute at the Translating WordPress page. The stable plugin needs to be 90% translated for a language file to be available to download/update via WordPress.
wp_no_robots
and replace with wp_robots_no_robots
for WordPress 5.7+password_protected_cookie_name
filter for the cookie name. Props Jose Castaneda.password_protected_options_page_capability
filter. Props Nicola Peluchetti.password_protected_login_password_title
filter to allow customizing the "Password" label on the login form. Props Jeremy Herve.$_SERVER['REMOTE_ADDR']
is set.password_protected_show_login
filter.