Skip to content

Commit

Permalink
hide SEO settings on profile page
Browse files Browse the repository at this point in the history
issue #39, issue #40
  • Loading branch information
Pieter Bos committed Jun 11, 2018
1 parent 0ffb62a commit 184406f
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 @@ -311,6 +311,13 @@ private function settings_fields() {
),
'default' => $options['hide_admincolumns'],
),
array(
'id' => 'hide_seo_settings_profile_page',
'label' => __( 'Profile page', 'so-clean-up-wp-seo' ),
'description' => __( 'Hide SEO Settings on individual profile page.', 'so-clean-up-wp-seo' ),
'type' => 'checkbox',
'default' => $options['hide_seo_settings_profile_page'],
),
array(
'id' => 'remove_primarycatfeat',
'label' => __( 'Primary category', '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 @@ -337,6 +337,11 @@ public function so_cuws_hide_visibility_css() {
}
}

// seo settings profile page
if ( ! empty( $this->options['hide_seo_settings_profile_page'] ) ) {
echo '.profile-php .yoast.yoast-settings{display:none;}'; // @since v3.6.0
}

echo '</style>';
}

Expand Down Expand Up @@ -462,6 +467,7 @@ public function get_defaults() {
'title',
'metadescr'
),
'hide_seo_settings_profile_page' => 'on',
'remove_primarycatfeat' => 'on',
'remove_dbwidget' => 'on',
'remove_adminbar' => 'on',
Expand Down

0 comments on commit 184406f

Please sign in to comment.