diff --git a/README.md b/README.md index 8b77c89..998093f 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ [![plugin version](https://img.shields.io/wordpress/plugin/v/so-clean-up-wp-seo.svg)](https://wordpress.org/plugins/so-clean-up-wp-seo) -###### Last updated on 2015.12.26 +###### Last updated on 2016.02.04 ###### requires at least WordPress 4.0 -###### tested up to WordPress 4.4.1 +###### tested up to WordPress 4.4.2 ###### Author: [Piet Bos](https://github.com/senlin) -Hide most of the bloat that the Yoast SEO plugin adds to your WordPress Dashboard +Hide most of the bloat that the Yoast SEO plugin adds to your WordPress Dashboard, now with Settings Page! ## Description @@ -15,35 +15,64 @@ Almost anyone that uses Yoast SEO by Team Yoast will agree that it is a great SE The purpose of the SO Hide SEO Bloat plugin is to clean up all those unwanted things. -As per the current release, the plugin removes and/or disables the following unwanted items: +Since v2.0.0 (released on February 4, 2016) we have a Settings page! -* removes sidebar ads on all Yoast SEO settings pages -* removes the Yoast SEO settings from the Admin Bar -* removes updated nag -* sets plugin-intro-tour user_meta to true (means done) -* removes the keyword/description columns on edit Posts/Pages pages -* removes the overview dashboard widget that was introduced in version 2.3 of the Yoast SEO plugin -* remove GSC (Google Search Console) nag that was introduced in Yoast SEO 2.3.3 -* remove yst_opengraph_image_warning nag that was added to Yoast SEO 2.1, but we never noticed it before. In the changelog it has been described as "validation error", which of course is nonsense, because the world is larger than social media. The nag manifests itself by placing thick red borders around your Featured Image as well as a red-bordered warning message when your Featured Image is smaller than 200x200 pixels. -* remove + icon from new Edit screen UI as it serves only to show an ad for the premium version of Yoast SEO -* remove wpseo-score traffic light next to Move to trash on Edit Post/Page screen -* remove SEO score algorithm recalculate nag +The purpose of the settings page is that you can fine-tune what is hidden or removed to your liking. By default most of the bloat that the Yoast SEO plugin generates is hidden or removed, just like before when there were no settings yet. + +It is a good idea to have a look at the Settings page if only to see what you can fine-tune. The link to the page has been added to the Yoast SEO menu and of course there is also a link to it from the Plugins page. + +The default settings of the current release are as follows: -If you like the SO Hide SEO Bloat plugin, please consider leaving a [review](https://wordpress.org/support/view/plugin-reviews/so-clean-up-wp-seo?rate=5#postform). +* hide the cartoon-style sidebar ads on almost all settings pages of the Yoast SEO plugin +* hide about nag that shows on every update of the plugin +* hide recalculate nag that alerts user that SEO score algorithm has been updated +* hide tagline nag that shows when your site uses the default WordPress tagline +* hide robots nag that shows when your site is blocking access to robots, for example on dev and staging sites; it also hides the warning in the advanced tab of Yoast SEO UI in edit Post/Page screen +* hide Google Search Console nag that warns about not missing any crawl errors by connecting the Yoast SEO plugin to it +* hide image warning nag that shows in edit Post/Page screen when featured image is smaller than 200x200 pixels +* hide add keyword button that shows in edit Post/Page and only serves to show an ad for the premium version +* hide seoscore traffic light in publish/update box on edit Post/Page +* hide the SEO Score, Title and Meta description admin columns on the Posts/Pages screen; Focus keyword column can be hidden too +* remove SEO Settings sub menu of SEO menu in admin bar; additional option is to remove the Keyword Research sub menu +* remove the Yoast SEO widget from the WordPress Dashboard +* the tour is set to seen (there is no setting for this as the tour can be seen at any moment by going to the General settings of the Yoast SEO plugin) + +If you like the SO Hide SEO Bloat plugin, please consider leaving a [review](https://wordpress.org/support/view/plugin-reviews/so-clean-up-wp-seo?rate=5#postform). You can also help a great deal by [translating the plugin](https://translate.wordpress.org/projects/wp-plugins/so-clean-up-wp-seo) into your own language. Alternatively you are welcome to make a [donation](http://so-wp.com/donations/). Thanks! ## Frequently Asked Questions -### Where are the Settings? - -For [v2.0.0](https://github.com/senlin/so-clean-up-wp-seo/milestones/version%202.0.0) we have planned a complete rewrite of the SO Hide SEO Bloat plugin which includes a Settings page to enable the user to clean up individual items, instead of the current blanket rule. +### Where is the settings page? -For now however you can stop looking, there is none yet. Activate the plugin to clean up your WordPress dashboard. +The link to the page has been added to the Yoast SEO menu and of course there is also a link to it from the Plugins page. ### Can I use SO Hide SEO Bloat on Multisite? You can, but until further notice you need to activate the plugin on a per-site basis ([see this Github issue](https://github.com/senlin/so-clean-up-wp-seo/issues/4)) +### The name of the plugin is confusing, it hides bloat of which SEO plugin? + +Yes, you are right, the name is a bit vague (see Changelog v1.8.0). On the other hand there is only one SEO plugin that adds a lot of bloat to the WordPress Dashboard and that is the Yoast SEO plugin. + +### The plugin doesn't do anything! + +Do you have the Yoast SEO plugin installed? It hides the bloat from that plugin only. +If you have and the plugin still doesn't do anything, then please open a [support ticket](https://github.com/senlin/so-clean-up-wp-seo/issues). + +### With a settings page comes additional entries in the database; what happens on uninstall? + +Great question! +Indeed the SO Hide SEO Bloat plugin writes its settings to the database. The included `uninstall.php` file removes all the plugin-related entries from the database once you remove the plugin via the WordPress Plugins page (not on deactivation). + +### You have only a handful ratings/reviews; why should I install this plugin? + +Yes, you are correct and many people say that it is important for a plugin to have a good rating. +Fortunately there are already quite a few people that have downloaded the plugin, installed it, activated it and keep it activated, as you can see from the Active Installs in the sidebar. There must be something good that the plugin does then, right? + +So if you decide to install it and you're happy about the plugin, then please help the next person (and me) by [leaving a 5-star review](https://wordpress.org/support/view/plugin-reviews/so-clean-up-wp-seo?rate=5#postform). + +Thank you very much! + ### I have an issue with this plugin, where can I get support? Please open an issue here on [Github](https://github.com/senlin/so-clean-up-wp-seo/issues) @@ -75,6 +104,13 @@ We are looking to release a [new version](https://github.com/senlin/so-clean-up- ## Changelog +### 2.0.0 (2016.02.04) + +* complete rewrite of the plugin +* new Settings page to fine tune what is hidden/removed to your liking +* new screenshots +* tested up to WP 4.4.2 + ### 1.8.0 (2016.01.28) * name change to avoid "Yoast" trademark violation @@ -157,6 +193,10 @@ We are looking to release a [new version](https://github.com/senlin/so-clean-up- ## Update Notice +### 2.0.0 + +* Version 2.0.0 is a complete rewrite of the SO Hide SEO Bloat plugin. Please visit the Settings page after you have updated to this version, so you can fine tune what is hidden/removed. + ### 1.8.0 * name change to avoid "Yoast" trademark violation diff --git a/admin/class-so-clean-up-wp-seo-admin-api.php b/admin/class-so-clean-up-wp-seo-admin-api.php new file mode 100644 index 0000000..2627205 --- /dev/null +++ b/admin/class-so-clean-up-wp-seo-admin-api.php @@ -0,0 +1,125 @@ +ID, $field['id'], true ); + + // Get data to display in field + if ( isset( $option ) ) { + $data = $option; + } + + } else { + + // Get saved option + $option_name .= $field['id']; + $option = get_option( $option_name ); + + // Get data to display in field + if ( isset( $option ) ) { + $data = $option; + } + + } + + // Show default data if no option saved and default is supplied + if ( $data === false && isset( $field['default'] ) ) { + $data = $field['default']; + } elseif ( $data === false ) { + $data = ''; + } + + $html = ''; + + switch( $field['type'] ) { + + case 'checkbox': + $checked = ''; + if ( $data && 'on' == $data ) { + $checked = 'checked="checked"'; + } + $html .= '' . "\n"; + break; + + case 'checkbox_multi': + foreach ( $field['options'] as $k => $v ) { + $checked = false; + if ( in_array( $k, $data ) ) { + $checked = true; + } + $html .= ' '; + } + break; + + case 'radio': + foreach ( $field['options'] as $k => $v ) { + $checked = false; + if ( $k == $data ) { + $checked = true; + } + $html .= ' '; + } + break; + + } + + switch( $field['type'] ) { + + case 'checkbox_multi': + case 'radio': + $html .= '
' . $field['description'] . ''; + break; + + default: + if ( ! $post ) { + $html .= '' . "\n"; + } + break; + } + + if ( ! $echo ) { + return $html; + } + + echo $html; + + } + +} diff --git a/assets/banner-772x250.png b/assets/banner-772x250.png index d22d0b8..cfca4c4 100644 Binary files a/assets/banner-772x250.png and b/assets/banner-772x250.png differ diff --git a/assets/screenshot-1.jpg b/assets/screenshot-1.jpg index efb4f72..8bbe291 100644 Binary files a/assets/screenshot-1.jpg and b/assets/screenshot-1.jpg differ diff --git a/assets/screenshot-2.jpg b/assets/screenshot-2.jpg index 1f6fcea..0b92117 100644 Binary files a/assets/screenshot-2.jpg and b/assets/screenshot-2.jpg differ diff --git a/assets/screenshot-3.jpg b/assets/screenshot-3.jpg index d7abfc6..1f49a6b 100644 Binary files a/assets/screenshot-3.jpg and b/assets/screenshot-3.jpg differ diff --git a/assets/screenshot-4.jpg b/assets/screenshot-4.jpg index 41fc697..e6c0c23 100644 Binary files a/assets/screenshot-4.jpg and b/assets/screenshot-4.jpg differ diff --git a/assets/screenshot-5.jpg b/assets/screenshot-5.jpg index 21e09fd..be1c4d0 100644 Binary files a/assets/screenshot-5.jpg and b/assets/screenshot-5.jpg differ diff --git a/css/admin.css b/css/admin.css new file mode 100644 index 0000000..67321ad --- /dev/null +++ b/css/admin.css @@ -0,0 +1,59 @@ +/** + * All of the CSS for the admin-specific functionality is included in this file. + * @since v2.0.0 + */ + +.seo_page_cuws_settings .wrap > h2 { + background-image: url("../images/so-icon.png"); + background-position: 0 0; + background-repeat: no-repeat; + background-size: 32px auto; + display: block; + min-height: 32px; + padding-left: 40px !important; + padding-top: 2px !important; +} +.seo_page_cuws_settings .wrap > p { + font-size: 16px; +} +.seo_page_cuws_settings .wrap > form span.description { + font-size: 14px; +} +.rate-this-plugin { + color: #0074A2; + font-style: italic; + font-size: 16px; +} +.support, +.translate { + font-size: 16px; +} +.author.postbox { + max-width: 500px; +} +.author.postbox .hndle { + border-bottom: 1px solid #DDD; + margin-bottom: 0; + padding: 5px; +} +.author.postbox .inside { + display: block; + margin: 0; + overflow: hidden; +} +.author.postbox .inside .top { + min-height: 90px; +} +.author.postbox .inside > .top > .author-image { + border: 1px solid #DFDFDF; + float: left; + margin-right: 10px; + padding: 3px; +} +.author.postbox .inside > ul { + clear: both; +} +.author.postbox .inside li { + float: left; + width: 50%; +} diff --git a/images/pietbos-80x80.jpg b/images/pietbos-80x80.jpg new file mode 100644 index 0000000..c9958c6 Binary files /dev/null and b/images/pietbos-80x80.jpg differ diff --git a/images/so-icon.png b/images/so-icon.png new file mode 100644 index 0000000..c9d6ded Binary files /dev/null and b/images/so-icon.png differ diff --git a/includes/class-so-clean-up-wp-seo-settings.php b/includes/class-so-clean-up-wp-seo-settings.php new file mode 100644 index 0000000..07b0c5b --- /dev/null +++ b/includes/class-so-clean-up-wp-seo-settings.php @@ -0,0 +1,368 @@ +parent = $parent; + + $this->base = 'cuws_'; + + // Initialise settings + add_action( 'init', array( $this, 'init_settings' ), 11 ); + + // Register plugin settings + add_action( 'admin_init' , array( $this, 'register_settings' ) ); + + // Add settings page to menu + add_action( 'admin_menu' , array( $this, 'add_menu_item' ) ); + + // Add settings link to plugins page + add_filter( 'plugin_action_links_' . plugin_basename( $this->parent->file ) , array( $this, 'add_settings_link' ) ); + + } + + /** + * Initialise settings + * @return void + * @since v2.0.0 + */ + public function init_settings () { + $this->settings = $this->settings_fields(); + } + + /** + * Add settings page to admin menu + * @return void + * @since v2.0.0 + */ + public function add_menu_item () { + $page = add_submenu_page( + 'wpseo_dashboard', + __( 'SO Hide SEO Bloat Settings', 'so-clean-up-wp-seo' ), + __( 'Hide Bloat', 'so-clean-up-wp-seo' ), + 'manage_options', + $this->parent->_token . '_settings', + array( $this, 'settings_page' ) + ); + } + + /** + * Add settings link to plugin list table + * @param array $links Existing links + * @return array Modified links + * @since v2.0.0 + */ + public function add_settings_link ( $links ) { + $settings_link = '' . __( 'Settings', 'so-clean-up-wp-seo' ) . ''; + array_unshift( $links, $settings_link ); + return $links; + } + + /** + * Build settings fields + * @return array Fields to be displayed on settings page + * @since v2.0.0 + */ + private function settings_fields () { + + $settings['standard'] = array( + 'title' => __( 'Without further ado: Hide the bloat', 'so-clean-up-wp-seo' ), + //'description' => __( 'description' ), + 'fields' => array( + array( + 'id' => 'hide_ads', + 'label' => __( 'Sidebar Ads', 'so-clean-up-wp-seo' ), + 'description' => __( 'Hide the cartoon-style sidebar ads on almost all settings pages of the Yoast SEO plugin.', 'so-clean-up-wp-seo' ), + 'type' => 'checkbox', + 'default' => 'on' + ), + array( + 'id' => 'hide_about_nag', + 'label' => __( 'About nag', 'so-clean-up-wp-seo' ), + 'description' => __( 'Hide about nag that shows on every update of the plugin.', 'so-clean-up-wp-seo' ), + 'type' => 'checkbox', + 'default' => 'on' + ), + array( + 'id' => 'hide_recalc_nag', + 'label' => __( 'Recalculate nag', 'so-clean-up-wp-seo' ), + 'description' => __( 'Hide recalculate nag that alerts user that SEO score algorithm has been updated.', 'so-clean-up-wp-seo' ), + 'type' => 'checkbox', + 'default' => 'on' + ), + array( + 'id' => 'hide_tagline_nag', + 'label' => __( 'Tagline nag', 'so-clean-up-wp-seo' ), + 'description' => __( 'Hide tagline nag that shows when your site uses the default WordPress tagline.', 'so-clean-up-wp-seo' ), + 'type' => 'checkbox', + 'default' => 'on' + ), + array( + 'id' => 'hide_robots_nag', + 'label' => __( 'Robots nag', 'so-clean-up-wp-seo' ), + 'description' => __( 'Hide robots nag that shows when your site is blocking access to robots, for example on dev and staging sites.', 'so-clean-up-wp-seo' ) . '
' . __( ' It also hides the warning in the advanced tab of Yoast SEO UI in edit Post/Page screen.', 'so-clean-up-wp-seo' ), + 'type' => 'checkbox', + 'default' => 'on' + ), + array( + 'id' => 'hide_gsc_nag', + 'label' => __( 'GSC nag', 'so-clean-up-wp-seo' ), + 'description' => __( 'Hide Google Search Console nag that warns about not missing any crawl errors by connecting the Yoast SEO plugin to it.', 'so-clean-up-wp-seo' ), + 'type' => 'checkbox', + 'default' => 'on' + ), + array( + 'id' => 'hide_imgwarning_nag', + 'label' => __( 'Featured image nag', 'so-clean-up-wp-seo' ), + 'description' => __( 'Hide image warning nag that shows in edit Post/Page screen when featured image is smaller than 200x200 pixels.', 'so-clean-up-wp-seo' ), + 'type' => 'checkbox', + 'default' => 'on' + ), + array( + 'id' => 'hide_addkw_button', + 'label' => __( 'Add keyword button', 'so-clean-up-wp-seo' ), + 'description' => __( 'Hide add keyword button that shows in edit Post/Page and only serves to show an ad for the premium version.', 'so-clean-up-wp-seo' ), + 'type' => 'checkbox', + 'default' => 'on' + ), + array( + 'id' => 'hide_trafficlight', + 'label' => __( 'Trafficlight', 'so-clean-up-wp-seo' ), + 'description' => __( 'Hide seoscore traffic light in publish/update box on edit Post/Page.', 'so-clean-up-wp-seo' ), + 'type' => 'checkbox', + 'default' => 'on' + ), + array( + 'id' => 'hide_wpseoanalysis', + 'label' => __( 'Content analysis', 'so-clean-up-wp-seo' ), + 'description' => __( 'Hide content analysis that adds colored balls to the edit Post/Page screens', 'so-clean-up-wp-seo' ), + 'type' => 'checkbox', + 'default' => 'on' + ), + array( + 'id' => 'hide_admin_columns', + 'label' => __( 'Admin columns', 'so-clean-up-wp-seo' ), + 'description' => __( 'The Yoast SEO plugin adds 4 admin columns on the Posts/Pages screen, choose here which ones to hide (possible to select multiple, ticking minimum one box is required).', 'so-clean-up-wp-seo' ), + 'type' => 'checkbox_multi', + 'options' => array( 'all' => __( 'Hide all columns', 'so-clean-up-wp-seo' ), 'seoscore' => __( 'Hide SEO score column', 'so-clean-up-wp-seo' ), 'title' => __( 'Hide title column', 'so-clean-up-wp-seo' ), 'metadescr' => __( 'Hide meta description column', 'so-clean-up-wp-seo' ), 'focuskw' => __( 'Hide focus keyword column', 'so-clean-up-wp-seo' ), 'none' => __( 'Show all columns', 'so-clean-up-wp-seo' ) ), + 'default' => array( 'seoscore', 'title', 'metadescr' ) + ), + array( + 'id' => 'remove_adminbar', + 'label' => __( 'SEO menu admin bar', 'so-clean-up-wp-seo' ), + 'description' => __( 'The adminbar contains an SEO menu with 2 options; select here what to remove.', 'so-clean-up-wp-seo' ), + 'type' => 'radio', + 'options' => array( 'seo' => __( 'SEO Settings', 'so-clean-up-wp-seo' ), 'keyword' => __( 'Keyword Research', 'so-clean-up-wp-seo' ), 'both' => __( 'Both', 'so-clean-up-wp-seo' ), 'none' => __( 'None', 'so-clean-up-wp-seo' ) ), + 'default' => 'seo' + ), + array( + 'id' => 'remove_dbwidget', + 'label' => __( 'Dashboard widget', 'so-clean-up-wp-seo' ), + 'description' => __( 'Remove the Yoast SEO widget from the WordPress Dashboard.', 'so-clean-up-wp-seo' ), + 'type' => 'checkbox', + 'default' => 'on' + ) + ) + ); + + $settings = apply_filters( $this->parent->_token . '_settings_fields', $settings ); + + return $settings; + } + + /** + * Register plugin settings + * @return void + * @since v2.0.0 + */ + public function register_settings () { + if ( is_array( $this->settings ) ) { + + // Check posted/selected tab + $current_section = ''; + if ( isset( $_POST['tab'] ) && $_POST['tab'] ) { + $current_section = $_POST['tab']; + } else { + if ( isset( $_GET['tab'] ) && $_GET['tab'] ) { + $current_section = $_GET['tab']; + } + } + + foreach ( $this->settings as $section => $data ) { + + if ( $current_section && $current_section != $section ) continue; + + // Add section to page + add_settings_section( $section, $data['title'], array( $this, 'settings_section' ), $this->parent->_token . '_settings' ); + + foreach ( $data['fields'] as $field ) { + + // Validation callback for field + $validation = ''; + if ( isset( $field['callback'] ) ) { + $validation = $field['callback']; + } + + // Register field + $option_name = $this->base . $field['id']; + register_setting( $this->parent->_token . '_settings', $option_name, $validation ); + + // Add field to page + add_settings_field( $field['id'], $field['label'], array( $this->parent->admin, 'display_field' ), $this->parent->_token . '_settings', $section, array( 'field' => $field, 'prefix' => $this->base ) ); + } + + if ( ! $current_section ) break; + } + } + } + + public function settings_section ( $section ) { + $html = "\n"; + echo $html; + } + + /** + * Load settings page content + * @return void + * @since v2.0.0 + */ + public function settings_page () { + + // Build page HTML + $html = '
' . "\n"; + $html .= '

' . esc_attr( __( 'SO Hide SEO Bloat Settings' , 'so-clean-up-wp-seo' ) ) . '

' . "\n"; + + $html .= '

' . esc_attr( __( 'With version 2.0.0 we have added this settings page, so you can adjust things here and there to your liking.', 'so-clean-up-wp-seo' ) ) . '

' . "\n"; + + $html .= '

' . esc_attr( __( 'The default setting, when you activate the plugin, is that almost all boxes have been ticked; why else would you install our plugin?', 'so-clean-up-wp-seo' ) ) . '

' . "\n"; + + $html .= '

' . esc_attr( __( 'The intro tour pop up balloon is set to "seen" by default and there is no setting to show it as you can find it in the Yoast SEO Settings.', 'so-clean-up-wp-seo' ) ) . '

' . "\n"; + + $html .= '

' . esc_attr( __( 'If you ever want to remove the SO 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"; + + $html .= '
' . "\n"; + + // Get settings fields + ob_start(); + settings_fields( $this->parent->_token . '_settings' ); + do_settings_sections( $this->parent->_token . '_settings' ); + $html .= ob_get_clean(); + + $html .= '

' . "\n"; + + $html .= '' . "\n"; + $html .= '

' . "\n"; + $html .= '
' . "\n"; + + + // see //codex.wordpress.org/I18n_for_WordPress_Developers#HTML for instructions on i18n of $html + $rateurl = 'https://wordpress.org/support/view/plugin-reviews/so-clean-up-wp-seo?rate=5#postform'; + $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"; + + $translateurl = 'https://translate.wordpress.org/projects/wp-plugins/so-clean-up-wp-seo'; + $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"; + + $supporturl = 'https://github.com/senlin/so-clean-up-wp-seo/issues'; + $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"; + + $html .= '
' . "\n"; + + $html .= '

' . esc_attr( __( 'About the Author', 'so-clean-up-wp-seo' ) ) . '

' . "\n"; + + $html .= '
' . "\n"; + $html .= '
' . "\n"; + + $html .= 'plugin author Piet Bos' . "\n"; + + $sowpurl = 'http://so-wp.com'; + $html .= '

' . sprintf( wp_kses( __( 'Hi, my name is Piet Bos, I hope you like this plugin! Please check out any of my other plugins on SO WP Plugins. You can find out more information about me via the following links:', 'so-clean-up-wp-seo' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( $sowpurl ) ) . '

' . "\n"; + + $html .= '
' . "\n"; // end .top + + $html .= '' . "\n"; + + $html .= '
' . "\n"; // end .inside + + $html .= '
' . "\n"; // end .postbox + + $html .= '
' . "\n"; + + echo $html; + } + + /** + * Main CUWS_Settings Instance + * + * Ensures only one instance of CUWS_Settings is loaded or can be loaded. + * + * @since v2.0.0 + * @static + * @see CUWS() + * @return Main CUWS_Settings instance + */ + public static function instance ( $parent ) { + if ( is_null( self::$_instance ) ) { + self::$_instance = new self( $parent ); + } + return self::$_instance; + } // End instance() + + /** + * Cloning is forbidden. + * + * @since v2.0.0 + */ + public function __clone () { + _doing_it_wrong( __FUNCTION__, __( 'Access denied' ), $this->parent->_version ); + } // End __clone() + + /** + * Unserializing instances of this class is forbidden. + * + * @since v2.0.0 + */ + public function __wakeup () { + _doing_it_wrong( __FUNCTION__, __( 'Access denied' ), $this->parent->_version ); + } // End __wakeup() + +} diff --git a/includes/class-so-clean-up-wp-seo.php b/includes/class-so-clean-up-wp-seo.php new file mode 100644 index 0000000..6ad3c4b --- /dev/null +++ b/includes/class-so-clean-up-wp-seo.php @@ -0,0 +1,380 @@ +_version = $version; + $this->_token = 'cuws'; + + // Load plugin environment variables + $this->file = $file; + $this->dir = dirname( $this->file ); + $this->assets_dir = trailingslashit( $this->dir ) . 'css'; + $this->assets_url = esc_url( trailingslashit( plugins_url( '/css/', $this->file ) ) ); + + register_activation_hook( $this->file, array( $this, 'install' ) ); + + // Load admin CSS + add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_styles' ), 10, 1 ); + + // Handle localisation + add_action( 'plugins_loaded', array( $this, 'i18n' ), 0 ); + + /*** PLUGIN FUNCTIONS ***/ + + // @since v1.3.0 + add_action( 'admin_bar_menu', array( $this, 'so_cuws_remove_adminbar_settings' ), 999 ); + // @since 1.4.0 + add_action( 'admin_init', array( $this, 'so_cuws_ignore_tour' ), 999 ); + // @since 1.5.0 + add_action( 'wp_dashboard_setup', array( $this, 'so_cuws_remove_dashboard_widget' ) ); + // @since 2.0.0 + add_action( 'admin_head', array( $this, 'so_cuws_hide_visibility_css' ) ); + + + // Load API for generic admin functions + if ( is_admin() ) { + $this->admin = new CUWS_Admin_API(); + } + + + } // End __construct () + + /** + * Cleanup functions depending on each checkbox returned value in admin + * + * @since v2.0.0 + */ + + /** + * Remove Settings submenu in admin bar + * + * inspired by [Lee Rickler](https://profiles.wordpress.org/lee-rickler/) + * @since v1.3.0 + */ + + public function so_cuws_remove_adminbar_settings() { + + $adminbar = get_option( 'cuws_remove_adminbar' ); + + global $wp_admin_bar; + + if ( 'seo' == $adminbar ) { + + $wp_admin_bar->remove_node( 'wpseo-settings' ); + + } + + if ( 'keyword' == $adminbar ) { + + $wp_admin_bar->remove_node( 'wpseo-kwresearch' ); + + } + + if ( 'both' == $adminbar ) { + + $wp_admin_bar->remove_node( 'wpseo-menu' ); + + } + + } + + /** + * Replaces previous so_cuws_remove_about_tour() function that has become redundant from Yoast SEO 2.2.1 onwards + * + * @since v1.4.0 + */ + public function so_cuws_ignore_tour() { + + update_user_meta( get_current_user_id(), 'wpseo_ignore_tour', true ); + + } + + /** + * Version 2.3 of Yoast SEO introduced a dashboard widget + * This function removes this widget + * + * @since v1.5.0 + */ + public function so_cuws_remove_dashboard_widget() { + + $remove_dbwidget = get_option( 'cuws_remove_dbwidget' ); + + if ( !empty( $remove_dbwidget ) ) { + + remove_meta_box( 'wpseo-dashboard-overview', 'dashboard', 'side' ); + + } + } + + /** + * CSS needed to hide the various options ticked with checkboxes + * + * @since v2.0.0 + */ + // CSS needed to hide the various options ticked with checkboxes + public function so_cuws_hide_visibility_css(){ + + echo ''; + + } + + + /** + * Load admin CSS. + * @access public + * @since v2.0.0 + * @return void + */ + public function admin_enqueue_styles ( $hook = '' ) { + wp_register_style( $this->_token . '-admin', esc_url( $this->assets_url ) . 'admin.css', array(), $this->_version ); + wp_enqueue_style( $this->_token . '-admin' ); + } // End admin_enqueue_styles () + + /** + * Loads the translation file. + * + * @since v1.0.0 + */ + function i18n() { + + /* Load the translation of the plugin. */ + load_plugin_textdomain( 'so-clean-up-wp-seo', false, basename( dirname( __FILE__ ) ) . '/languages/' ); + } + + /** + * Main CUWS Instance + * + * Ensures only one instance of CUWS is loaded or can be loaded. + * + * @since v2.0.0 + * @static + * @see CUWS() + * @return Main CUWS instance + */ + public static function instance ( $file = '', $version = '2.0.0' ) { + if ( is_null( self::$_instance ) ) { + self::$_instance = new self( $file, $version ); + } + return self::$_instance; + } // End instance () + + /** + * Cloning is forbidden. + * + * @since v2.0.0 + */ + public function __clone () { + _doing_it_wrong( __FUNCTION__, __( 'No Access' ), $this->_version ); + } // End __clone () + + /** + * Unserializing instances of this class is forbidden. + * + * @since v2.0.0 + */ + public function __wakeup () { + _doing_it_wrong( __FUNCTION__, __( 'No Access' ), $this->_version ); + } // End __wakeup () + + /** + * Installation. Runs on activation. + * @access public + * @since v2.0.0 + * @return void + */ + public function install () { + $this->_log_version_number(); + $this->_set_defaults(); + } // End install () + + /** + * Log the plugin version number. + * @access public + * @since v2.0.0 + * @return void + */ + private function _log_version_number () { + update_option( $this->_token . '_version', $this->_version ); + } // End _log_version_number () + + private function _set_defaults() { + update_option( 'cuws_hide_ads', 'on', true ); + update_option( 'cuws_hide_about_nag', 'on', true ); + update_option( 'cuws_hide_recalc_nag', 'on', true ); + update_option( 'cuws_hide_tagline_nag', 'on', true ); + update_option( 'cuws_hide_robots_nag', 'on', true ); + update_option( 'cuws_hide_gsc_nag', 'on', true ); + update_option( 'cuws_hide_imgwarning_nag', 'on', true ); + update_option( 'cuws_hide_addkw_button', 'on', true ); + update_option( 'cuws_hide_trafficlight', 'on', true ); + update_option( 'cuws_hide_wpseoanalysis', 'on', true ); + update_option( 'cuws_hide_admin_columns', array( 'seoscore', 'title', 'metadescr' ), true ); + update_option( 'cuws_remove_adminbar', 'seo', true ); + update_option( 'cuws_remove_dbwidget', 'on', true ); + } // End _set_defaults () + +} diff --git a/index.php b/index.php new file mode 100644 index 0000000..c051246 --- /dev/null +++ b/index.php @@ -0,0 +1,3 @@ +required)." +msgstr "" +"De Yoast SEO plugin voegt 4 admin kolommen toe aan het bewerk Bericht/Pagina " +"scherm, kies hier welke u wilt verbergen (meerdere selecteren is mogelijk, 1 " +"box aanvinken is verplicht)." + +#: includes/class-so-clean-up-wp-seo-settings.php:181 +msgid "Hide all columns" +msgstr "Verberg alle kolommen" + +#: includes/class-so-clean-up-wp-seo-settings.php:181 +msgid "Hide SEO score column" +msgstr "Verberg de SEO-score kolom" + +#: includes/class-so-clean-up-wp-seo-settings.php:181 +msgid "Hide title column" +msgstr "Verberg de titel kolom" + +#: includes/class-so-clean-up-wp-seo-settings.php:181 +msgid "Hide meta description column" +msgstr "Verberg de meta omschrijving kolom" + +#: includes/class-so-clean-up-wp-seo-settings.php:181 +msgid "Hide focus keyword column" +msgstr "Verberg de hoofdzoekwoord kolom" + +#: includes/class-so-clean-up-wp-seo-settings.php:181 +msgid "Show all columns" +msgstr "Toon alle kolommen" + +#: includes/class-so-clean-up-wp-seo-settings.php:186 +msgid "SEO menu admin bar" +msgstr "SEO menu admin bar" + +#: includes/class-so-clean-up-wp-seo-settings.php:187 +msgid "" +"The adminbar contains an SEO menu with 2 options; select here what to remove." +msgstr "" +"De adminbar bevat een SEO menu met 2 opties; kies hier wat te verwijderen." + +#: includes/class-so-clean-up-wp-seo-settings.php:189 +msgid "SEO Settings" +msgstr "SEO-Instellingen" + +#: includes/class-so-clean-up-wp-seo-settings.php:189 +msgid "Keyword Research" +msgstr "Zoekwoordenonderzoek" + +#: includes/class-so-clean-up-wp-seo-settings.php:189 +msgid "Both" +msgstr "Beiden" + +#: includes/class-so-clean-up-wp-seo-settings.php:189 +msgid "None" +msgstr "Geen" + +#: includes/class-so-clean-up-wp-seo-settings.php:194 +msgid "Dashboard widget" +msgstr "Dashboard widget" + +#: includes/class-so-clean-up-wp-seo-settings.php:195 +msgid "Remove the Yoast SEO widget from the WordPress Dashboard." +msgstr "Verwijder de Yoast SEO widget van het Wordpress Dashboard." + +#: includes/class-so-clean-up-wp-seo-settings.php:269 +msgid "" +"With version 2.0.0 we have added this settings page, so you can adjust " +"things here and there to your liking." +msgstr "" +"Met de komst van de versie 2.0.0 hebben we de instellingen pagina " +"toegevoegd, zodat je hier en daar dingen kan aanpassen." + +#: includes/class-so-clean-up-wp-seo-settings.php:271 +msgid "" +"The default setting, when you activate the plugin, is that almost all boxes " +"have been ticked; why else would you install our plugin?" +msgstr "" +"De standaard instelling, wanneer je de plugin activeert, is dat bijna alle " +"vakjes zijn aangevinkt; waarom installeer je deze plugin anders?" + +#: includes/class-so-clean-up-wp-seo-settings.php:273 +msgid "" +"The intro tour pop up balloon is set to \"seen\" by default and there is no " +"setting to show it as you can find it in the Yoast SEO Settings." +msgstr "" +"Het pop-up ballonnetje voor de introductie toer wordt standaard op “gezien” " +"gezet en er is geen aparte instelling voor om het te tonen, omdat je die al " +"kan vinden in de Yoast SEO Instellingen." + +#: includes/class-so-clean-up-wp-seo-settings.php:275 +msgid "" +"If you ever want to remove the SO Hide SEO Bloat plugin, then you can rest " +"assured that it cleans up after itself:" +msgstr "" +"Wanneer je ooit de SO Hide SEO Bloat plugin wilt verwijderen, wees er dan " +"gerust op dat de plugin zichzelf schoonmaakt." + +#: includes/class-so-clean-up-wp-seo-settings.php:275 +msgid "upon deletion it removes all options automatically." +msgstr "" +"na verwijdering (van de plugin), verwijdert het automatisch alle opties." + +#: includes/class-so-clean-up-wp-seo-settings.php:287 +msgid "Save Settings" +msgstr "Bewaar Instellingen" + +#: includes/class-so-clean-up-wp-seo-settings.php:294 +#, php-format +msgid "" +"If you have found this plugin at all useful, please give it a favourable " +"rating in the WordPress Plugin " +"Repository." +msgstr "" +"Wanneer je deze plugin handig vindt, geef het dan een gunstige waardering in " +"de Wordpress " +"Plugin Repository." + +#: includes/class-so-clean-up-wp-seo-settings.php:297 +#, php-format +msgid "" +"You can also help a great deal by translating the plugin into your own " +"language." +msgstr "" +"Je kan ook enorm helpen door de plugin te vertalen in je eigen taal." + +#: includes/class-so-clean-up-wp-seo-settings.php:300 +#, php-format +msgid "" +"If you have an issue with this plugin or want to leave a feature request, " +"please note that we give support via Github only." +msgstr "" +"Wanneer je een probleem hebt met deze plugin of een feature request wilt " +"doen, houd er dan rekening mee dat we de plugin alleen ondersteunen via " +"Github." + +#: includes/class-so-clean-up-wp-seo-settings.php:304 +msgid "About the Author" +msgstr "Over de auteur" + +#: includes/class-so-clean-up-wp-seo-settings.php:312 +#, php-format +msgid "" +"Hi, my name is Piet Bos, I hope you like this plugin! Please check out any " +"of my other plugins on SO WP Plugins. You can find out more information about me via the following links:" +msgstr "" +"Hoi, mijn naam is Piet Bos, hopelijk vind je dit een handige plugin! Kijk " +"ook eens naar mijn andere plugins via SO " +"WP Plugins. Je kan meer informatie over mij vinden via de onderstaande " +"links:" + +#: includes/class-so-clean-up-wp-seo-settings.php:317 +msgid "Senlin Online" +msgstr "Senlin Online" + +#: includes/class-so-clean-up-wp-seo-settings.php:318 +msgid "WP Tips" +msgstr "WP Tips" + +#: includes/class-so-clean-up-wp-seo-settings.php:319 +msgid "LinkedIn" +msgstr "LinkedIn" + +#: includes/class-so-clean-up-wp-seo-settings.php:320 +msgid "Github" +msgstr "Github" + +#: includes/class-so-clean-up-wp-seo-settings.php:321 +msgid "WordPress.org Profile" +msgstr "WordPress.org Profiel" + +#: includes/class-so-clean-up-wp-seo-settings.php:356 +#: includes/class-so-clean-up-wp-seo-settings.php:365 +msgid "Access denied" +msgstr "Toegang geweigerd" + +#: includes/class-so-clean-up-wp-seo.php:331 +#: includes/class-so-clean-up-wp-seo.php:340 +msgid "No Access" +msgstr "Geen Toegang" + +#. Plugin Name of the plugin/theme +msgid "SO Hide SEO Bloat" +msgstr "SO Hide SEO Bloat" + +#. Plugin URI of the plugin/theme +msgid "http://so-wp.com/plugin/so-clean-up-wp-seo/" +msgstr "http://so-wp.com/plugin/so-clean-up-wp-seo/" + +#. Description of the plugin/theme +msgid "" +"Hide most of the bloat that the Yoast SEO plugin adds to your WordPress " +"Dashboard" +msgstr "" +"Verberg het grootste deel van de bloot dat de Yoast SEO plugin toevoegt aan " +"je Wordpress Dashboard" + +#. Author of the plugin/theme +msgid "SO WP" +msgstr "SO WP" + +#. Author URI of the plugin/theme +msgid "http://so-wp.com/plugins/" +msgstr "http://so-wp.com/plugins/" diff --git a/languages/so-clean-up-wp-seo.pot b/languages/so-clean-up-wp-seo.pot new file mode 100644 index 0000000..0ada11d --- /dev/null +++ b/languages/so-clean-up-wp-seo.pot @@ -0,0 +1,327 @@ +#, fuzzy +msgid "" +msgstr "" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +"Project-Id-Version: SO Hide SEO Bloat\n" +"POT-Creation-Date: 2016-02-04 16:15+0800\n" +"PO-Revision-Date: 2016-02-04 14:55+0800\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.7\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-WPHeader: so-clean-up-wp-seo.php\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" +"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" +"_nx_noop:3c,1,2;__ngettext_noop:1,2\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPathExcluded-0: *.js\n" + +#: includes/class-so-clean-up-wp-seo-settings.php:75 +#: includes/class-so-clean-up-wp-seo-settings.php:267 +msgid "SO Hide SEO Bloat Settings" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:76 +msgid "Hide Bloat" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:90 +msgid "Settings" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:103 +msgid "Without further ado: Hide the bloat" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:108 +msgid "Sidebar Ads" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:109 +msgid "" +"Hide the cartoon-style sidebar ads on almost all settings pages of the Yoast " +"SEO plugin." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:115 +msgid "About nag" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:116 +msgid "Hide about nag that shows on every update of the plugin." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:122 +msgid "Recalculate nag" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:123 +msgid "" +"Hide recalculate nag that alerts user that SEO score algorithm has been " +"updated." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:129 +msgid "Tagline nag" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:130 +msgid "" +"Hide tagline nag that shows when your site uses the default WordPress " +"tagline." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:136 +msgid "Robots nag" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:137 +msgid "" +"Hide robots nag that shows when your site is blocking access to robots, for " +"example on dev and staging sites." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:137 +msgid "" +" It also hides the warning in the advanced tab of Yoast SEO UI in edit Post/" +"Page screen." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:143 +msgid "GSC nag" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:144 +msgid "" +"Hide Google Search Console nag that warns about not missing any crawl errors " +"by connecting the Yoast SEO plugin to it." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:150 +msgid "Featured image nag" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:151 +msgid "" +"Hide image warning nag that shows in edit Post/Page screen when featured " +"image is smaller than 200x200 pixels." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:157 +msgid "Add keyword button" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:158 +msgid "" +"Hide add keyword button that shows in edit Post/Page and only serves to show " +"an ad for the premium version." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:164 +msgid "Trafficlight" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:165 +msgid "Hide seoscore traffic light in publish/update box on edit Post/Page." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:171 +msgid "Content analysis" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:172 +msgid "" +"Hide content analysis that adds colored balls to the edit Post/Page screens" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:178 +msgid "Admin columns" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:179 +msgid "" +"The Yoast SEO plugin adds 4 admin columns on the Posts/Pages screen, choose " +"here which ones to hide (possible to select multiple, ticking minimum one " +"box is required)." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:181 +msgid "Hide all columns" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:181 +msgid "Hide SEO score column" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:181 +msgid "Hide title column" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:181 +msgid "Hide meta description column" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:181 +msgid "Hide focus keyword column" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:181 +msgid "Show all columns" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:186 +msgid "SEO menu admin bar" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:187 +msgid "" +"The adminbar contains an SEO menu with 2 options; select here what to remove." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:189 +msgid "SEO Settings" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:189 +msgid "Keyword Research" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:189 +msgid "Both" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:189 +msgid "None" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:194 +msgid "Dashboard widget" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:195 +msgid "Remove the Yoast SEO widget from the WordPress Dashboard." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:269 +msgid "" +"With version 2.0.0 we have added this settings page, so you can adjust " +"things here and there to your liking." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:271 +msgid "" +"The default setting, when you activate the plugin, is that almost all boxes " +"have been ticked; why else would you install our plugin?" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:273 +msgid "" +"The intro tour pop up balloon is set to \"seen\" by default and there is no " +"setting to show it as you can find it in the Yoast SEO Settings." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:275 +msgid "" +"If you ever want to remove the SO Hide SEO Bloat plugin, then you can rest " +"assured that it cleans up after itself:" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:275 +msgid "upon deletion it removes all options automatically." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:287 +msgid "Save Settings" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:294 +#, php-format +msgid "" +"If you have found this plugin at all useful, please give it a favourable " +"rating in the WordPress Plugin " +"Repository." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:297 +#, php-format +msgid "" +"You can also help a great deal by translating the plugin into your own " +"language." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:300 +#, php-format +msgid "" +"If you have an issue with this plugin or want to leave a feature request, " +"please note that we give support via Github only." +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:304 +msgid "About the Author" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:312 +#, php-format +msgid "" +"Hi, my name is Piet Bos, I hope you like this plugin! Please check out any " +"of my other plugins on SO WP Plugins. You can find out more information about me via the following links:" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:317 +msgid "Senlin Online" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:318 +msgid "WP Tips" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:319 +msgid "LinkedIn" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:320 +msgid "Github" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:321 +msgid "WordPress.org Profile" +msgstr "" + +#: includes/class-so-clean-up-wp-seo-settings.php:356 +#: includes/class-so-clean-up-wp-seo-settings.php:365 +msgid "Access denied" +msgstr "" + +#: includes/class-so-clean-up-wp-seo.php:331 +#: includes/class-so-clean-up-wp-seo.php:340 +msgid "No Access" +msgstr "" + +#. Plugin Name of the plugin/theme +msgid "SO Hide SEO Bloat" +msgstr "" + +#. Plugin URI of the plugin/theme +msgid "http://so-wp.com/plugin/so-clean-up-wp-seo/" +msgstr "" + +#. Description of the plugin/theme +msgid "" +"Hide most of the bloat that the Yoast SEO plugin adds to your WordPress " +"Dashboard" +msgstr "" + +#. Author of the plugin/theme +msgid "SO WP" +msgstr "" + +#. Author URI of the plugin/theme +msgid "http://so-wp.com/plugins/" +msgstr "" diff --git a/readme.txt b/readme.txt index df5e305..e2ca9eb 100644 --- a/readme.txt +++ b/readme.txt @@ -1,190 +1,241 @@ -=== SO Hide SEO Bloat === -Contributors: senlin -Donate link: http://so-wp.com/donations -Tags: clean up, disable, remove, sidebar ads, cartoon, ads, keyword column, description column, nags, tour, traffic light -Requires at least: 4.0 -Tested up to: 4.4.1 -Stable tag: 1.8.0 -License: GPLv3 or later -License URI: http://www.gnu.org/licenses/gpl-3.0.html - -Hide most of the bloat that the Yoast SEO plugin adds to your WordPress Dashboard - -== Description == - -Almost anyone that uses Yoast SEO by Team Yoast will agree that it is a great SEO plugin, but the developers are adding more and more unwanted things to the WordPress Dashboard. - -The purpose of the SO Hide SEO Bloat plugin is to clean up all those unwanted things. - -As per the current release, the plugin removes and/or disables the following unwanted items: - -* removes sidebar ads on all Yoast SEO settings pages -* removes the Yoast SEO settings from the Admin Bar -* removes updated nag -* sets plugin-intro-tour user_meta to true (means done) -* removes the keyword/description columns on edit Posts/Pages pages -* removes the overview dashboard widget that was introduced in version 2.3 of the Yoast SEO plugin -* remove GSC (Google Search Console) nag that was introduced in Yoast SEO 2.3.3 -* remove yst_opengraph_image_warning nag that was added to Yoast SEO 2.1, but we never noticed it before. In the changelog it has been described as "validation error", which of course is nonsense, because the world is larger than social media. The nag manifests itself by placing thick red borders around your Featured Image as well as a red-bordered warning message when your Featured Image is smaller than 200x200 pixels. -* remove + icon from new Edit screen UI as it serves only to show an ad for the premium version of Yoast SEO -* remove wpseo-score traffic light next to Move to trash on Edit Post/Page screen -* remove SEO score algorithm recalculate nag - -We support this plugin exclusively through [Github](https://github.com/senlin/so-clean-up-wp-seo/issues). Therefore, if you have any questions, need help and/or want to make a feature request, please open an issue over at Github. You can also browse through open and closed issues to find what you are looking for and perhaps even help others. - -**PLEASE DO NOT POST YOUR ISSUES VIA THE WORDPRESS FORUMS** - -Thanks for your understanding and cooperation. - -If you like the SO Hide SEO Bloat plugin, please consider leaving a [review](https://wordpress.org/support/view/plugin-reviews/so-clean-up-wp-seo?rate=5#postform). -Alternatively you are welcome to make a [donation](http://so-wp.com/donations/). Thanks! - - -== Installation == - -= WordPress = - -Search for "SO Hide SEO Bloat" and install with the **Plugins > Add New** back-end page. - - … OR … - -Follow these steps: - - 1. Download zip file. - - 2. Upload the zip file via the Plugins > Add New > Upload page … OR … unpack and upload with your favourite FTP client to the /plugins/ folder. - - 3. Activate the plugin on the Plugins page. - -Done! - - -== Frequently Asked Questions == - -= Where is the settings page? = - -For [v2.0.0](https://github.com/senlin/so-clean-up-wp-seo/milestones/version%202.0.0) we have planned a complete rewrite of the SO Hide SEO Bloat plugin which includes a Settings page to enable the user to clean up individual items, instead of the current blanket rule. - -For now however you can stop looking, there is none yet. Activate the plugin to clean up your WordPress dashboard. - -= Can I use SO Hide SEO Bloat on Multisite? = - -You can, but until further notice you need to activate the plugin on a per-site basis ([see this Github issue](https://github.com/senlin/so-clean-up-wp-seo/issues/4)) - -= You have only a handful ratings/reviews; why should I install this plugin? = - -Yes, you are correct and many people say that it is important for a plugin to have a good rating. -Fortunately there are already quite a few people that have downloaded the plugin, installed it, activated it and keep it activated, as you can see from the Active Installs in the sidebar. There must be something good that the plugin does then, right? - -So if you decide to install it and you're happy about the plugin, then please help the next person (and me) by [leaving a 5-star review](https://wordpress.org/support/view/plugin-reviews/so-clean-up-wp-seo?rate=5#postform). - -Thank you very much! - -= I have an issue with this plugin, where can I get support? = - -Please open an issue on [Github](https://github.com/senlin/so-clean-up-wp-seo/issues) - -== Screenshots == - -1. before/after sidebar ads -2. before/after intro tour -3. before/after admin bar -4. before/after yst_opengraph_image_warning nag -5. before/after wpseo-score trafficlight in Publish metabox (Yoast SEO 3.0+) - -== Changelog == - -= 1.8.0 (2016.01.28) = - -* name change to avoid "Yoast" trademark violation - -= 1.7.5 (2015.12.26) = - -* remove SEO score algorithm recalculate nag - -= 1.7.4 (2015.11.19) = - -* remove wpseo-score traffic light next to Move to trash on Edit Post/Page screen - -= 1.7.3 (2015.11.19) = - -* version 3.0 of Yoast SEO has introduced a cool new UI for the Edit screens. This also shows a + icon and when clicking that, you'll have a big fat ad in your face. This is a premium feature and the only function of the + icon therefore is to irritate you with an ad. We have therefore made it invisible. -* tested up to WP 4.4 -* adjust readme files - -= 1.7.2 (2015.09.30) = - -* [BUG FIX] fix bug that slipped in (forgot to remove) 1.7.1 release, thanks for the [report](https://wordpress.org/support/topic/171-update-problem) [@stansbury](https://wordpress.org/support/profile/stansbury) - -= 1.7.1 (2015.09.30) = - -* remove function that checks whether Yoast SEO has been installed; reason is to simplify things a bit. -* adjust readme files - -= 1.7 (2015.09.16) = - -* remove yst_opengraph_image_warning nag that was added to Yoast SEO 2.1, but we never noticed it before. In the changelog it has been described as "validation error", which of course is nonsense, because the world is larger than social media. The nag manifests itself by placing thick red borders around your Featured Image as well as a red-bordered warning message when your Featured Image is smaller than 200x200 pixels. -* change function name -* add screenshot of before/after yst_opengraph_image_warning nag -* adjust readme files - -= 1.6 (2015.08.07) = - -* remove GSC (Google Search Console) nag that was introduced in Yoast SEO 2.3.3 - -= 1.5 (2015.07.22) = - -* remove overview dashboard widget that was introduced in Yoast SEO 2.3 -* change plugin name to reflect the name-change of the plugin it cleans up for ([WordPress SEO became Yoast SEO](https://yoast.com/yoast-seo-2-3/)) - -= 1.4 (2015.06.17) = - -* remove updated nag (introduced with Yoast SEO version 2.2.1) -* remove previous so_cuws_remove_about_tour() function that has become redundant from Yoast SEO 2.2.1 onwards; replaced with with so_cuws_ignore_tour() function - -= 1.3.2.1 (2015.05.15) = - -* Clean up white space - -= 1.3.2 (2015.05.14) = - -* Fix issue that WP SEO columns were still showing on Edit Posts/Pages pages - -= 1.3.1 (2015.05.01) = - -* Added styling to remove Tour Intro and button to start tour -* Added screenshots -* Removed redundant dashboard widget function - -= 1.3 (2015.04.30) = - -* Added function to remove Yoast SEO Settings from Admin Bar, inspired by comment of [Lee Rickler](https://profiles.wordpress.org/lee-rickler/) in discussion on [Google+](https://plus.google.com/u/0/+PietBos/posts/AUfs8ZdwLP3) -* put code actions/filters in order - -= 1.2 (2015.04.30) = - -* Release on wordpress.org Repo - -= 1.1 (2015.04.27) = - -* Release version -* banner image (in assets folder) by [Leigh Kendell](https://unsplash.com/leighkendell) - -= 1.0 (2015.04.24) = - -* Initial plugin [code snippet](https://github.com/senlin/Code-Snippets/blob/0ae24e6fc069efe26e52007c05c7375012ee688a/Functions/Admin-Dashboard/remove-yoast-crap.php) - -== Upgrade Notice == - -= 1.8.0 = - -* name change to avoid "Yoast" trademark violation - -= 1.5 = - -* We have changed the name of our plugin to reflect the name change of the plugin it cleans up after - -= 1.4 = - -* Version 2.2.1 of the Yoast SEO plugin changes a lot of things around. The automatic redirect to the plugin's About page is no longer, so we have removed the function that disables it. The new version introduced an updated nag that doesn't let itself be dismissed easily, so we have simply hidden it altogether. The super irritating balloon to follow the intro tour was back again too, we have countered that with a functiobn that sets the user_meta of that intro tour to true, which means "seen". - +=== SO Hide SEO Bloat === +Contributors: senlin +Donate link: http://so-wp.com/donations +Tags: clean up, disable, remove, sidebar ads, cartoon, ads, keyword column, description column, nags, tour, traffic light +Requires at least: 4.0 +Tested up to: 4.4.2 +Stable tag: 2.0.0 +License: GPL-3.0+ +License URI: http://www.gnu.org/licenses/gpl-3.0.txt + +Hide most of the bloat that the Yoast SEO plugin adds to your WordPress Dashboard, now with Settings Page! + +== Description == + +Almost anyone that uses Yoast SEO by Team Yoast will agree that it is a great SEO plugin, but the developers are adding more and more unwanted things to the WordPress Dashboard. + +The purpose of the SO Hide SEO Bloat plugin is to clean up all those unwanted things. + +Since v2.0.0 (released on February 4, 2016) we have a Settings page! + +The purpose of the settings page is that you can fine-tune what is hidden or removed to your liking. By default most of the bloat that the Yoast SEO plugin generates is hidden or removed, just like before when there were no settings yet. + +It is a good idea to have a look at the Settings page if only to see what you can fine-tune. The link to the page has been added to the Yoast SEO menu and of course there is also a link to it from the Plugins page. + +The default settings of the current release are as follows: + +* hide the cartoon-style sidebar ads on almost all settings pages of the Yoast SEO plugin +* hide about nag that shows on every update of the plugin +* hide recalculate nag that alerts user that SEO score algorithm has been updated +* hide tagline nag that shows when your site uses the default WordPress tagline +* hide robots nag that shows when your site is blocking access to robots, for example on dev and staging sites; it also hides the warning in the advanced tab of Yoast SEO UI in edit Post/Page screen +* hide Google Search Console nag that warns about not missing any crawl errors by connecting the Yoast SEO plugin to it +* hide image warning nag that shows in edit Post/Page screen when featured image is smaller than 200x200 pixels +* hide add keyword button that shows in edit Post/Page and only serves to show an ad for the premium version +* hide seoscore traffic light in publish/update box on edit Post/Page +* hide the SEO Score, Title and Meta description admin columns on the Posts/Pages screen; Focus keyword column can be hidden too +* remove SEO Settings sub menu of SEO menu in admin bar; additional option is to remove the Keyword Research sub menu +* remove the Yoast SEO widget from the WordPress Dashboard +* the tour is set to seen (there is no setting for this as the tour can be seen at any moment by going to the General settings of the Yoast SEO plugin) + +We support this plugin exclusively through [Github](https://github.com/senlin/so-clean-up-wp-seo/issues). Therefore, if you have any questions, need help and/or want to make a feature request, please open an issue over at Github. You can also browse through open and closed issues to find what you are looking for and perhaps even help others. + +**PLEASE DO NOT POST YOUR ISSUES VIA THE WORDPRESS FORUMS** + +Thanks for your understanding and cooperation. + +If you like the SO Hide SEO Bloat plugin, please consider leaving a [review](https://wordpress.org/support/view/plugin-reviews/so-clean-up-wp-seo?rate=5#postform). You can also help a great deal by [translating the plugin](https://translate.wordpress.org/projects/wp-plugins/so-clean-up-wp-seo) into your own language. +Alternatively you are welcome to make a [donation](http://so-wp.com/donations/). Thanks! + + +== Installation == + += WordPress = + +Search for "SO Hide SEO Bloat" and install with the **Plugins > Add New** back-end page. + + … OR … + +Follow these steps: + + 1. Download zip file. + + 2. Upload the zip file via the Plugins > Add New > Upload page … OR … unpack and upload with your favourite FTP client to the /plugins/ folder. + + 3. Activate the plugin on the Plugins page. + + 4. Visit the Settings page. + +Done! + + +== Frequently Asked Questions == + += Where is the settings page? = + +The link to the page has been added to the Yoast SEO menu and of course there is also a link to it from the Plugins page. + += Can I use SO Hide SEO Bloat on Multisite? = + +You can, but until further notice you need to activate the plugin on a per-site basis ([see this Github issue](https://github.com/senlin/so-clean-up-wp-seo/issues/4)) + += The name of the plugin is confusing, it hides bloat of which SEO plugin? = + +Yes, you are right, the name is a bit vague (see Changelog v1.8.0). On the other hand there is only one SEO plugin that adds a lot of bloat to the WordPress Dashboard and that is the Yoast SEO plugin. + += The plugin doesn't do anything! = + +Do you have the Yoast SEO plugin installed? It hides the bloat from that plugin only. +If you have and the plugin still doesn't do anything, then please open a [support ticket](https://github.com/senlin/so-clean-up-wp-seo/issues). + += With a settings page comes additional entries in the database; what happens on uninstall? = + +Great question! +Indeed the SO Hide SEO Bloat plugin writes its settings to the database. The included `uninstall.php` file removes all the plugin-related entries from the database once you remove the plugin via the WordPress Plugins page (not on deactivation). + += You have only a handful ratings/reviews; why should I install this plugin? = + +Yes, you are correct and many people say that it is important for a plugin to have a good rating. +Fortunately there are already quite a few people that have downloaded the plugin, installed it, activated it and keep it activated, as you can see from the Active Installs in the sidebar. There must be something good that the plugin does then, right? + +So if you decide to install it and you're happy about the plugin, then please help the next person (and me) by [leaving a 5-star review](https://wordpress.org/support/view/plugin-reviews/so-clean-up-wp-seo?rate=5#postform). + +Thank you very much! + += I have an issue with this plugin, where can I get support? = + +Please open an issue on [Github](https://github.com/senlin/so-clean-up-wp-seo/issues) + +== Screenshots == + +1. settings page with default settings +2. typical nags that are hidden with the plugin activated +3. bloat on edit Post/Page screen that is hidden with the plugin activated +4. SEO menu in admin bar that is partly hidden with the plugin activated +5. dashboard widget that is removed with the plugin activated + +== Changelog == + += 2.0.0 = + +* release date 2016.02.04 +* complete rewrite of the plugin +* new Settings page to fine tune what is hidden/removed to your liking +* new screenshots +* tested up to WP 4.4.2 + += 1.8.0 = + +* release date 2016.01.28 +* name change to avoid "Yoast" trademark violation + += 1.7.5 = + +* release date 2015.12.26 +* remove SEO score algorithm recalculate nag + += 1.7.4 = + +* release date 2015.11.19 +* remove wpseo-score traffic light next to Move to trash on Edit Post/Page screen + += 1.7.3 = + +* release date 2015.11.19 +* version 3.0 of Yoast SEO has introduced a cool new UI for the Edit screens. This also shows a + icon and when clicking that, you'll have a big fat ad in your face. This is a premium feature and the only function of the + icon therefore is to irritate you with an ad. We have therefore made it invisible. +* tested up to WP 4.4 +* adjust readme files + += 1.7.2 = + +* release date 2015.09.30 +* [BUG FIX] fix bug that slipped in (forgot to remove) 1.7.1 release, thanks for the [report](https://wordpress.org/support/topic/171-update-problem) [@stansbury](https://wordpress.org/support/profile/stansbury) + += 1.7.1 = + +* release date 2015.09.30 +* remove function that checks whether Yoast SEO has been installed; reason is to simplify things a bit. +* adjust readme files + += 1.7.0 = + +* release date 2015.09.16 +* remove yst_opengraph_image_warning nag that was added to Yoast SEO 2.1, but we never noticed it before. In the changelog it has been described as "validation error", which of course is nonsense, because the world is larger than social media. The nag manifests itself by placing thick red borders around your Featured Image as well as a red-bordered warning message when your Featured Image is smaller than 200x200 pixels. +* change function name +* add screenshot of before/after yst_opengraph_image_warning nag +* adjust readme files + += 1.6.0 = + +* release date 2015.08.07 +* remove GSC (Google Search Console) nag that was introduced in Yoast SEO 2.3.3 + += 1.5.0 = + +* release date 2015.07.22 +* remove overview dashboard widget that was introduced in Yoast SEO 2.3 +* change plugin name to reflect the name-change of the plugin it cleans up for ([WordPress SEO became Yoast SEO](https://yoast.com/yoast-seo-2-3/)) + += 1.4.0 = + +* release date 2015.06.17 +* remove updated nag (introduced with Yoast SEO version 2.2.1) +* remove previous so_cuws_remove_about_tour() function that has become redundant from Yoast SEO 2.2.1 onwards; replaced with with so_cuws_ignore_tour() function + += 1.3.2.1 = + +* release date 2015.05.15 +* Clean up white space + += 1.3.2 = + +* release date 2015.05.14 +* Fix issue that WP SEO columns were still showing on Edit Posts/Pages pages + += 1.3.1 = + +* release date 2015.05.01 +* Added styling to remove Tour Intro and button to start tour +* Added screenshots +* Removed redundant dashboard widget function + += 1.3.0 = + +* release date 2015.04.30 +* Added function to remove Yoast SEO Settings from Admin Bar, inspired by comment of [Lee Rickler](https://profiles.wordpress.org/lee-rickler/) in discussion on [Google+](https://plus.google.com/u/0/+PietBos/posts/AUfs8ZdwLP3) +* put code actions/filters in order + += 1.2.0 = + +* release date 2015.04.30 +* Release on wordpress.org Repo + += 1.1.0 = + +* release date 2015.04.27 +* Release version +* banner image (in assets folder) by [Leigh Kendell](https://unsplash.com/leighkendell) + += 1.0.0 = + +* release date 2015.04.24 +* Initial plugin [code snippet](https://github.com/senlin/Code-Snippets/blob/0ae24e6fc069efe26e52007c05c7375012ee688a/Functions/Admin-Dashboard/remove-yoast-crap.php) + +== Upgrade Notice == + += 2.0.0 = + +* Version 2.0.0 is a complete rewrite of the SO Hide SEO Bloat plugin. Please visit the Settings page after you have updated to this version, so you can fine tune what is hidden/removed. + += 1.8.0 = + +* name change to avoid "Yoast" trademark violation + += 1.5.0 = + +* We have changed the name of our plugin to reflect the name change of the plugin it cleans up after + += 1.4.0 = + +* Version 2.2.1 of the Yoast SEO plugin changes a lot of things around. The automatic redirect to the plugin's About page is no longer, so we have removed the function that disables it. The new version introduced an updated nag that doesn't let itself be dismissed easily, so we have simply hidden it altogether. The super irritating balloon to follow the intro tour was back again too, we have countered that with a functiobn that sets the user_meta of that intro tour to true, which means "seen". + diff --git a/so-clean-up-wp-seo.php b/so-clean-up-wp-seo.php index 8af5a06..aa5f2a1 100644 --- a/so-clean-up-wp-seo.php +++ b/so-clean-up-wp-seo.php @@ -5,126 +5,35 @@ * Description: Hide most of the bloat that the Yoast SEO plugin adds to your WordPress Dashboard * Author: SO WP * Author URI: http://so-wp.com/plugins/ - * Version: 1.8.0 - * License: GPL3+ + * Version: 2.0.0 + * License: GPL-3.0+ + * License URI: http://www.gnu.org/licenses/gpl-3.0.txt */ -/** - * Prevent direct access to files - * - * @since 1.0 - */ -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly - -/** - * Version check; any WP version under 4.0 is not supported (if only to "force" users to stay up to date) - * - * adapted from example by Thomas Scholz (@toscho) http://wordpress.stackexchange.com/a/95183/2015, Version: 2013.03.31, Licence: MIT (http://opensource.org/licenses/MIT) - * - * @since 1.1 - */ - -//Only do this when on the Plugins page. -if ( ! empty ( $GLOBALS['pagenow'] ) && 'plugins.php' === $GLOBALS['pagenow'] ) - - /* so_cuws_ prefix is derived from [so] [c]lean [u]p [w]p [s]eo. */ - add_action( 'admin_notices', 'so_cuws_check_admin_notices', 0 ); - -function so_cuws_min_wp_version() { - global $wp_version; - $require_wp = '4.0'; - $update_url = get_admin_url( null, 'update-core.php' ); - - $errors = array(); - - if ( version_compare( $wp_version, $require_wp, '<' ) ) - - $errors[] = "You have WordPress version $wp_version installed, but this plugin requires at least WordPress $require_wp. Please update your WordPress version."; - - return $errors; -} - -function so_cuws_check_admin_notices() { - - $errors = so_cuws_min_wp_version(); - - if ( empty ( $errors ) ) - return; - - // Suppress "Plugin activated" notice. - unset( $_GET['activate'] ); +// don't load the plugin file directly +if ( ! defined( 'ABSPATH' ) ) exit; - // this plugin's name - $name = get_file_data( __FILE__, array ( 'Plugin Name' ), 'plugin' ); +// Load plugin class files +require_once( 'includes/class-so-clean-up-wp-seo.php' ); +require_once( 'includes/class-so-clean-up-wp-seo-settings.php' ); - printf( __( '

%1$s

%2$s has been deactivated.

', 'so-clean-up-wp-seo' ), - join( '

', $errors ), - $name[0] - ); - deactivate_plugins( plugin_basename( __FILE__ ) ); - -} +// Load plugin libraries +require_once( 'admin/class-so-clean-up-wp-seo-admin-api.php' ); /** - * Add the actions and filters that clean up the entire Yoast SEO experience + * Returns the main instance of CUWS to prevent the need to use globals. * - * @since 1.0 - * @modified 1.7.2 (take out the conditional that checked for required plugin) + * @since v2.0.0 + * @return object CUWS */ -add_action( 'admin_head', 'so_cuws_display_none_the_lot' ); - -add_action( 'admin_init', 'so_cuws_ignore_tour', 999 ); // since 1.4 - -add_action( 'admin_bar_menu', 'so_cuws_remove_adminbar_settings', 999 ); // since 1.3 - -add_action( 'wp_dashboard_setup', 'so_cuws_remove_wpseo_dashboard_overview_widget' ); // since 1.5 - -add_filter( 'wpseo_use_page_analysis', '__return_false' ); - -// Remove irritating ads sidebar -// @since 1.3.1 remove tour option/introduction -// @since 1.4 remove updated nag (introduced with Yoast SEO version 2.2.1) -// @since 1.6 remove GSC nag -// @since 1.7 remove yst_opengraph_image_warning nag -// @since 1.7.3 remove + icon from new Edit screen UI as it serves only to show an ad for the premium version of Yoast SEO -// @since 1.7.4 remove wpseo-score traffic light next to Move to trash on Edit Post/Page screen -// @since 1.7.5 remove SEO score algorithm recalculate nag - -/* On a Dutch language site I noticed an irritating box begging for help with translations. The ID of the box is "#i18n_promo_box", the irritating thing about that box is that it says the current language is not yet a translated language, but Dutch obviously is, so this box should not even show on a Dutch site. Once we change this plugin to have settings instead of blanket removal, we can add this in. But for now, let's leave it out. Clicking on the X to remove the box adds the following string to the URL: wp-admin/admin.php?page=wpseo_titles&remove_i18n_promo=1 */ -function so_cuws_display_none_the_lot() { - echo ''; -} +function CUWS () { + $instance = CUWS::instance( __FILE__, '2.0.0' ); -// @since 1.4 replaces previous so_cuws_remove_about_tour() function that has become redundant from Yoast SEO 2.2.1 onwards -function so_cuws_ignore_tour() { - update_user_meta( get_current_user_id(), 'wpseo_ignore_tour', true ); -} - -// Remove Settings submenu in admin bar -// also shows how to remove other menus -// @since 1.3 - inspired by [Lee Rickler](https://profiles.wordpress.org/lee-rickler/) -function so_cuws_remove_adminbar_settings() { - - global $wp_admin_bar; - - // remove the entire menu - //$wp_admin_bar->remove_node( 'wpseo-menu' ); - - // remove Yoast SEO Settings - $wp_admin_bar->remove_node( 'wpseo-settings' ); + if ( is_null( $instance->settings ) ) { + $instance->settings = CUWS_Settings::instance( $instance ); + } - // remove keyword research information - //$wp_admin_bar->remove_node( 'wpseo-kwresearch' ); - -} - -// Version 2.3 of Yoast SEO introduced a dashboard widget -// This function removes this widget -// @since v1.5 -function so_cuws_remove_wpseo_dashboard_overview_widget() { - remove_meta_box( 'wpseo-dashboard-overview', 'dashboard', 'side' ); + return $instance; } - +CUWS(); diff --git a/uninstall.php b/uninstall.php new file mode 100644 index 0000000..fdb62da --- /dev/null +++ b/uninstall.php @@ -0,0 +1,27 @@ +query( "DELETE FROM `{$wpdb->prefix}options` WHERE `option_name` LIKE '%cuws_%'" ); + +