Make WordPress Core

Opened 13 months ago

Closed 10 months ago

Last modified 10 months ago

#40019 closed defect (bug) (wontfix)

wp_get_custom_css_post returns Post that are not Custom CSS CPTs

Reported by: starepod Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.2
Component: Customize Keywords: reporter-feedback
Focuses: Cc:


I'm not sure how it happened, but the Post ID for a standard Post was used as the value for custom_css_post_id in the theme-mods_themename option. Even though it is not a Custom CSS Post, it's content was filtered and returned as if it were.

Change History (4)

#1 @westonruter
13 months ago

  • Keywords reporter-feedback added

@starepod thanks for the report. The only way I can see this happening is if you have a plugin that is somehow modifying the query results obtained in wp_get_custom_css_post(). Specifically, if a plugin is modifying the query vars in pre_get_posts or filtering the posts queried via something like posts_results, then this could result in something other than the custom_css post being returned. Do you have any plugins activated that could be doing this?

#2 @starepod
13 months ago

@westonruter Thanks for replying.

That makes a lot of sense, and seems like a likely suspect. I'll check out our plugins to see what's what.

#3 @westonruter
10 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

#4 @westonruter
10 months ago

Re-open if there is in fact core change needed.

Note: See TracTickets for help on using tickets.