Edit Dashboard for Admins

This topic contains 4 reply and 2 voices, and was last updated by ivaxtobac 11 years, 7 months ago
Viewing 4 Posts - 1 through 4 (of 4 total)
Author Posts
April 8, 2013 at 5:05 pm 1922
ivaxtobac Hello Can i modifie something on pluggin to edit posts with WP Dashboard only for Admins? When I click on edit link, pluggin use form edit to do it, and i want to do this with WP Dashboard Thanks Javier
April 8, 2013 at 5:24 pm 1924
Tareq Hasan Tareq Hasan

Yes you can. But when you do that, keep a backup of your custom codes. If you update the plugin, your changes will be lost.

April 8, 2013 at 5:29 pm 1925
ivaxtobac ivaxtobac

Ok thanks Tareq. Can you explain me how to do this?

Thanks

April 8, 2013 at 5:35 pm 1926
Tareq Hasan Tareq Hasan

You can put this code where you want it in the dashboard. The dashboard is located in /class/frontend-dashboard.php. Using this code, Editor and Admins will be able to see the edit link.
[php]
<?php if ( current_user_can( ‘delete_others_pages’ ) ) { ?>
<a href="<?php echo admin_url( ‘post.php?action=edit&post=’ . $post- rel="nofollow">ID ); ?>">Admin Edit</a>
<?php } ?>
[/php]

Seems like link is converting, actually:

ID ); ?>">Admin Edit
April 8, 2013 at 5:48 pm 1928
ivaxtobac ivaxtobac

Thanks Tareq

I fix your code (some thinks are wrong) ant put it on single.php

Here code

[code][/code]<?php if ( current_user_can( ‘delete_others_pages’ ) ) { ?>

<a href=”<?php echo admin_url( ‘post.php?action=edit&post=’ . $post->ID); ?>” rel=”nofollow”>Admin Edit</a>

<?php } ?>[]

Viewing 4 Posts - 1 through 4 (of 4 total)