Forums

[resolved] Remove parts of Quick Edit (9 posts)

  1. haagendazs1
    Member
    Posted 3 years ago #

    Hi

    Currently I'm using Level2Categories plugin so that I can disable Authors from publishing in certain categories. however I noticed that if they make a draft and go to the Edit screen, do a "Quick Edit" on their own unpublished drafts (which they are allowed to do), they can choose the categories I was hiding from them! Is there a way to hide the categories from them here too, or hide the Categories box entirely in the quick edit screen?

    Thanks!

  2. haagendazs1
    Member
    Posted 3 years ago #

    Not sure if I was clear about what I'm asking.

    I just want to either disable the "Quick Edit" feature or get rid of Categories box in it.

    Thanks

  3. haagendazs1
    Member
    Posted 3 years ago #

    I tried adding an action to the bottom of the Level2Categories plugin with add_action('restrict_manage_posts',... or something like that. The script did show up the way it was supposed to in that screen, but it seems the Quick Edit stuff isn't part of the HTML so I don't really know how to fix that...

  4. mdgross
    Member
    Posted 3 years ago #

    I too am curious about this.... either removing bits and pieces or the entire quick edit.

  5. nathan.bingham
    Member
    Posted 3 years ago #

    I'm wondering about this too. I came across this hook - quick_edit_custom_box. I tried it out, but couldn't figure what it was doing.

  6. robotronik
    Member
    Posted 2 years ago #

    As an admin, I was also interested in this as a way to protect pages from editor level users. I didn't want them messing with the parent pages of a particular page even though I wanted them to have editing/deleting privileges.

    I am using WordPress 2.7. I found the following line in wp-admin/includes/template.php, which I removed. This removes the Quick Edit link all together. Works for me!

    $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . attribute_escape(__('Edit this post inline')) . '">' . __('Quick&nbsp;Edit') . '</a>';

  7. robotronik
    Member
    Posted 2 years ago #

    That last one worked for posts, and then this section worked for pages:

    if ( current_user_can('edit_page', $page->ID) ) {
    $actions['edit'] = '<a href="' . $edit_link . '" title="' . attribute_escape(__('Edit this page')) . '">' . __('Edit') . '</a>';

    Then comment this next line out: //$actions['inline'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>';

  8. validBen
    Member
    Posted 2 years ago #

    I am not very found of editing core files... There is another way to get rid of the Quick edit link even if not 100% safe.

    You can write a small javascript that will hide the link. Something like:
    jQuery('a.editinline').remove();

    This way no one will be able to click on the link. Of course clever users can still get it to show up...maybe.

  9. boldhand
    Member
    Posted 2 years ago #

    another way similar to the idea of using Javascript is using CSS, something like:

    a.editinline{display:none}

Topic Closed

This topic has been closed to new replies.

About this Topic