Home Forums Plugin Support WP User Frontend Pro Edit Dashboard for Admins

This topic is: resolved

Tagged: ,

This topic contains 4 replies, has 2 voices, and was last updated by  ivaxtobac 6 years, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1922

    ivaxtobac
    Participant
    Post count: 35

    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

    #1924

    Tareq Hasan
    Keymaster
    Post count: 2831

    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.

    #1925

    ivaxtobac
    Participant
    Post count: 35

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

    Thanks

    #1926

    Tareq Hasan
    Keymaster
    Post count: 2831

    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
    #1928

    ivaxtobac
    Participant
    Post count: 35

    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 5 posts - 1 through 5 (of 5 total)

The topic ‘Edit Dashboard for Admins’ is closed to new replies.