Skip to content

Commit

Permalink
Update code to count appropriately
Browse files Browse the repository at this point in the history
  • Loading branch information
dshanske committed Oct 6, 2024
1 parent 88f6fd1 commit 21dc57b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/micropub/class-synprovider-micropub.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ public function get_content( $post ) {
$content = syn_get_post_content( $post );
$length = strlen( $content );
$backlink = get_option( 'syndication_backlink' );
$link = wp_get_shortlink( $post );
$link = sprintf( '<a href="%1s">%1s</a>', $link );
$shortlink = wp_get_shortlink( $post );
$link = '<a href="' . $shortlink . '">' . $shortlink . '</a>';
if ( true !== $backlink ) {
$content = syn_excerpt( $content, ( $this->content_length - 3 ) - strlen( $link ) );
$content = syn_excerpt( $content, ( $this->content_length - 3 ) - strlen( $shortlink ) );
}
if ( ! empty( $post->post_excerpt ) && 1 === get_option( 'syndication_use_excerpt' ) ) {
$content = $post->post_excerpt;
Expand Down

0 comments on commit 21dc57b

Please sign in to comment.