I just skimmed through the WPSEO_Frontend class and found the wpseo_robots filter for the meta robots content string.
You might try something like:
add_filter( 'wpseo_robots', function( $content )
{
// your logic here ...
return $content;
} );
to override the robots meta content from that plugin.
ps: You should consider moving the add_action out of the class constructor.
Related Posts:
- Adding widgets to my plugin page instead of WordPress dashboard
- Adding function to Genesis genesis_header [closed]
- How do I remove an action hook inside a class that is called by another class?
- what is correct way to hook when update post
- Using register_activation_hook in classes
- Custom plugin: Trying to show saved data on frontend
- Check php version before theme activation
- How can I remove “Proudly powered by WordPress” from twentyeleven without modifying footer.php?
- add_meta_boxes action with refresh on save
- Use wc_enqueue_js only on specific pages – nested add_action
- How to Remove a Filter from the Admin List Table?
- Hooking new functions to actions + passing parameters
- Find variables available at a given hook
- Delete option value from array using update_option()
- How to set a custom path, for ajax image upload folder in admin?
- How to access function from outside of a class within this class in WP plugin?
- How to call function at the bottom of post using plugin?
- wp_loaded hook block script enquequing
- Adding Default Settings to Theme My Login plugin
- Remove an action hook within a Class
- How to pass arguments to add_action() or retrieve return value of called function?
- Contact Fom 7 – how to add custom HTML inside span.wpcf7-form-control-wrap AND IMMEDIATELY AFTER input.wpcf7-form-control?
- Set meta field to publish date + 2 weeks
- wp_head function not outputting
- Modify custom field input data before creating a new post
- Should `wp_login` be used since it’s deprecated?
- How to remove the message ‘We could not find any results for your search’ without changing template files and without adding posts/pages?
- How to catch wordpress post ID when it’s published
- WordPress redirect redirecting too many times or not at all
- Can not add admin notices from the edit_user_profile_update hook (notices not being displayed)?
- Action Hook Inside WordPress Plugin Shortcode
- Woocommerce custom Plugin in wordpress [closed]
- How to pass hook variable to function?
- using filter and hook inside class
- Get original value in save_post action hooka
- get Woocommerce product format json for WP_Query
- Register/enqueue scripts only on certain admin pages
- Is there an option to execute javascript file only on plugin activation
- Hook into all password resets in WordPress and get password before hashing?
- Submit to itself don’t work
- WordPress HTML Helper
- Plugin Hook: Get posts
- How to execute add_action() function from custom plugin to Crontrol plugin or do_action()?
- How to add custom checkout field in user details mail template
- Cannot modify header information – headers already sent
- Is there a hook that I can use when a fatal error occurs?
- Too few arguments – wp_login action
- Add Imports to Existing WordPress Import Map
- Which hook should be used to add an action containing a redirect?
- How can I save a multiple select array with the settings API for a plug-in options page?
- Is there a way for a plugin to add an attribute to the tag of a theme?
- Gutenberg Blocks doesn’t render correctly when using do_blocks
- WooCommerce: How to display item meta data in email confirmation using woocommerce_order_item_meta_end
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- How to register custom post types in a plugin?
- My shortcode is showing up twice
- Database “Migration” for Plugins?
- Making Quote Plugin more efficient
- storing wp_head in a variable?
- Namespaced action and filter tags
- Ajax not working es expected (Returns 0)
- How to find error in my code when the error message is pointing to WP core file?
- hook that when page is starting to load
- wordpress plugin is not activating from widget
- add element with add_action to posts from a specific category ID
- Custom user login page by creating a plugin
- developing a wordpress plugin, have a few PHP Woocommerce related coding questions
- Why ajax doesn’t work on certain wordpress hooks?
- Whitelisting items from custom options page
- Add_menu_page not displaying the menu in class based plugin
- Custom plugin settings link doesn’t append current class to menu item when visited? Why?
- Error call_user_func_array() expects parameter 1 to be a valid callback when using image_size_names_choose
- Would there be anything stopping me from removing both wp_head and wp_footer?
- Using and saving custom dropdown boxes on user profiles
- Problem with AJAX in wordpress plugin
- Hook for page Request?
- Call to undefined function is_home() or any conditional tags
- Can a plugin redirect product page based on IF condition?
- Save html content of a widget textarea
- Why does my settings form redirect to the homepage?
- How to override a plugins script
- Include HTML (Bootstrap Modal Box) with a plugin into my header
- Using init hook for register_taxonomy is causing invalid_taxonomy in wp_insert_term()
- Must filter functions receive all arguments passed to them?
- Generate a QR code when creating a new WordPress user
- Variation prices breakdown only for single product page
- Add custom field on admin dashboard comments / reviews
- Plugin won’t output characters with diacritics properly
- Enqueue assets from multiple directories using add_action/do_action
- ACF relationship on user profile page used for allowed access
- Adding new divs with custom classes to products on WooCommerce shop page [closed]
- How to return html as a string from php for WordPress
- Taxonomy Child Term, Counter is staying on 0
- Need help with format of nested array in MySQL
- How to add delete, approve, spam Links to Comments
- Setting at job with shortcode not working
- Run code before WordPress loads and insert data into WP if need be
- PHP: Why does my code work in index.php but not a widget?
- Accessing Variables Used In a Plugin Using PHPStorm + XDebug
- I’m not able to get access $wpdb in my php file in wordpress