File tree Expand file tree Collapse file tree 3 files changed +2
-8
lines changed
src/wp-includes/abilities-api
tests/phpunit/tests/abilities-api Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -36,15 +36,13 @@ class WP_Ability {
3636 * @var array<string, (bool|string)>
3737 */
3838 protected static $ default_annotations = array (
39- // Instructions on how to use the ability.
40- 'instructions ' => '' ,
4139 // If true, the ability does not modify its environment.
4240 'readonly ' => false ,
4341 /*
4442 * If true, the ability may perform destructive updates to its environment.
4543 * If false, the ability performs only additive updates.
4644 */
47- 'destructive ' => true ,
45+ 'destructive ' => false ,
4846 /*
4947 * If true, calling the ability repeatedly with the same arguments will have no additional effect
5048 * on its environment.
Original file line number Diff line number Diff line change @@ -115,7 +115,6 @@ public function test_get_merged_annotations_from_meta() {
115115 array_merge (
116116 self ::$ test_ability_properties ['meta ' ]['annotations ' ],
117117 array (
118- 'instructions ' => '' ,
119118 'idempotent ' => false ,
120119 )
121120 ),
@@ -136,9 +135,8 @@ public function test_get_default_annotations_from_meta() {
136135
137136 $ this ->assertSame (
138137 array (
139- 'instructions ' => '' ,
140138 'readonly ' => false ,
141- 'destructive ' => true ,
139+ 'destructive ' => false ,
142140 'idempotent ' => false ,
143141 ),
144142 $ ability ->get_meta_item ( 'annotations ' )
@@ -152,7 +150,6 @@ public function test_get_default_annotations_from_meta() {
152150 */
153151 public function test_get_overridden_annotations_from_meta () {
154152 $ annotations = array (
155- 'instructions ' => 'Enjoy responsibly. ' ,
156153 'readonly ' => true ,
157154 'destructive ' => false ,
158155 'idempotent ' => false ,
Original file line number Diff line number Diff line change @@ -165,7 +165,6 @@ public function test_register_valid_ability(): void {
165165 $ expected_annotations = array_merge (
166166 self ::$ test_ability_args ['meta ' ]['annotations ' ],
167167 array (
168- 'instructions ' => '' ,
169168 'idempotent ' => false ,
170169 )
171170 );
You can’t perform that action at this time.
0 commit comments