Hi,
which other plugin are you using for frontend editing? Probably there is some conflict.
Hi
Its called User Frontend Pro – I inserted your template tag into their code like so:
<?php
if ( wpuf_get_option( ‘enable_post_edit’, ‘wpuf_dashboard’, ‘yes’ ) == ‘yes’ ) {
$disable_pending_edit = wpuf_get_option( ‘disable_pending_edit’, ‘wpuf_dashboard’, ‘on’ );
$edit_page = (int) wpuf_get_option( ‘edit_page_id’, ‘wpuf_general’ );
$url = add_query_arg( array(‘pid’ => $post->ID), get_permalink( $edit_page ) );
if ( $post->post_status == ‘pending’ && $disable_pending_edit == ‘on’ ) {
// don’t show the edit link
} else {
?>
“><?php _e( ‘Edit’, ‘wpuf’ ); ?>
<?php
}
}
?>
<?php duplicate_post_clone_post_link(‘Clone’,’ | ‘,’ |’,$post->ID); ?>
<?php
if ( wpuf_get_option( ‘enable_post_del’, ‘wpuf_dashboard’, ‘yes’ ) == ‘yes’ ) {
$del_url = add_query_arg( array(‘action’ => ‘del’, ‘pid’ => $post->ID) );
?>
” onclick=”return confirm(‘Are you sure to delete?’);”><span style=”color: red;”><?php _e( ‘Delete’, ‘wpuf’ ); ?></span>
<?php } ?>
</td>
</tr>
<?php
}
wp_reset_postdata();
?>
Hi,
can you use the “code” button to post your code? It’s quite difficult to read without indenting and with other modifications by the forum.
sorry
<?php
if ( wpuf_get_option( 'enable_post_edit', 'wpuf_dashboard', 'yes' ) == 'yes' ) {
$disable_pending_edit = wpuf_get_option( 'disable_pending_edit', 'wpuf_dashboard', 'on' );
$edit_page = (int) wpuf_get_option( 'edit_page_id', 'wpuf_general' );
$url = add_query_arg( array('pid' => $post->ID), get_permalink( $edit_page ) );
if ( $post->post_status == 'pending' && $disable_pending_edit == 'on' ) {
// don't show the edit link
} else {
?>
<a href="<?php echo wp_nonce_url( $url, 'wpuf_edit' ); ?>"><?php _e( 'Edit', 'wpuf' ); ?></a>
<?php
}
}
?>
<?php duplicate_post_clone_post_link('Clone',' | ',' |',$post->ID); ?>
<?php
if ( wpuf_get_option( 'enable_post_del', 'wpuf_dashboard', 'yes' ) == 'yes' ) {
$del_url = add_query_arg( array('action' => 'del', 'pid' => $post->ID) );
?>
<a href="<?php echo wp_nonce_url( $del_url, 'wpuf_del' ) ?>" onclick="return confirm('Are you sure to delete?');"><span style="color: red;"><?php _e( 'Delete', 'wpuf' ); ?></span></a>
<?php } ?>
</td>
</tr>
<?php
}
wp_reset_postdata();
?>
Hi,
sorry for the delay.
I tried to install User Frontend (the free version from ww.wp.xz.cn plugin repository, not the Pro paid version) and edited the dashboard template as above, but couldn’t reproduce the bug: even with an user with role Author I’m redirected to the edit screen.
Can you copy the URL of the link (should be something like: right click on the link and “Copy URL”) as an Author and paste it here? Maybe it could give a clue about what’s wrong…