[wp-trac] [WordPress Trac] #37051: New filter `wp_page_path_sql`

WordPress Trac noreply at wordpress.org
Wed Jun 8 06:24:30 UTC 2016


#37051: New filter `wp_page_path_sql`
-------------------------------+-----------------------------
 Reporter:  sebastian.pisula   |      Owner:
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 Make plugin for translations I found next missing filter. WordPress use
 get_page_by_path in WP->parse_request();

 In post meta I save info about language version.

 Example:
 "Contact" in German and Polish is "Kontakt" so slug will be 'kontakt'.
 Function get_page_by_path fiund by slug in all languages. But in filter
 `wp_page_path_sql` I can add LEFT JOIN and set current language.

 I know that exists `parse_query` action and I can change query via this
 action but before in `wp_page_path_sql` will be generate unnecessary sql.

 This sql filter will be usefull very much.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37051>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list