Hey there! I'm currently working on a CLI tool to deploy WordPress apps to DigitalOcean. Check it out! It's free and open source.
I asked this on Twitter yesterday which raised quite some interesting replies from theme developers, the .org themes review crew and other folks.
— Konstantin Kovshenin (@kovshenin) March 19, 2012
For those of you who don’t know, the edit_post_link function is widely used in WordPress themes, to create an “Edit this post” link as a shortcut to the post edit screen. This was convenient I agree, except that the link was always in different places for different themes. Some put it near the tags and categories, others squeeze it in at the end of the post, or even the bottom of the page, so it’s not always easy to spot one, after activating a new theme.
The WordPress Toolbar (the former admin bar), however, changed that story. I started using my blog’s user facing side more that the admin panel. I use the “New” menu very heavily and when I need to edit a post or page, I can easily find the Edit Post button in any theme.
Hence my question — do we still need the edit_post_link function? If there was an option to retire it, I’d vote for that. If the admin toolbar is turned off, well tough luck, but as Emil mentioned, we can always use the is_admin_bar_showing function and fall back to edit_post_link if needed.
However I think that’s just too much. You can turn the Toolbar off for your visitors, you can turn it off for subscribers, but please don’t turn it off for authors and editors! It’s almost like turning off the Media Library and saying “you know what, why don’t you FTP your images instead” ;) I believe that the admin toolbar is an essential WordPress experience, and shouldn’t be turned off.
The other, more valid reason for keeping edit_post_link is that we can use it in a list of posts, so to edit a post you don’t have to actually visit it first, but can do it directly from the list. I agree, especially if an extra page load takes 10 seconds. But how is that different from your Edit Posts screen in the Dashboard, right?
In any case, I can often hit the permalink and then Edit Page in the admin bar, faster than I can spot the edit link generated by edit_post_link, especially when I’m running Multisite with a bunch of blogs and a bunch of different themes. Because it’s in the same place for every theme, and because it’s always there. I’m used to it.
Your turn to speak! Do you still use edit_post_link when developing your themes? Do you use it when browsing around your theme? Do you disable the admin bar in any of your projects and why? Finally, do you think it’s time to deprecate the edit_post_link function? Thanks for sharing your thoughts and comments, and don’t forget to subscribe!