Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Inline editor WordPress

  • REFUNDED

I would like to use the script http://valums.com/edit-in-place at my WP website as a simple inline post editor. Now I need a function that allow certain users edit their posts (via current_user_can( 'edit_post', $post->ID )) and a function that will update db field with the new value of the editable entry. Someone can help me to create these functions? My website built with html5.

Answers (3)

2011-06-16

Julian Lannigan answers:

I would suggest trying out this plugin: [[LINK href="http://wordpress.org/extend/plugins/front-end-editor/"]]http://wordpress.org/extend/plugins/front-end-editor/[[/LINK]]


Julian Lannigan comments:

Then if you want to control who can edit. Add this to your functions.php file:

function fee_allow_edit( $allow, $data ) {
return $allow && current_user_can( 'edit_post', $data['post_id'] );
}
add_filter( 'front_end_editor_allow_post', 'fee_allow_edit', 10, 2 );


Dmitriy Son comments:

Julian, I know about this plugin. I don't want to use it.


Julian Lannigan comments:

Any particular reason? Just curious.


Dmitriy Son comments:

at least two reasons:
(1) FEE ajax loading hangs until page reloaded. Of course, I can't edit via plugin.
(2) Instead of normal title the plugin shows something like this:
<span data-type="input" data-term_id="7" data-taxonomy="category" class="fee-field fee-filter-single_cat_title">Category title</span>

Within a day I can't see what's wrong with this... i've tried to change templates and deactivate plugins. nothing helps.

2011-06-16

Victor Teixeira answers:

I suggwst that you use the front end editor plugin: http://wordpress.org/extend/plugins/front-end-editor/


Victor Teixeira comments:

Julian was one minute earlier...

2011-06-16

Joe Jenkins answers:

I like this plugin:
http://wordpress.org/extend/plugins/inline-editor

I find it does a much better job than the previously mentioned plugin, and gives many more options.


Dmitriy Son comments:

Joe, I like it too, but it doesnt work with html5. I gonna make something similar. Just one problem: i don't know how to update mysql table with new value.


Joe Jenkins comments:

Ah, I see.

Maybe you could take a look at the plugin, then see how they do it.