├── .github
└── ISSUE_TEMPLATE
│ ├── bug-reports.md
│ └── feature-requests.md
├── README.md
├── admin
└── class-so-clean-up-wp-seo-admin-api.php
├── assets
├── banner-1544x500.jpg
└── banner-772x250.jpg
├── css
└── admin.css
├── images
└── pieterbos.jpeg
├── includes
├── class-so-clean-up-wp-seo-settings.php
├── class-so-clean-up-wp-seo.php
└── remove-class.php
├── index.php
├── languages
└── so-clean-up-wp-seo.pot
├── readme.txt
├── so-clean-up-wp-seo.php
└── uninstall.php
/.github/ISSUE_TEMPLATE/bug-reports.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: bug-reports
3 | about: Template to be used to file bug reports
4 |
5 | ---
6 |
7 |
12 |
13 | ## Expected behavior
14 |
17 |
18 | ## Current behavior
19 |
22 |
23 | ## Possible solution
24 |
28 |
29 | ## Steps to reproduce (for bugs)
30 |
34 | 1.
35 | 2.
36 | 3.
37 | 4.
38 |
39 | ## Context
40 |
46 |
47 | ## Screenshots
48 |
51 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature-requests.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: feature requests
3 | about: Template to be used for feature requests
4 |
5 | ---
6 |
7 |
10 |
11 | ## Expected behavior
12 |
15 |
16 | ## Current behavior
17 |
20 |
21 | ## Possible way to add this
22 |
26 |
27 | ## Screenshots
28 |
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Hide SEO Bloat
2 |
3 | ###### Last updated on December 17, 2024
4 | ###### Development version 4.0.2
5 | ###### requires at least WordPress 4.9
6 | ###### tested up to WordPress 6.4
7 | ###### Author: [Pieter Bos](https://github.com/senlin)
8 | ###### Contributor: [Andy Fragen](https://github.com/afragen)
9 |
10 | As I have less time to spend time on plugins, especially one where it is a constant cat and mouse game, I have decided to pull the plug (pun intended) on this one, which costs me the most time of all plugins that I have under my name.
11 |
12 | Obviously the recent actions of Matt Mullenweg [example](https://wptavern.com/wordpress-org-login-introduces-mandatory-pineapple-pizza-checkbox) do not help to keep all my eggs in one basket and I have already started to venture out to other platforms.
13 |
14 | ## Description
15 |
16 | Free addon for the Yoast SEO plugin to hide the bloat it adds to your WordPress backend. See [changelog](https://wordpress.org/plugins/so-clean-up-wp-seo/#developers) for what's new in this release.
17 |
18 | Hides (sidebar) ads and premium version buttons of Yoast SEO from their settings pages and your website's dashboard (and frontend).
19 |
20 |
' . "\n";
363 | $html .= '
' . esc_attr( __( 'Hide SEO Bloat Settings', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
364 |
365 | $html .= '
' . esc_attr( __( 'On this settings page you can adjust things here and there to your liking.', 'so-clean-up-wp-seo' ) ) . '
' . esc_attr( __( 'Although some settings are for "features" that can easily be dismissed on a per user basis, hiding or removing them here, has two advantages:', 'so-clean-up-wp-seo' ) ) . '
- ' . esc_attr( __( 'the settings here are global, for all users', 'so-clean-up-wp-seo' ) ) . '
- ' . esc_attr( __( 'these settings are centralised on one page, no need to keep dismissing stuff all over the site\'s backend', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
366 |
367 | $html .= '
' . esc_attr( __( 'The default settings, when you activate the plugin, are that almost all boxes have been ticked; why else would you install this plugin?', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
368 |
369 | $html .= '
' . esc_attr( __( 'If you ever want to remove the Hide SEO Bloat plugin, then you can rest assured that it cleans up after itself:', 'so-clean-up-wp-seo' ) ) . '
' . esc_attr( __( 'upon deletion it removes all options automatically.', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
370 |
371 | $html .= '
' . esc_attr( __( 'Without further ado: Hide the bloat', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
372 |
373 | //$action = is_network_admin() ? 'edit.php?action=' . $this->parent->_token . '_settings' : 'options.php';
374 | if ( is_network_admin() ) {
375 | $action = 'edit.php?action=' . $this->parent->_token . '_settings';
376 | } else {
377 | $action = 'options.php';
378 | }
379 |
380 | $html .= '
' . "\n";
393 |
394 |
395 | // see //codex.wordpress.org/I18n_for_WordPress_Developers#HTML for instructions on i18n of $html
396 | $rateurl = 'https://wordpress.org/support/view/plugin-reviews/so-clean-up-wp-seo?rate=5#postform';
397 | $html .= '
' . sprintf( wp_kses( __( 'If you have found this plugin at all useful, please give it a favourable rating in the WordPress Plugin Repository.', 'so-clean-up-wp-seo' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( $rateurl ) ) . '
' . "\n";
398 |
399 | $translateurl = 'https://translate.wordpress.org/projects/wp-plugins/so-clean-up-wp-seo';
400 | $html .= '
' . sprintf( wp_kses( __( 'You can also help a great deal by translating the plugin into your own language.', 'so-clean-up-wp-seo' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( $translateurl ) ) . '
' . "\n";
401 |
402 | $supporturl = 'https://github.com/senlin/so-clean-up-wp-seo/issues';
403 | $html .= '
' . sprintf( wp_kses( __( 'If you have an issue with this plugin or want to leave a feature request, please note that we give support via Github only.', 'so-clean-up-wp-seo' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( $supporturl ) ) . '
' . "\n";
404 |
405 | $html .= '
' . "\n";
406 |
407 | $html .= '
' . esc_attr( __( 'About the Author', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
408 |
409 | $html .= '
' . "\n";
410 | $html .= '
' . "\n";
411 |
412 | $html .= '
 ) . ')
' . "\n";
413 |
414 | $sowpurl = 'https://so-wp.com';
415 | $html .= '
' . sprintf( wp_kses( __( 'Hi, my name is Pieter Bos, I hope you like this plugin! Please check out any of my other plugins on SO WP. You can find out more information about me via the following links:', 'so-clean-up-wp-seo' ), array( 'a' => array( 'href' => array(), 'target' => array(), 'title' => array() ) ) ), esc_url( $sowpurl ) ) . '
' . "\n";
416 |
417 | $html .= '
' . "\n"; // end .top
418 |
419 | $html .= '
' . "\n";
426 |
427 | $html .= '
' . "\n"; // end .inside
428 |
429 | $html .= '
' . "\n"; // end .postbox
430 |
431 | $html .= '
' . esc_attr( __( 'Mission statement:', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
432 | $html .= '
' . esc_attr( __( 'The first version of the Hide SEO Bloat plugin was released in April 2015 and ever since team Yoast and I have been playing a game of cat and mouse.', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
433 | $html .= '
' . esc_attr( __( 'Since version 20.0 of Yoast SEO however, the Settings page has received a complete overhaul, which made the Hide SEO Bloat plugin almost obsolete!', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
434 | $html .= '
' . esc_attr( __( 'Things have become much, much more trickier to remove/hide now and some things simply can no longer be hidden (believe me, I have tried).', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
435 | $html .= '
' . esc_attr( __( 'Why are there still people using Yoast SEO one might ask? There are so many great alternatives that come without screaming ads and hiding features behind a paywall!', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
436 | $ceaurl = 'https://wordpress.org/plugins/classic-editor-addon/';
437 | $html .= '
' . sprintf( wp_kses( __( 'And the only reason that I have to keep Yoast SEO installed (on a sandbox that is) is because of the mere 10K installs where Hide SEO Bloat is running. Compare that with my popular Classic Editor + plugin, which has more than 30,000 active installs!', 'so-clean-up-wp-seo' ), array( 'a' => array( 'href' => array(), 'target' => array(), 'title' => array() ) ) ), esc_url( $ceaurl ) ) . '
' . "\n";
438 | $html .= '
' . esc_attr( __( 'For everyone to become much more productive and happier, my proposal therefore is to hang the Yoast SEO plugin from a tree and switch to SEOPress, The SEO Framework, Rankmath, or any other SEO plugin out there! Did you know that most SEO plugins come with easy one-click migration tools?', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
439 | $html .= '
' . esc_attr( __( 'The goal is to bring the active installs of Hide SEO Bloat to zero, so I can finally quit this nonsense and focus on work that actually pays my bills!', 'so-clean-up-wp-seo' ) ) . '
' . "\n";
440 |
441 | $html .= '
' . "\n";
442 |
443 | echo $html;
444 | }
445 |
446 | /**
447 | * Main CUWS_Settings Instance
448 | *
449 | * Ensures only one instance of CUWS_Settings is loaded or can be loaded.
450 | *
451 | * @since v2.0.0
452 | * @static
453 | * @see CUWS()
454 | *
455 | * @param CUWS $parent Instance of main class.
456 | *
457 | * @return CUWS_Settings $_instance
458 | */
459 | public static function instance( $parent ) {
460 | if ( null === self::$_instance ) {
461 | self::$_instance = new self( $parent );
462 | }
463 |
464 | return self::$_instance;
465 | } // End instance()
466 |
467 | /**
468 | * Cloning is forbidden.
469 | *
470 | * @since v2.0.0
471 | */
472 | public function __clone() {
473 | _doing_it_wrong( __FUNCTION__, __( 'Access denied' ), $this->parent->_version );
474 | } // End __clone()
475 |
476 | /**
477 | * Unserializing instances of this class is forbidden.
478 | *
479 | * @since v2.0.0
480 | */
481 | public function __wakeup() {
482 | _doing_it_wrong( __FUNCTION__, __( 'Access denied' ), $this->parent->_version );
483 | } // End __wakeup()
484 |
485 | }
486 |
--------------------------------------------------------------------------------
/includes/class-so-clean-up-wp-seo.php:
--------------------------------------------------------------------------------
1 | _version = $version;
113 | $this->_token = 'cuws';
114 |
115 | // Load plugin environment variables
116 | $this->file = $file;
117 | $this->dir = dirname( $this->file );
118 | $this->assets_dir = trailingslashit( $this->dir ) . 'css';
119 | $this->assets_url = esc_url( trailingslashit( plugins_url( '/css/', $this->file ) ) );
120 |
121 | register_activation_hook( $this->file, array( $this, 'install' ) );
122 |
123 | // Load admin CSS
124 | add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_styles' ), 10, 1 );
125 |
126 | // Handle localisation
127 | add_action( 'plugins_loaded', array( $this, 'i18n' ), 0 );
128 |
129 | /*** PLUGIN FUNCTIONS ***/
130 |
131 | // @since v1.3.0
132 | add_action( 'admin_bar_menu', array( $this, 'so_cuws_remove_adminbar_settings' ), 999 );
133 | // @since 1.5.0
134 | add_action( 'wp_dashboard_setup', array( $this, 'so_cuws_remove_dashboard_widget' ) );
135 | // @since 2.0.0
136 | add_action( 'admin_head', array( $this, 'so_cuws_hide_visibility_css' ) );
137 | // @since 3.10.0
138 | add_action( 'admin_menu', array( $this, 'so_cuws_remove_menu_item'), 999 );
139 | // @since 3.11.0
140 | add_action( 'plugins_loaded', array( $this, 'so_cuws_remove_frontend_html_comments' ), 999 );
141 | // @since 3.13.0
142 | add_action( 'admin_init', array( $this, 'so_cuws_remove_class_hook' ) );
143 | // @since 3.13.0
144 | add_action( 'admin_menu', array( $this, 'so_cuws_remove_admin_columns_init' ), 11 );
145 | // @since 3.13.0
146 | add_action( 'admin_init', array( $this, 'so_cuws_remove_seo_scores_dropdown_filters' ), 20 );
147 |
148 |
149 | // Load API for generic admin functions
150 | if ( is_admin() ) {
151 | $this->admin = new CUWS_Admin_API();
152 | }
153 |
154 | $this->options = $this->_get_options();
155 | } // End __construct ()
156 |
157 | /**
158 | * Remove Settings submenu in admin bar
159 | * Since Yoast SEO 3.6 it is possible to disable the adminbar menu within
160 | * Dashboard > Features but only in individual sites, not network admin
161 | *
162 | * inspired by [Lee Rickler](https://profiles.wordpress.org/lee-rickler/)
163 | *
164 | * @since v1.3.0
165 | */
166 | public function so_cuws_remove_adminbar_settings() {
167 | if ( empty( $this->options['remove_adminbar'] ) ) {
168 | return;
169 | }
170 | global $wp_admin_bar;
171 | $nodes = array_keys( $wp_admin_bar->get_nodes() );
172 | foreach ( $nodes as $node ) {
173 | if ( false !== strpos( $node, 'wpseo' ) ) {
174 | $wp_admin_bar->remove_node( $node );
175 | }
176 | }
177 | }
178 |
179 | /**
180 | * Version 2.3 of Yoast SEO introduced a dashboard widget
181 | * This function removes this widget
182 | *
183 | * @since v1.5.0
184 | */
185 | public function so_cuws_remove_dashboard_widget() {
186 |
187 | if ( ! empty( $this->options['remove_dbwidget'] ) ) {
188 |
189 | remove_meta_box( 'wpseo-dashboard-overview', 'dashboard', 'side' );
190 |
191 | }
192 | }
193 |
194 | /**
195 | * at some point Yoast SEO has introduced "Primary Category Feature"
196 | * This function removes this "feature"
197 | *
198 | * @since v3.6.0
199 | */
200 | public function so_cuws_remove_primary_category_feature() {
201 |
202 | if ( ! empty( $this->options['remove_primarycatfeat'] ) ) {
203 |
204 | add_filter( 'wpseo_primary_term_taxonomies', '__return_empty_array' );
205 |
206 | }
207 | }
208 |
209 | /**
210 | * Remove Search Console
211 | *
212 | * @since v3.10.0
213 | */
214 | public function so_cuws_remove_menu_item() {
215 |
216 | // Google has discontinued its Crawl Errors API so the Search Console page in Yoast is useless now; thanks [@Dibbyo456](https://github.com/senlin/so-clean-up-wp-seo/issues/69); @since v3.12.0
217 | remove_submenu_page( 'wpseo_dashboard', 'wpseo_search_console' );
218 |
219 | }
220 |
221 | /**
222 | * Upon request by many the plugin now also removes the frontend HTML comments left by Yoast
223 | * improvements of v3.11.1 via [Robert Went](https://gist.github.com/robwent/f36e97fdd648a40775379a86bd97b332)
224 | * v3.14.6: added conditional for new filter tip from [Emanuel-23](https://github.com/senlin/so-clean-up-wp-seo/issues/95)
225 | *
226 | * @since v3.11.0
227 | * @modified v3.11.1
228 | * @modified v3.14.6
229 | */
230 | public function so_cuws_remove_frontend_html_comments() {
231 |
232 | if ( ! empty( $this->options['remove_html_comments'] ) ) {
233 |
234 | if ( defined( 'WPSEO_VERSION' ) ) {
235 |
236 | $wpseo_version = constant( 'WPSEO_VERSION' );
237 |
238 | // the wpseo_debug_markers() filter was added in WP SEO version 14.1
239 | if ( version_compare ( $wpseo_version , '14.1', '<' ) ) {
240 |
241 | add_action( 'get_header', function () { ob_start( function ( $o ) {
242 | return preg_replace( '/\n?<.*?Yoast SEO plugin.*?>/mi', '', $o ); } ); } );
243 | add_action( 'wp_head',function (){ ob_end_flush(); }, 999 );
244 |
245 | } else {
246 |
247 | add_filter( 'wpseo_debug_markers', '__return_false' );
248 |
249 | }
250 |
251 | }
252 |
253 | }
254 | }
255 |
256 | /**
257 | * Remove warning notice when changing permalinks
258 | *
259 | * Removes the permalink notice action (see includes/remove-class.php)
260 | * Uses @remove_class_hook.
261 | *
262 | * @since v3.13.0
263 | */
264 | public function so_cuws_remove_class_hook() {
265 |
266 | if ( ! empty( $this->options['remove_permalinks_warning'] ) ) {
267 |
268 | remove_class_hook( 'admin_notices', 'WPSEO_Admin_Init', 'permalink_settings_notice' );
269 |
270 | }
271 | }
272 |
273 | /*
274 | * Remove admin columns
275 | * @since v2.0.0 remove seo columns one by one
276 | * @modified 2.0.2 add empty array as default to avoid warnings form subsequent
277 | * in_array checks - credits [Ronny Myhre Njaastad](https://github.com/ronnymn)
278 | * @modified 2.1 simplify the CSS rules and add the rule to hide the seo-score
279 | * column on taxonomies (added to v3.1 of Yoast SEO plugin)
280 | * @modified 2.6.0 only 2 columns left change from checkboxes to radio
281 | * @modified 2.6.1 revert radio to checkboxes and removing the options
282 | * for focus keyword, title and meta-description
283 | * @modified 3.10.1 add checkbox to hide outgoing internal links column
284 | * @modified 3.13.0 recode the function to **remove** columns instead of hiding them - credits [Dibbyo456](https://github.com/Dibbyo456)
285 | */
286 | public function so_cuws_remove_admin_columns_init() {
287 |
288 | // post, page and custom post types
289 | $all_post_types = array_merge( array( 'post', 'page' ), get_post_types( array( '_builtin' => false ) ) );
290 |
291 | foreach( $all_post_types as $post_type ) {
292 | add_filter( 'manage_edit-'. $post_type .'_columns', array( $this, 'so_cuws_remove_admin_columns' ), 10, 1 );
293 | }
294 |
295 | }
296 |
297 | public function so_cuws_remove_admin_columns( $columns ) {
298 |
299 | // if empty return columns right away.
300 | if ( empty( $this->options['hide_admincolumns'] ) ) {
301 | return $columns;
302 | }
303 |
304 | // seo score column
305 | if ( in_array( 'seoscore', $this->options['hide_admincolumns'] ) ) {
306 | unset( $columns['wpseo-score'] );
307 | }
308 |
309 | // readability column
310 | if ( in_array( 'readability', $this->options['hide_admincolumns'] ) ) {
311 | unset( $columns['wpseo-score-readability'] );
312 | }
313 |
314 | // title column
315 | if ( in_array( 'title', $this->options['hide_admincolumns'] ) ) {
316 | unset( $columns['wpseo-title'] );
317 | }
318 |
319 | // meta description column
320 | if ( in_array( 'metadescr', $this->options['hide_admincolumns'] ) ) {
321 | unset( $columns['wpseo-metadesc'] );
322 | }
323 |
324 | // focus keyword column
325 | if ( in_array( 'focuskw', $this->options['hide_admincolumns'] ) ) {
326 | unset( $columns['wpseo-focuskw'] );
327 | }
328 |
329 | // outgoing internal links column
330 | if ( in_array( 'outgoing_internal_links', $this->options['hide_admincolumns'] ) ) {
331 | unset( $columns['wpseo-links'] );
332 | unset( $columns['wpseo-linked'] );
333 | }
334 |
335 | return $columns;
336 |
337 | }
338 |
339 |
340 | /**
341 | * Remove (as opposed to hide) SEO/readability Scores dropdown filters on edit posts screens
342 | *
343 | * credits [Dibbyo456](https://github.com/Dibbyo456)
344 | */
345 | public function so_cuws_remove_seo_scores_dropdown_filters() {
346 | if ( ! empty( $this->options['remove_seo_scores_dropdown_filters'] ) ) {
347 | global $wpseo_meta_columns ;
348 | if ( $wpseo_meta_columns ) {
349 | remove_action( 'restrict_manage_posts', array( $wpseo_meta_columns , 'posts_filter_dropdown' ) );
350 | remove_action( 'restrict_manage_posts', array( $wpseo_meta_columns , 'posts_filter_dropdown_readability' ) );
351 | }
352 | }
353 | }
354 |
355 |
356 | /**
357 | * CSS needed to hide the various options ticked with checkboxes
358 | *
359 | * @since v2.0.0
360 | * @modified v2.1.0 remove options for nags that have been temporarily
361 | * disabled in v3.1 of Yoast SEO plugin
362 | */
363 | public function so_cuws_hide_visibility_css() {
364 |
365 | echo '';
536 | }
537 |
538 |
539 | /**
540 | * Load admin CSS.
541 | *
542 | * @access public
543 | * @since v2.0.0
544 | * @return void
545 | */
546 | public function admin_enqueue_styles( $hook = '' ) {
547 | wp_register_style( $this->_token . '-admin', esc_url( $this->assets_url ) . 'admin.css', array(), $this->_version );
548 | wp_enqueue_style( $this->_token . '-admin' );
549 | } // End admin_enqueue_styles ()
550 |
551 | /**
552 | * Loads the translation file.
553 | *
554 | * @since v1.0.0
555 | */
556 | function i18n() {
557 | load_plugin_textdomain( 'so-clean-up-wp-seo', false, basename( dirname( __FILE__ ) ) . '/languages/' );
558 | }
559 |
560 | /**
561 | * Main CUWS Instance
562 | *
563 | * Ensures only one instance of CUWS is loaded or can be loaded.
564 | *
565 | * @since v2.0.0
566 | * @static
567 | * @see CUWS()
568 | *
569 | * @param string $file
570 | * @param string $version Version number.
571 | *
572 | * @return CUWS $_instance
573 | */
574 | public static function instance( $file = '', $version = '4.0.0' ) {
575 | if ( null === self::$_instance ) {
576 | self::$_instance = new self( $file, $version );
577 | }
578 |
579 | return self::$_instance;
580 | } // End instance ()
581 |
582 | /**
583 | * Cloning is forbidden.
584 | *
585 | * @since v2.0.0
586 | */
587 | public function __clone() {
588 | _doing_it_wrong( __FUNCTION__, __( 'No Access' ), $this->_version );
589 | } // End __clone ()
590 |
591 | /**
592 | * Unserializing instances of this class is forbidden.
593 | *
594 | * @since v2.0.0
595 | */
596 | public function __wakeup() {
597 | _doing_it_wrong( __FUNCTION__, __( 'No Access' ), $this->_version );
598 | } // End __wakeup ()
599 |
600 | /**
601 | * Installation. Runs on activation.
602 | *
603 | * @access public
604 | * @since v2.0.0
605 | * @return void
606 | */
607 | public function install() {
608 | $this->_log_version_number();
609 | $this->_set_defaults();
610 | } // End install ()
611 |
612 | /**
613 | * Log the plugin version number.
614 | *
615 | * @access private
616 | * @since v2.0.0
617 | * @return void
618 | */
619 | private function _log_version_number() {
620 | update_site_option( $this->_token . '_version', $this->_version );
621 | } // End _log_version_number ()
622 |
623 | /**
624 | * Array containing the default values.
625 | * Use `array_keys()` to return the key names.
626 | *
627 | * @return array
628 | */
629 | public function get_defaults() {
630 | $defaults = array(
631 | 'hide_dashboard_problems_notifications' => array(
632 | 'problems',
633 | 'notifications'
634 | ),
635 | 'hide_ads' => 'on',
636 | 'hide_premium_submenu' => 'on',
637 | 'hide_admincolumns' => array(
638 | 'seoscore',
639 | 'readability',
640 | 'title',
641 | 'metadescr',
642 | 'outgoing_internal_links'
643 | ),
644 | 'remove_seo_scores_dropdown_filters' => 'on',
645 | 'hide_imgwarning_nag' => 'on',
646 | 'hide_content_keyword_score' => 'on',
647 | 'hide_premium_features_yoast_metabox' => 'on',
648 | 'hide_ad_after_trashing_content' => 'on',
649 | 'remove_adminbar' => 'on',
650 | 'remove_dbwidget' => 'on',
651 | 'remove_permalinks_warning' => 'on',
652 | 'hide_seo_settings_profile_page' => 'on',
653 | 'remove_html_comments' => 'on'
654 | );
655 |
656 | return $defaults;
657 | }
658 |
659 | /**
660 | * Set default values on activation.
661 | *
662 | * @access private
663 | * @return void
664 | */
665 | private function _set_defaults() {
666 | $defaults = $this->get_defaults();
667 | update_site_option( $this->_token . '_settings', $defaults );
668 | } // End _set_defaults ()
669 |
670 | /**
671 | * Get plugin options.
672 | * Add new default options if missing from saved options.
673 | *
674 | * @return array $options Plugin options.
675 | * @since 3.8.1
676 | */
677 | private function _get_options() {
678 | $options = get_site_option( $this->_token . '_settings', array() );
679 | $defaults = $this->get_defaults();
680 | $diff = array_diff_key( $defaults, $options );
681 |
682 | if ( ! empty( $diff ) ) {
683 | $options = array_merge( $options, $diff );
684 | update_site_option( $this->_token . '_settings', $options );
685 | }
686 |
687 | return $options;
688 | }
689 |
690 | }
691 |
--------------------------------------------------------------------------------
/includes/remove-class.php:
--------------------------------------------------------------------------------
1 | callbacks[ $priority ] ) ) {
27 |
28 | $methods = array_filter( wp_list_pluck(
29 | $wp_filter[ $tag ]->callbacks[ $priority ],
30 | 'function'
31 | ), function ( $method ) {
32 | /**
33 | * Allow only array & string notation for hooks, since we're
34 | * looking to remove an exact method of a class anyway. And the
35 | * method of the class is passed in as a string anyway.
36 | */
37 | return is_string( $method ) || is_array( $method );
38 | } );
39 |
40 | $found_hooks = ! empty( $methods ) ? wp_list_filter( $methods, array( 1 => $method_name ) ) : array();
41 |
42 | foreach( $found_hooks as $hook_key => $hook ) {
43 | if ( ! empty( $hook[0] ) && is_object( $hook[0] ) && get_class( $hook[0] ) === $class_name ) {
44 | $wp_filter[ $tag ]->remove_filter( $tag, $hook, $priority );
45 | $is_hook_removed = true;
46 | }
47 | }
48 | }
49 | return $is_hook_removed;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 | required)."
115 | msgstr ""
116 |
117 | #: includes/class-so-clean-up-wp-seo-settings.php:161
118 | msgid "Hide all columns"
119 | msgstr ""
120 |
121 | #: includes/class-so-clean-up-wp-seo-settings.php:161
122 | msgid "Hide SEO score column"
123 | msgstr ""
124 |
125 | #: includes/class-so-clean-up-wp-seo-settings.php:161
126 | msgid "Hide title column"
127 | msgstr ""
128 |
129 | #: includes/class-so-clean-up-wp-seo-settings.php:161
130 | msgid "Hide meta description column"
131 | msgstr ""
132 |
133 | #: includes/class-so-clean-up-wp-seo-settings.php:161
134 | msgid "Hide focus keyword column"
135 | msgstr ""
136 |
137 | #: includes/class-so-clean-up-wp-seo-settings.php:161
138 | msgid "Show all columns"
139 | msgstr ""
140 |
141 | #: includes/class-so-clean-up-wp-seo-settings.php:166
142 | msgid "SEO menu admin bar"
143 | msgstr ""
144 |
145 | #: includes/class-so-clean-up-wp-seo-settings.php:167
146 | msgid ""
147 | "The adminbar contains an SEO menu with 2 options; select here what to remove."
148 | msgstr ""
149 |
150 | #: includes/class-so-clean-up-wp-seo-settings.php:169
151 | msgid "SEO Settings"
152 | msgstr ""
153 |
154 | #: includes/class-so-clean-up-wp-seo-settings.php:169
155 | msgid "Keyword Research"
156 | msgstr ""
157 |
158 | #: includes/class-so-clean-up-wp-seo-settings.php:169
159 | msgid "Both"
160 | msgstr ""
161 |
162 | #: includes/class-so-clean-up-wp-seo-settings.php:169
163 | msgid "None"
164 | msgstr ""
165 |
166 | #: includes/class-so-clean-up-wp-seo-settings.php:174
167 | msgid "Dashboard widget"
168 | msgstr ""
169 |
170 | #: includes/class-so-clean-up-wp-seo-settings.php:175
171 | msgid "Remove the Yoast SEO widget from the WordPress Dashboard."
172 | msgstr ""
173 |
174 | #: includes/class-so-clean-up-wp-seo-settings.php:249
175 | msgid ""
176 | "With version 2.0.0 we have added this settings page, so you can adjust "
177 | "things here and there to your liking."
178 | msgstr ""
179 |
180 | #: includes/class-so-clean-up-wp-seo-settings.php:251
181 | msgid ""
182 | "The default setting, when you activate the plugin, is that almost all boxes "
183 | "have been ticked; why else would you install our plugin?"
184 | msgstr ""
185 |
186 | #: includes/class-so-clean-up-wp-seo-settings.php:253
187 | msgid ""
188 | "The intro tour pop up balloon is set to \"seen\" by default and there is no "
189 | "setting to show it as you can find it in the Yoast SEO Settings."
190 | msgstr ""
191 |
192 | #: includes/class-so-clean-up-wp-seo-settings.php:255
193 | msgid ""
194 | "If you ever want to remove the SO Hide SEO Bloat plugin, then you can rest "
195 | "assured that it cleans up after itself:"
196 | msgstr ""
197 |
198 | #: includes/class-so-clean-up-wp-seo-settings.php:255
199 | msgid "upon deletion it removes all options automatically."
200 | msgstr ""
201 |
202 | #: includes/class-so-clean-up-wp-seo-settings.php:267
203 | msgid "Save Settings"
204 | msgstr ""
205 |
206 | #: includes/class-so-clean-up-wp-seo-settings.php:274
207 | #, php-format
208 | msgid ""
209 | "If you have found this plugin at all useful, please give it a favourable "
210 | "rating in the