Ensure post ID evaluates to true before adding "Edit post" tab in admin bar
|Reported by:||Joe Anzalone||Owned by:|
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 On The Fly YouTube Embeds plugin which borrows a lot of code from Scott Sherrill-Mix's blog post: Creating a (Better) Fake Post with a WordPress Plugin