Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
bef63aa
Post excerpt: Add excerpt length control
carolinan Oct 13, 2022
5098f0d
Update edit.js
carolinan Oct 17, 2022
b7a54a3
Update index.php
carolinan Oct 17, 2022
17576fa
Update core__post-excerpt.json
carolinan Oct 17, 2022
5059371
Update index.php
carolinan Oct 17, 2022
aa5db23
Update index.php
carolinan Oct 17, 2022
34b2691
use wp_trim_words instead of the excerpt length filter
carolinan Nov 21, 2022
bc051de
Display a warning when the excerpt has a word count that is higher th…
carolinan Nov 21, 2022
1d686af
Update packages/block-library/src/post-excerpt/index.php
carolinan Nov 21, 2022
86342e2
Support word count types
carolinan Nov 22, 2022
55edf70
Update the word count warning and add speak().
carolinan Nov 25, 2022
ff3f9ee
Add useDebounce hook to delay speak() while typing an excerpt text.
carolinan Nov 25, 2022
5a9178d
Merge branch 'trunk' into try/excerpt-length-setting
carolinan Dec 12, 2022
ef266d5
Merge branch 'trunk' into try/excerpt-length-setting
carolinan Dec 16, 2022
daa5b05
Update edit.js
carolinan Dec 16, 2022
e8c557f
Update core__query__deprecated-3.json
carolinan Dec 16, 2022
085c025
Remove the word count message.
carolinan Jan 20, 2023
5783b0f
Remove the wordcount package
carolinan Jan 20, 2023
7771d02
Remove the unused CSS
carolinan Jan 20, 2023
0ddaf98
Merge branch 'trunk' into try/excerpt-length-setting
carolinan Jan 23, 2023
c32920f
Merge branch 'trunk' into try/excerpt-length-setting
carolinan Feb 1, 2023
64d255c
Merge branch 'trunk' into try/excerpt-length-setting
carolinan Feb 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update index.php
  • Loading branch information
carolinan committed Oct 17, 2022
commit 5059371e73dff8afa1d614affb326fc95a9e85d9
11 changes: 6 additions & 5 deletions packages/block-library/src/post-excerpt/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ function render_block_core_post_excerpt( $attributes, $content, $block ) {

$excerpt_length = $attributes['excerptLength'];

add_filter( 'excerpt_length', function() use (
$excerpt_length
) {
return $excerpt_length;
} );
add_filter(
'excerpt_length',
function() use ( $excerpt_length ) {
return $excerpt_length;
}
);

$excerpt = get_the_excerpt();

Expand Down