I am working on a site where the user can do everything from the front end. I am using the plugin from scribu called front-end editor. My problem, is that I have a dashboard page with all the options for the user and I do not want the user to be able to edit it. How do I restrict a page from being able to be edited by Front-End Editor. I have read the wiki on github for it here https://github.com/scribu/wp-front-end-editor/wiki/Actions-and-filters and can’t find anything about restricting pages. Only categories.

1 Answer
1

From the GitHub-Wiki

The 'front_end_editor_disable'-filter

Use this filter if you want to completely disable the plugin for certain URLs.

Callback arguments:

bool $disable: The current state. Default: false

You can use conditional tags: Conditionals tags return bool true/false, which means, if you want to disable it on a page, simply use is_page(), as it returns true for pages…

Disable FEE on pages, as a (mu)plugin.

<?php
/** Plugin Name: (#73660) Disable Front Page Editor on pages */
function wpse73660_disable_on_author_pages( $disable )
{
    return is_author();
}
add_filter( 'front_end_editor_disable', 'wpse73660_disable_on_author_pages' );

Leave a Reply

Your email address will not be published. Required fields are marked *