Skip to content

Commit

Permalink
Content Options: Ensure excerpt_length is an int to prevent fatal err…
Browse files Browse the repository at this point in the history
…ors (#40389)

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12235362927

Upstream-Ref: Automattic/jetpack@2cb6523
  • Loading branch information
coder-karen authored and matticbot committed Dec 9, 2024
1 parent 6937742 commit 57b8b86
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
This is an alpha version! The changes listed here are not final.

### Fixed
- Content Options: Ensure excerpt_length is cast to an int if it is not already, to prevent fatal errors.
- Customizer: Fix spacing issue in Content Options

## [0.7.3] - 2024-12-04
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ function jetpack_blog_display_custom_excerpt( $content = '' ) {
$text = wp_strip_all_tags( $text );
/** This filter is documented in wp-includes/formatting.php */
$excerpt_length = apply_filters( 'excerpt_length', 55 );
$excerpt_length = is_numeric( $excerpt_length ) ? (int) $excerpt_length : 55;

/** This filter is documented in wp-includes/formatting.php */
$excerpt_more = apply_filters( 'excerpt_more', ' [...]' );

Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
),
'jetpack-classic-theme-helper' => array(
'path' => 'jetpack_vendor/automattic/jetpack-classic-theme-helper',
'ver' => '0.7.4-alpha1733740933',
'ver' => '0.7.4-alpha1733746307',
),
'jetpack-compat' => array(
'path' => 'jetpack_vendor/automattic/jetpack-compat',
Expand Down
Loading

0 comments on commit 57b8b86

Please sign in to comment.