Advertisement
Guest User

embed.php

a guest
May 10th, 2022
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <?php
  2. /**
  3. * Contains the post embed base template
  4. *
  5. * When a post is embedded in an iframe, this file is used to create the output
  6. * if the active theme does not include an embed.php template.
  7. *
  8. * @package WordPress
  9. * @subpackage oEmbed
  10. * @since 4.4.0
  11. */
  12. use function Roots\view;
  13.  
  14. get_header( 'embed' );
  15.  
  16. if ( have_posts() ) :
  17. while ( have_posts() ) :
  18. the_post();
  19.  
  20. if( file_exists( get_theme_file_path("/resources/views/embed-" . get_post_type() . ".blade.php") ) ) {
  21. echo view("embed-" . get_post_type());
  22. break;
  23. }
  24.  
  25. get_template_part( 'embed', 'content' );
  26.  
  27.  
  28. endwhile;
  29. else :
  30. get_template_part( 'embed', '404' );
  31. endif;
  32.  
  33. get_footer( 'embed' );
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement