Skip to content

Add gutenberg_can_edit_post filter#8323

Merged
brandonpayton merged 2 commits intoWordPress:masterfrom
wpscholar:add/filter-gutenberg-can-edit-post
Aug 8, 2018
Merged

Add gutenberg_can_edit_post filter#8323
brandonpayton merged 2 commits intoWordPress:masterfrom
wpscholar:add/filter-gutenberg-can-edit-post

Conversation

@wpscholar
Copy link
Copy Markdown
Member

Description

Added gutenberg_can_edit_post filter and additional unit tests.

Fixes #5692

How has this been tested?

Added unit tests to ensure the gutenberg_can_edit_post filter returns true or false depending on the callback.

Types of changes

New feature

Checklist:

  • [✓ ] My code is tested.
  • [✓ ] My code follows the WordPress code style.
  • [✓ ] My code follows the accessibility standards.
  • [✓ ] My code has proper inline documentation.

@wpscholar wpscholar self-assigned this Jul 31, 2018
# Conflicts:
#	lib/register.php
#	phpunit/class-admin-test.php
@designsimply designsimply added [Type] Enhancement A suggestion for improvement. [Feature] Extensibility The ability to extend blocks or the editing experience labels Aug 1, 2018
@wpscholar wpscholar requested a review from pento August 1, 2018 18:42
Copy link
Copy Markdown
Member

@brandonpayton brandonpayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me and is working well when tested locally.

It would be good for the tests to assert regarding the filter arguments, but apparently, that is somewhat awkward to do with PHP. I don't want to hold up this PR for that.

@brandonpayton brandonpayton merged commit e6fb5f6 into WordPress:master Aug 8, 2018
@wpscholar wpscholar added this to the 3.5 milestone Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Extensibility The ability to extend blocks or the editing experience [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants