3 replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
source | link

I'm trying to do something similar to this question here: http://wordpress.stackexchange.com/questions/36013/remove-action-or-remove-filter-with-external-classesremove_action or remove_filter with external classes?

I'm trying to remove the

<!-- This site is optimized with the Yoast WordPress SEO plugin v1.0.3 - http;//yoast.com/wordpress/seo/ -->

message from the plugin.

And before you yell at me about how this may be unethical the author says it's okay to do here: http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-how-to-remove-dangerous-inserted-yoast-message-in-page-headers?replies=29#post-2503475

I have found the class that adds the comment here: http://plugins.svn.wordpress.org/wordpress-seo/tags/1.2.8.7/frontend/class-frontend.php

Basically the WPSEO_Frontend class has a function named debug_marker which is then called by a function named head which is then added to wp_head in __Construct

I'm new to classes but I found a way to completely remove the head by doing

global $wpseo_front;    
remove_action( 'wp_head', array($wpseo_front,'head'), 1, 1 );

but I only want to remove the debug_marker part from it. I tried this but it dosen't work remove_action( 'wp_head', array($wpseo_front,'head','debug_marker'), 1, 1 );

As I said I'm new to classes so any help would be great.

I'm trying to do something similar to this question here: http://wordpress.stackexchange.com/questions/36013/remove-action-or-remove-filter-with-external-classes

I'm trying to remove the

<!-- This site is optimized with the Yoast WordPress SEO plugin v1.0.3 - http;//yoast.com/wordpress/seo/ -->

message from the plugin.

And before you yell at me about how this may be unethical the author says it's okay to do here: http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-how-to-remove-dangerous-inserted-yoast-message-in-page-headers?replies=29#post-2503475

I have found the class that adds the comment here: http://plugins.svn.wordpress.org/wordpress-seo/tags/1.2.8.7/frontend/class-frontend.php

Basically the WPSEO_Frontend class has a function named debug_marker which is then called by a function named head which is then added to wp_head in __Construct

I'm new to classes but I found a way to completely remove the head by doing

global $wpseo_front;    
remove_action( 'wp_head', array($wpseo_front,'head'), 1, 1 );

but I only want to remove the debug_marker part from it. I tried this but it dosen't work remove_action( 'wp_head', array($wpseo_front,'head','debug_marker'), 1, 1 );

As I said I'm new to classes so any help would be great.

I'm trying to do something similar to this question here: remove_action or remove_filter with external classes?

I'm trying to remove the

<!-- This site is optimized with the Yoast WordPress SEO plugin v1.0.3 - http;//yoast.com/wordpress/seo/ -->

message from the plugin.

And before you yell at me about how this may be unethical the author says it's okay to do here: http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-how-to-remove-dangerous-inserted-yoast-message-in-page-headers?replies=29#post-2503475

I have found the class that adds the comment here: http://plugins.svn.wordpress.org/wordpress-seo/tags/1.2.8.7/frontend/class-frontend.php

Basically the WPSEO_Frontend class has a function named debug_marker which is then called by a function named head which is then added to wp_head in __Construct

I'm new to classes but I found a way to completely remove the head by doing

global $wpseo_front;    
remove_action( 'wp_head', array($wpseo_front,'head'), 1, 1 );

but I only want to remove the debug_marker part from it. I tried this but it dosen't work remove_action( 'wp_head', array($wpseo_front,'head','debug_marker'), 1, 1 );

As I said I'm new to classes so any help would be great.

    Tweeted twitter.com/#!/StackWordPress/status/276672881595932675
2 retag
| link
1
source | link

Remove an action from an external Class

I'm trying to do something similar to this question here: http://wordpress.stackexchange.com/questions/36013/remove-action-or-remove-filter-with-external-classes

I'm trying to remove the

<!-- This site is optimized with the Yoast WordPress SEO plugin v1.0.3 - http;//yoast.com/wordpress/seo/ -->

message from the plugin.

And before you yell at me about how this may be unethical the author says it's okay to do here: http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-how-to-remove-dangerous-inserted-yoast-message-in-page-headers?replies=29#post-2503475

I have found the class that adds the comment here: http://plugins.svn.wordpress.org/wordpress-seo/tags/1.2.8.7/frontend/class-frontend.php

Basically the WPSEO_Frontend class has a function named debug_marker which is then called by a function named head which is then added to wp_head in __Construct

I'm new to classes but I found a way to completely remove the head by doing

global $wpseo_front;    
remove_action( 'wp_head', array($wpseo_front,'head'), 1, 1 );

but I only want to remove the debug_marker part from it. I tried this but it dosen't work remove_action( 'wp_head', array($wpseo_front,'head','debug_marker'), 1, 1 );

As I said I'm new to classes so any help would be great.