Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. function add_indented($fn, $num_tabs=1, $params=null){
  2. ob_start();
  3. call_user_func($fn, $params);
  4. $html = ob_get_contents();
  5. ob_end_clean();
  6. $tabs="";
  7. for ($i=0 ; $i<$num_tabs ; $i++) $tabs.="t";
  8. echo preg_replace("/n/", "n" . $tabs, substr($html, 0, - 1));
  9. echo "n";
  10. }
  11.  
  12. <?php wp_head(); ?>
  13. <?php wp_footer(); ?>
  14. <?php get_template_part('template-parts/content','home'); ?>
  15.  
  16. <?php print_indented("wp_head"); ?>
  17. <?php print_indented("wp_footer"); ?>
  18.  
  19. <!-- Add 4 tabs -->
  20. <?php print_indented('get_template_part', 4,'template-parts/content', 'home'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement