Index: src/wp-includes/embed-template.php
===================================================================
--- src/wp-includes/embed-template.php (revision 36689)
+++ src/wp-includes/embed-template.php (working copy)
@@ -1,202 +1,11 @@
-
- class="no-js">
-
- ' . $site_title . '
';
+
+ /**
+ * Filter the site title HTML in the embed footer.
+ *
+ * @since 4.4.0
+ *
+ * @param string $site_title The site title HTML.
+ */
+ echo apply_filters( 'embed_site_title_html', $site_title );
+}
Index: src/wp-includes/general-template.php
===================================================================
--- src/wp-includes/general-template.php (revision 36689)
+++ src/wp-includes/general-template.php (working copy)
@@ -36,14 +36,13 @@
$templates = array();
$name = (string) $name;
- if ( '' !== $name )
+ if ( '' !== $name ) {
$templates[] = "header-{$name}.php";
+ }
$templates[] = 'header.php';
- // Backward compat code will be removed in a future release
- if ('' == locate_template($templates, true))
- load_template( ABSPATH . WPINC . '/theme-compat/header.php');
+ locate_template( $templates, true );
}
/**
@@ -76,14 +75,13 @@
$templates = array();
$name = (string) $name;
- if ( '' !== $name )
+ if ( '' !== $name ) {
$templates[] = "footer-{$name}.php";
+ }
- $templates[] = 'footer.php';
+ $templates[] = 'footer.php';
- // Backward compat code will be removed in a future release
- if ('' == locate_template($templates, true))
- load_template( ABSPATH . WPINC . '/theme-compat/footer.php');
+ locate_template( $templates, true );
}
/**
@@ -121,9 +119,7 @@
$templates[] = 'sidebar.php';
- // Backward compat code will be removed in a future release
- if ('' == locate_template($templates, true))
- load_template( ABSPATH . WPINC . '/theme-compat/sidebar.php');
+ locate_template( $templates, true );
}
/**
Index: src/wp-includes/template-loader.php
===================================================================
--- src/wp-includes/template-loader.php (revision 36689)
+++ src/wp-includes/template-loader.php (working copy)
@@ -40,7 +40,7 @@
include( ABSPATH . 'wp-trackback.php' );
return;
elseif ( is_embed() ) :
- $template = ABSPATH . WPINC . '/embed-template.php';
+ $template = ABSPATH . WPINC . '/theme-compat/embed-template.php';
/**
* Filter the template used for embedded posts.
Index: src/wp-includes/template.php
===================================================================
--- src/wp-includes/template.php (revision 36689)
+++ src/wp-includes/template.php (working copy)
@@ -468,8 +468,8 @@
/**
* Retrieve the name of the highest priority template file that exists.
*
- * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which
- * inherit from a parent theme can just overload one file.
+ * Searches in the STYLESHEETPATH before TEMPLATEPATH and wp-includes/theme-compat
+ * so that themes which inherit from a parent theme can just overload one file.
*
* @since 2.7.0
*
@@ -489,6 +489,9 @@
} elseif ( file_exists(TEMPLATEPATH . '/' . $template_name) ) {
$located = TEMPLATEPATH . '/' . $template_name;
break;
+ } elseif ( file_exists( ABSPATH . WPINC . '/theme-compat/' . $template_name ) ) {
+ $located = ABSPATH . WPINC . '/theme-compat/' . $template_name;
+ break;
}
}
Index: src/wp-includes/theme-compat/embed-404.php
===================================================================
--- src/wp-includes/theme-compat/embed-404.php (revision 36689)
+++ src/wp-includes/theme-compat/embed-404.php (working copy)
@@ -1,202 +1,37 @@
-
- class="no-js">
-
- >
-
-
-
+ /**
+ * Filter the thumbnail shape for use in the embed template.
+ *
+ * Rectangular images are shown above the title while square images
+ * are shown next to the content.
+ *
+ * @since 4.4.0
+ * @since 4.5.0 Added `$thumbnail_id` parameter.
+ *
+ * @param string $shape Thumbnail image shape. Either 'rectangular' or 'square'.
+ * @param int $thumbnail_id Attachment ID.
+ */
+ $shape = apply_filters( 'embed_thumbnail_image_shape', $shape, $thumbnail_id );
-
+ if ( 'rectangular' === $shape ) : ?>
+
+
-
-
-
+
+
+
+
+
-
+
+
+
-
+
-
-
-
-
+ /**
+ * Print additional content after the embed excerpt.
+ *
+ * @since 4.4.0
+ */
+ do_action( 'embed_content' );
+ ?>
-
+
Index: src/wp-includes/theme-compat/footer-embed.php
===================================================================
--- src/wp-includes/theme-compat/footer-embed.php (revision 36689)
+++ src/wp-includes/theme-compat/footer-embed.php (working copy)
@@ -1,196 +1,16 @@
-
- class="no-js">
-
-
-
- tag.
- *
- * @since 4.4.0
- */
- do_action( 'embed_head' );
- ?>
-
->
- $data ) {
- if ( $data['width'] / $data['height'] > $aspect_ratio ) {
- $aspect_ratio = $data['width'] / $data['height'];
- $measurements = array( $data['width'], $data['height'] );
- $image_size = $size;
- }
- }
- }
-
- /**
- * Filter the thumbnail image size for use in the embed template.
- *
- * @since 4.4.0
- *
- * @param string $image_size Thumbnail image size.
- */
- $image_size = apply_filters( 'embed_thumbnail_image_size', $image_size );
-
- $shape = $measurements[0] / $measurements[1] >= 1.75 ? 'rectangular' : 'square';
-
- /**
- * Filter the thumbnail shape for use in the embed template.
- *
- * Rectangular images are shown above the title
- * while square images are shown next to the content.
- *
- * @since 4.4.0
- *
- * @param string $shape Thumbnail image shape. Either 'rectangular' or 'square'.
- */
- $shape = apply_filters( 'embed_thumbnail_image_shape', $shape );
- }
- ?>
-
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
>
- $data ) {
- if ( $data['width'] / $data['height'] > $aspect_ratio ) {
- $aspect_ratio = $data['width'] / $data['height'];
- $measurements = array( $data['width'], $data['height'] );
- $image_size = $size;
- }
- }
- }
-
- /**
- * Filter the thumbnail image size for use in the embed template.
- *
- * @since 4.4.0
- *
- * @param string $image_size Thumbnail image size.
- */
- $image_size = apply_filters( 'embed_thumbnail_image_size', $image_size );
-
- $shape = $measurements[0] / $measurements[1] >= 1.75 ? 'rectangular' : 'square';
-
- /**
- * Filter the thumbnail shape for use in the embed template.
- *
- * Rectangular images are shown above the title
- * while square images are shown next to the content.
- *
- * @since 4.4.0
- *
- * @param string $shape Thumbnail image shape. Either 'rectangular' or 'square'.
- */
- $shape = apply_filters( 'embed_thumbnail_image_shape', $shape );
- }
- ?>
-
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-