-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #25 - refactor post excerpt overrides into post-excerpt.php
- Loading branch information
1 parent
93b524a
commit 3a65a25
Showing
2 changed files
with
20 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* Appends the missing </div> to the core/post-excerpt block. | ||
* | ||
* @param $attributes | ||
* @param $content | ||
* @param $block | ||
* @return string | ||
*/ | ||
function fizzie_render_block_core_post_excerpt( $attributes, $content, $block ) { | ||
$html = gutenberg_render_block_core_post_excerpt( $attributes, $content, $block ); | ||
// Should really check that it's missing. | ||
if ( 0 !== strrpos( $html, '</div>') ) { | ||
$html .= '</div>'; | ||
} | ||
return $html; | ||
} |