Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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' );
share|improve this answer
    
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
    
Awesome, that was all I needed. Thanks @kaiser –  Ryan Nov 23 '12 at 18:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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