WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years 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:
PR Number:

Description

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
3 years 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
3 years 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
3 years ago

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

#4 @westonruter
3 years ago

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

Note: See TracTickets for help on using tickets.