Actions and filters

bookchiq edited this page Nov 30, 2012 · 2 revisions

Front-end Editor comes with several hooks for fine-tuning its behaviour.


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:

Disable FEE on author archive pages

function fee_disable_on_author_pages( $disable ) {
    return is_author();
add_filter( 'front_end_editor_disable', 'fee_disable_on_author_pages' );


Use this filter if you want more fine-grained control over which fields are editable by which users.

$type is the type of object being edited. It can be: post, comment, term, option, widget, user

Callback arguments:

  • bool $allow The current state. Default: true
  • array $data Various information about the current object, like post_id etc.
  • string $filter The current filter name, such as 'the_content'
  • string $input_type The current input type: input, textarea, rich, checkbox, radio or select

Usually, you'll only need $allow and $data.

Allow editing only posts belonging to a certain category

function fee_specific_category( $allow, $data ) {
	return $allow && in_category( 'wiki', $data['post_id'] );
add_filter( 'front_end_editor_allow_post', 'fee_specific_category', 10, 2 );


This action is fired exactly after all the default field types have been registered.

It's intended use is registering new field types or manipulating default ones. This is done using fee_register_field().


This is an action fired right after FEE has finished loading all the JS and CSS.

It's a good place to add additional JavaScript.

Callback arguments:

  • array $wrapped List of filters found at the current URL


This filter allows you to change the data-* attributes of the tag that wraps editable fields.

An example can be found in Editing taxonomies.

Callback arguments:

  • array $data An associative array containing all the available data about that particular field, like the post id, the input type, etc.
  • string $filter The current filter, i.e. the_content, the_title etc.