Describe the bug
Hello there. Love the new updates and all the attention being put into this plugin. I _think_ that I have come across a filter that no longer exists, but is important to us and so I'm trying to figure out the best way to achieve the proper solution moving forward.
Since we don't want to display the SEO column, we have been using this code snippet to hide it, from this reply:
add_filter( 'the_seo_framework_show_seo_column', '__return_false' );
I looked through your plugin filters list and also through the codebase for similar functionality, but could not find any mention of a filter with similar functionality.
How to reproduce the bug
Steps to reproduce the behavior:
Expected behavior
Using the filter, I would expect the SEO column to not show on the pages list in the admin.
Additional context
I would also like to note that I add that filter in an MU plugin, and The SEO Framework is not added as an MU plugin. That said, I tested it with The SEO Framework as an MU plugin and it still didn't work. Did the priorities change by chance?
Thank you!
Howdy!
It's true; we removed that filter. That is because we implemented a new handler for it in v4.0.0, which also adds support for the quick and bulk-editing features. And, with that, we rely on more rudimentarily methods.
This is the snippet that should do the trick from v4.0. You can implement it via a plugin, a theme, or a mu-plugin.
add_action( 'the_seo_framework_after_admin_init', function() {
remove_action( 'admin_init', [ the_seo_framework(), '_init_seo_bar_tables' ] );
} );
The callback of the action you remove in that snippet looks for an option. You can find this option in the general SEO settings, marked as "Display the SEO Bar in overview tables?". So, without custom coding required, you can also remove the list table entry. And, it is why we didn't further document it.
@sybrew -- awesome, that worked perfectly. I understand that there was a GUI option but since we already had this in code and have a multisite network of over 100 sites, I like the code approach, and now someone doing a search will hopefully see this issue as well 馃槈
Thanks again for the detailed response and quick resolution. Cheers! 馃嵒
Most helpful comment
@sybrew -- awesome, that worked perfectly. I understand that there was a GUI option but since we already had this in code and have a multisite network of over 100 sites, I like the code approach, and now someone doing a search will hopefully see this issue as well 馃槈
Thanks again for the detailed response and quick resolution. Cheers! 馃嵒