Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for compatibility with get_the_excerpt filter #433

Merged
merged 3 commits into from Feb 15, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/discourse-publish.php
Expand Up @@ -235,7 +235,7 @@ protected function sync_to_discourse_work( $post_id, $title, $raw ) {
$excerpt = apply_filters( 'wp_discourse_excerpt', $parsed, $options['custom-excerpt-length'], $use_full_post );
} else {
if ( has_excerpt( $post_id ) ) {
$wp_excerpt = apply_filters( 'get_the_excerpt', $post->post_excerpt );
$wp_excerpt = apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );
$excerpt = apply_filters( 'wp_discourse_excerpt', $wp_excerpt, $options['custom-excerpt-length'], $use_full_post );
}

Expand Down