[wp-trac] [WordPress Trac] #22247: Ensure post ID evaluates to true before adding "Edit post" tab in admin bar
WordPress Trac
noreply at wordpress.org
Sun Oct 21 20:45:27 UTC 2012
#22247: Ensure post ID evaluates to true before adding "Edit post" tab in admin bar
-----------------------------+--------------------------
Reporter: Joe Anzalone | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: General
Version: trunk | Severity: normal
Keywords: has-patch |
-----------------------------+--------------------------
This patch checks that a post has an ID set before adding an "Edit post"
link in the admin bar on the front-end for individual post pages and
static pages.
This can be helpful for plugins that choose to create a "fake" page that
does not exist in the database, and set their ID to "0."
An example of such a fake page can be seen on my
[http://wordpress.org/extend/plugins/on-the-fly-youtube-embeds/ On The Fly
YouTube Embeds] plugin which borrows a lot of code from Scott Sherrill-
Mix's blog post: [http://scott.sherrillmix.com/blog/blogger/creating-a
-better-fake-post-with-a-wordpress-plugin/ Creating a (Better) Fake Post
with a WordPress Plugin]
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22247>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list