Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function __construct()
- {
- add_action( 'wp_head', array( $this, 'start') );
- add_action( 'wp_print_footer_scripts', array( $this, 'end') );
- } // end constructor
- public function start() { ob_start( array( $this, 'callback' ) ); } // end start
- public function end() { ob_end_flush(); } // end end
- public function callback( $buffer )
- {
- // do some stuff
- return $buffer;
- } // end callback
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement