How to properly remove meta tag in wp_head?
-
Hello!
I would like to remove the action done by meta_generator which is found in
the class MSP_Frontend_Assets inside class-msp-frontend-assets.php.add_action( ‘wp_head’ , array( $this, ‘meta_generator’ ) );
However, since “$this” is residing inside MSP_Frontend_Assets which is not interfaced to be called from outside. class-msp-frontend-assets.php is being included by class-master-slider.php. I cannot find any way to get the original instantiated MSP_Frontend_Assets class.
I did try other way such as
// it is not an array
remove_action( ‘wp_head’, array( ‘MSP_Frontend_Assets’, ‘meta_generator’ ) );// different instance
remove_action( ‘wp_head’, array( new MSP_Frontend_Assets(), ‘meta_generator’ ) );So, the only way seems only calling the original instance of MSP_Frontend_Assets
remove_action( ‘wp_head’, array( Original_Instance_MSP_Frontend_Assets, ‘meta_generator’ ) );Am I correct?
Or is there any other way that I have overlooked?Thanks a lot.
- The topic ‘How to properly remove meta tag in wp_head?’ is closed to new replies.