From 8fa377ee5d1132da08cdf29fb1252eb8474ffefd Mon Sep 17 00:00:00 2001 From: Tim Elsass Date: Sun, 12 Jan 2020 23:36:54 -0500 Subject: [PATCH] use existing filter to remove bgseo robots output see comment on [BoldGrid/boldgrid-seo#19](https://github.com/BoldGrid/boldgrid-seo/issues/19) for reference. This uses the preexisting filter in bgseo to remove the robots output instead of adding a new filter for this one off case. So the superfluous addition of `boldgrid-seo/seo/robots/run` can be reverted in bgseo repo which will help keep the existing filters on output methods unified in that plugin. There have been a few support tickets where filters in boldgrid-seo were modified, and the [BoldGrid/boldgrid-seo-anspress-extension](https://github.com/BoldGrid/boldgrid-seo-anspress-extension) makes use of the filters as an officially released plugin that extends boldgrid-seo. `boldgrid-seo/seo/robots/run` was added to inspirations when implementing #49 for further reference if needed. --- includes/class-boldgrid-inspirations-attribution-page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-boldgrid-inspirations-attribution-page.php b/includes/class-boldgrid-inspirations-attribution-page.php index fb9ebdeb..f8f150d5 100644 --- a/includes/class-boldgrid-inspirations-attribution-page.php +++ b/includes/class-boldgrid-inspirations-attribution-page.php @@ -286,7 +286,7 @@ public static function prevent_contamination() { // Ensure the Attribute page is noindex. add_action( 'wp_head', 'wp_no_robots' ); - add_filter( 'boldgrid-seo/seo/robots/run', '__return_false' ); + remove_all_actions( 'boldgrid-seo/seo/robots' ); } /**