-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Allow disabling autosave post type support #6035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
swissspidy
wants to merge
12
commits into
WordPress:trunk
from
swissspidy:try/41172-autosave-support
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
de49eea
Allow disabling autosave post type support
swissspidy 1a018b7
Update tests
swissspidy d1ce6e6
Merge branch 'trunk' into try/41172-autosave-support
swissspidy 56336ee
Merge branch 'trunk' into try/41172-autosave-support
swissspidy cb970e4
Merge branch 'trunk' into try/41172-autosave-support
swissspidy 1a6fc1e
Remove `stdClass` workaround
swissspidy 248c8ab
Add some more specific tests
swissspidy 1144152
Merge branch 'trunk' into try/41172-autosave-support
swissspidy 08fd128
Fix ticket annotation
swissspidy 09dd6dd
Add more tests
swissspidy 13d41e2
Merge branch 'trunk' into try/41172-autosave-support
swissspidy 6b593f2
Improve docblock
swissspidy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <?php | ||
| /** | ||
| * Test the wp_font_family and wp_font_face post types. | ||
| * | ||
| * @package WordPress | ||
| * @subpackage Font Library | ||
| * | ||
| * @group fonts | ||
| * @group font-library | ||
| */ | ||
| class Tests_Fonts_Post_Types extends WP_UnitTestCase { | ||
| /** | ||
| * @ticket 41172 | ||
| */ | ||
| public function test_wp_font_family_does_not_support_autosaves() { | ||
| $this->assertFalse( post_type_supports( 'wp_font_family', 'autosave' ) ); | ||
| } | ||
|
|
||
| /** | ||
| * @ticket 41172 | ||
| */ | ||
| public function test_wp_font_face_does_not_support_autosaves() { | ||
| $this->assertFalse( post_type_supports( 'wp_font_face', 'autosave' ) ); | ||
| } | ||
|
|
||
| /** | ||
| * @ticket 41172 | ||
| */ | ||
| public function test_wp_font_family_does_not_have_an_autosave_controller() { | ||
| $post_type_object = get_post_type_object( 'wp_font_family' ); | ||
| $controller = $post_type_object->get_autosave_rest_controller(); | ||
|
|
||
| $this->assertNull( $controller ); | ||
| } | ||
|
|
||
| /** | ||
| * @ticket 41172 | ||
| */ | ||
| public function test_wp_font_face_does_not_have_an_autosave_controller() { | ||
| $post_type_object = get_post_type_object( 'wp_font_face' ); | ||
| $controller = $post_type_object->get_autosave_rest_controller(); | ||
|
|
||
| $this->assertNull( $controller ); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.