action_dispatcher(); $this->filter_dispatcher(); } } /** * Set the actions we need in this class. * * @access private * @return void */ private function action_dispatcher() { add_action( 'agncy_after_body', array( $this, 'inject_gtm_tag' ) ); } /** * Set the filters we need in this class. * * @access private * @return void */ private function filter_dispatcher() { } /** * Check if the gtm function really exists and if so output the gtm tag. * * @access public * @return void */ public function inject_gtm_tag() { if ( function_exists( 'gtm4wp_the_gtm_tag' ) ) { gtm4wp_the_gtm_tag(); } } } new AgncyGtm4wpCompatibility();