redirect feature for Privacy plugin

[url removed, login to view]

When the privacy plugin is installed, you can set pages to be private to a user or group. This is set by editing the page you want to add the privacy to, in the Privacy tab.

What I want is a new option in that tab, "If a visitor is not logged in, redirect them to:", which lets you set another page as the target.

The page should be selected using a select-box which works exactly the same as the "Redirect On Login" option in user registration pages. To see a user registration page for an example, create a new page of type "Privacy", and look at the Options tab. Two things to note: 1) it has an option for "None", 2) it loads its options asynchronously. The code for this is already written, so use it.

On the front-end, non-logged-in visitors that open the protected page will be redirected immediately to the target page if a target page is set. Use the redirect() function for this. it sets proper headers, etc.

In order to have the reader redirected before any output is shown, you will need to use a trigger. For an example of that, see the Online Store plugin's plugin.php. It uses the "initialisation-completed" trigger, so you could copy that.

Kemahiran: jQuery / Prototaip, PHP

Lihat lagi: the p.i.c. group, p&a group, online copy editing, code for store online, privacy, kv, plugin php, php redirect page, http redirect page, php http redirect, http redirect, redirect code, select option group, http redirect code, add login feature, redirect login, plugin google, user registration feature, registration issues login, redirect pages, php online reader, page will redirect, set online store, feature google, login plugin

Tentang Majikan:
( 10 ulasan ) Monaghan, Ireland

ID Projek: #1572715

Dianugerahkan kepada:


Hired by the Employer

$30 USD dalam 14 hari
(18 Ulasan)