Mô tả
This is a very small plugin that forces users to login before viewing any content. This is done by checking if the user is logged in, and if not, redirecting them to the login page. Users attempting to view blog content via RSS are also authenticated via HTTP Auth.
Modification: use get_site_url() to redirect to the login page properly when WordPress is located in a subdirectory.
Cài đặt
- Upload
force-login.php
to the/wp-content/plugins/
directory - Activate the plugin through the ‘Plugins’ menu in WordPress
Hỏi đáp
- Can I change where the user is redirected after logging in?
-
Yes! A variable called $redirect_to (line 33) is currently set to redirect the user to the page they were trying to access. If you changed that line from
$redirect_to = $_SERVER['REQUEST_URI'];
to
$redirect_to = '/';
it would redirect the user to the home page.
Đánh giá
Không có đánh giá nào cho plugin này.
Người đóng góp & Lập trình viên
“Force User Login” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.
Những người đóng gópDịch “Force User Login” sang ngôn ngữ của bạn.
Muốn tham gia phát triển?
Duyệt code, check out SVN repository, hoặc theo dõi nhật ký phát triển qua RSS.
Nhật ký thay đổi
1.0.2
- Tested with WordPress 4.3
- Updated meta description
- A screenshot added