Skip to content

Commit 3df46af

Browse files
committed
Remove arrow function for backwards compatibility
1 parent 6eaed8a commit 3df46af

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/phpunit/tests/shortcode.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,13 @@ public function data_strip_shortcodes() {
447447
* @ticket 26649
448448
*/
449449
public function test_escaped_shortcode_should_not_execute() {
450-
add_shortcode( 'example', fn () => 'foo' );
450+
add_shortcode(
451+
'example',
452+
function () {
453+
return 'foo';
454+
}
455+
);
456+
451457
$this->assertSame( '[example]', do_shortcode( strip_shortcodes( '[[example]]' ) ) );
452458
}
453459

0 commit comments

Comments
 (0)