[wp-trac] [WordPress Trac] #24457: add_filter('gettext' ignores get_post_type after deleting a featured image
WordPress Trac
noreply at wordpress.org
Thu May 30 09:23:09 UTC 2013
#24457: add_filter('gettext' ignores get_post_type after deleting a featured image
--------------------------+------------------------------
Reporter: vmodha | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by johnbillion):
I've rolled my own function for determining the current post type when
filtering this text.
[https://gist.github.com/johnbillion/97a8c62a95c43485c909 See here].
I'm not sure if this is a bug on its own. The global `$post` object isn't
always populated (which is why your code doesn't always work) but it
doesn't need to be.
Related: #19257
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24457#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list