Skip to content

Conversation

@samikerb
Copy link

@samikerb samikerb commented Jul 29, 2020

Description

The Page attributes still displayed even when the post type does not support it, bad condition was found and corrected.

How has this been tested?

To reproduce
Remove support for page-attributes and it will still displayed

code example to remove support of page-attributes from page post type :

  1. Add this code to your theme's PHP file (functions.php) ⬇️ :

function remove_page_attributes_support() {
remove_post_type_support( 'page', 'page-attributes' );
}
add_action( 'admin_init', 'remove_page_attributes_support' );

  1. Go to Pages
  2. Select a Page
  3. Scroll down

Types of changes

Correct bad condition

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@samikerb samikerb closed this Jul 29, 2020
@samikerb
Copy link
Author

#4662

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant