Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. <?php
  2. /*
  3. * WordPress modifying the output before render or edit site content.
  4. *
  5. * Apply find and replace rules
  6. * or you can make any modification before content going on to show users.
  7. *
  8. * It's simple, just paste this code on your Plugin/Theme functions.
  9. */
  10.  
  11. function modify_buffer_ob_call( $buffer ) {
  12. // Here you can change the HTML content
  13. return $buffer;
  14. }
  15.  
  16. function modify_buffer() {
  17. ob_start();
  18. ob_start( 'modify_buffer_ob_call' );
  19. }
  20.  
  21. add_action( 'template_redirect', 'modify_buffer' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement