Skip to content

Commit

Permalink
Remove arrow function for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelw85 committed Jan 31, 2025
1 parent 6eaed8a commit 3df46af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/phpunit/tests/shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,13 @@ public function data_strip_shortcodes() {
* @ticket 26649
*/
public function test_escaped_shortcode_should_not_execute() {
add_shortcode( 'example', fn () => 'foo' );
add_shortcode(
'example',
function () {
return 'foo';
}
);

$this->assertSame( '[example]', do_shortcode( strip_shortcodes( '[[example]]' ) ) );
}

Expand Down

0 comments on commit 3df46af

Please sign in to comment.