Skip to content

Commit

Permalink
Fix the "is rest api?" condition in the post-excerpt PHP package entr…
Browse files Browse the repository at this point in the history
…y point (#48654)
  • Loading branch information
fullofcaffeine authored Mar 1, 2023
1 parent 00ceb87 commit 00da2ce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/block-library/src/post-excerpt/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ function register_block_core_post_excerpt() {
* Returns 100 because 100 is the max length in the setting.
*/
if ( is_admin() ||
defined( 'REST_REQUEST' ) ||
'REST_REQUEST' ) {
defined( 'REST_REQUEST' ) && REST_REQUEST ) {
add_filter(
'excerpt_length',
function() {
Expand Down

1 comment on commit 00da2ce

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in 00da2ce.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4307319494
📝 Reported issues:

Please sign in to comment.