WordPress.org

Ready to get started?Download WordPress

Forums

Removing Quick Edit (14 posts)

  1. Jaap
    Member
    Posted 4 years ago #

    Good afternoon,

    Do you know a good functions.php hack to remove the Quick Edit button, so that nobody can use / see it?

    Thanks in advance!

  2. Chris_K
    Member
    Posted 4 years ago #

    Which Quick Edit button? Where do you see it?

  3. Jaap
    Member
    Posted 4 years ago #

    Hi Chris,

    Thanks for your reply! I mean the following Quick Edit button:

    Click on the link to see a screenshot of the Quick Edit button that I mean.

  4. Jaap
    Member
    Posted 4 years ago #

    Somebody, everybody, anybody sream!

  5. ClaytonJames
    Member
    Posted 4 years ago #

    /wp-admin/includes/template.php

    6 instances of this string to be found Quick Edit

    Edit core files at your own risk, make a backup first, you will have to re-edit after upgrades if you make changes.

  6. Jaap
    Member
    Posted 4 years ago #

    Thanks for the reply ClaytonJames!

    But that is a core hack and not a hack that you put in functions.php.
    So when I update it to the next version of WordPress the 'QEB (Quick Edit Button)' will be back. When you put it in functions.php it doesn't come back!

    Thats what i'm looking for basically! Anyone?

  7. ClaytonJames
    Member
    Posted 4 years ago #

    But that is a core hack and not a hack that you put in functions.php.

    That would be 100% correct. If you are talking about placing a modification in the functions.php file in your theme directory, It wouldn't seem very likely. Your theme would then essentially be capable of controlling a wordpress core file function. I'm thinking that allowing a functions.php file located inside of the themes directory to change the appearance or function of a WordPress core file, well... that might be a bad trend. I could be wrong. Maybe someone will have a different perspective on it. Good luck with it.

  8. mariostella
    Member
    Posted 3 years ago #

    @ClaytonJames
    Writing code inside your funtions.php file works exactly as writing a plugin, so why would it be a bad trend?
    Anyhow, i wish the original question was replied to as I desperately need non admins not to have access to the quick edit option, while maintaining it for admins.
    Any ideas anyone?

  9. ClaytonJames
    Member
    Posted 3 years ago #

    why would it be a bad trend?

    I don't know that it would. Would it be? Thus my original complete response:

    "that might be a bad trend. I could be wrong. Maybe someone will have a different perspective on it" ...but no one else had any thoughts on it until now I guess!

    Because the OP didn't want to alter core files, I presumed he/she was referring to the functions file in a particular theme. Perhaps "impractical" rather than "a bad trend", would have better conveyed my thinking. It seems (to me, anyhow) like the solution for controlling the appearance or functionality of the administration area/Dashboard of WordPress, rather than simply adding options pages or functionality for the theme itself, would be better served by a plugin. Then you could use it with any theme, and share it with your friends too!!

    I Wish I had the smarts to write one for you... good luck finding what you need!

    :-)

  10. mariostella
    Member
    Posted 3 years ago #

  11. ClaytonJames
    Member
    Posted 3 years ago #

    You know, I saw that too, but this made me wonder about the wisdom of using that method:

    NOTE: The code will stop working as of WP 3.0 due to changes in how pages are handled in the backend. Pages will be handled by edit.php with a post type of page, instead of the current seperate edit-pages.php

    Especially after reading this thread:

    http://wordpress.org/support/topic/370002?replies=32#post-1429691

  12. mariostella
    Member
    Posted 3 years ago #

    Oh well, you just need a small mod, it is really worth the while...

  13. fvl2000
    Member
    Posted 3 years ago #

    You can insert this code in a plugin. This will remove the quick edit from wp-admin/edit.php

    function remove_quick_edit( $actions ) {
    unset($actions['inline hide-if-no-js']);
    return $actions;
    }
    add_filter('post_row_actions','remove_quick_edit',10,1);
  14. fatalx
    Member
    Posted 3 years ago #

    I had the same problem. The solution above worked perfectly for me!

Topic Closed

This topic has been closed to new replies.

About this Topic