3

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.

4

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' );
  • Hi Kaiser, how would this look like then if I wanted to disable on a page titled "dashboard"? – Ryan Nov 23 '12 at 11:38
  • @Ryan Have you read into the Codex and Conditional Tags? There's is_page() and it takes an argument... – kaiser Nov 23 '12 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.