Making WordPress.org


Ignore:
Timestamp:
10/06/2020 05:00:31 AM (5 years ago)
Author:
dd32
Message:

Theme Directory: Since WordPress 4.5 WordPress has supported embed.php as a template without the need for filters, remove our custom filtering and use a simplified embed.php for the theme post type only.

Fixes embeds for pages and stops a bunch of annoying notices.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php

    r10330 r10351  
    432432}
    433433
    434 /**
    435  * Override the embed template with our own for themes
    436  */
    437 function wporg_themes_embed_template( $template ) {
    438     if ( 'repopackage' === get_post_type() ) {
    439         $theme_embed_template = locate_template( 'embed.php' );
    440         if ( $theme_embed_template ) {
    441             $template = $theme_embed_template;
    442         }
    443     }
    444 
    445     return $template;
    446 }
    447 add_filter( 'embed_template', 'wporg_themes_embed_template' );
    448 
    449434include_once WP_CONTENT_DIR . '/plugins/jetpack/modules/seo-tools/jetpack-seo.php';
    450435include_once WP_CONTENT_DIR . '/plugins/jetpack/modules/seo-tools/jetpack-seo-posts.php';
Note: See TracChangeset for help on using the changeset viewer.