Skip to content

Commit

Permalink
hide Post Deletion Premium Ad
Browse files Browse the repository at this point in the history
see #44
  • Loading branch information
senlin committed Sep 20, 2018
1 parent b810119 commit d93a795
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions includes/class-so-clean-up-wp-seo-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,13 @@ private function settings_fields() {
'type' => 'checkbox',
'default' => $options['hide_premium_metabox'],
),
array(
'id' => 'hide_post_deletion_premium_ad',
'label' => __( 'Post/Page/Taxonomy Deletion Premium Ad', 'so-clean-up-wp-seo' ),
'description' => __( 'Hides Post Deletion Premium Ad in edit Post/Page/Taxonomy screens.', 'so-clean-up-wp-seo' ),
'type' => 'checkbox',
'default' => $options['hide_post_deletion_premium_ad'],
),
array(
'id' => 'hide_config_wizard',
'label' => __( 'Hide Configuration Wizard check', 'so-clean-up-wp-seo' ),
Expand Down
6 changes: 6 additions & 0 deletions includes/class-so-clean-up-wp-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ public function so_cuws_hide_visibility_css() {
echo '.wpseo-metabox-buy-premium{display:none;}'; // @since v3.6.0 hide "Go Premium" metabox on Edit Post/Page screens
}

// hide Post/Page/Taxonomy Deletion Premium Ad
if ( ! empty( $this->options['hide_post_deletion_premium_ad'] ) ) {
echo 'body.edit-php .yoast-alert.notice.notice-warning,body.edit-tags-php .yoast-alert.notice.notice-warning{display:none;}'; // @since v3.8.0
}

// Problems/Notification boxes
if ( ! empty( $this->options['hide_dashboard_problems_notifications'] ) ) {
if ( in_array( 'problems', $this->options['hide_dashboard_problems_notifications'] ) ) {
Expand Down Expand Up @@ -430,6 +435,7 @@ public function get_defaults() {
'hide_upsell_admin_block' => 'on',
'hide_premium_submenu' => 'on',
'hide_premium_metabox' => 'on',
'hide_post_deletion_premium_ad' => 'on';
'hide_dashboard_problems_notifications' => array(
'problems',
'notifications'
Expand Down

0 comments on commit d93a795

Please sign in to comment.