WordPress.org

Making WordPress.org

Opened 22 months ago

Last modified 21 months ago

#1618 new defect

Enable oEmbed for Themes on Rosetta sites

Reported by: dd32 Owned by:
Milestone: Priority: normal
Component: Theme Directory Keywords:
Cc:

Description

Follows on from #1464 - I'm not sure if this has ever worked, or if recent changes broke it.

https://wordpress.org/themes/twentyfifteen/embed/ works well, however https://de.wordpress.org/themes/twentyfifteen/embed/ doesnt.

This is made more difficult because you can't rely upon the global WP_Query on Rosetta Theme directory sites at present (The theme doesn't really use WordPress templates for rosetta blogs) - This may change as the mode used to present the plugin directory at multiple url's has proved to be effective in testing so far.

Change History (2)

#1 @dd32
21 months ago

In 2755:

Themes Directory: Open-source the pre_get_posts logic used by the Themes Directory & add logic to handle the domain not matching the home_url.

This allows us to remove the 'placeholder' sites we use for the themes directory on internationalized sites (xx.wordpress.org/themes), and makes the query logic more transparent.

See #1630 (which this is the first part for)
See #1618 (Some work will still be needed to correctly trim the description)

#2 @dd32
21 months ago

https://de.wordpress.org/themes/twentyfifteen/embed/ now works

However, in the process of doing that I altered the embed template to use wp_trim_words( $description, 55) directly instead of using the embed excerpt functions, that's because $post->post_content isn't translated, only $theme->description is.
I'm fairly certain that in doing it this way, I've broken some languages excerpt changes (https://ja.wordpress.org/themes/twentyfifteen/embed/ perhaps?) or broken words mid-way.

We should figure out how to alter the post_content directly to have the translated data available everywhere.

Last edited 21 months ago by dd32 (previous) (diff)
Note: See TracTickets for help on using tickets.