Skip to content

Fixed correct content retrieval#1217

Open
girishpanchal30 wants to merge 1 commit intodevelopmentfrom
bugfix/pro/958
Open

Fixed correct content retrieval#1217
girishpanchal30 wants to merge 1 commit intodevelopmentfrom
bugfix/pro/958

Conversation

@girishpanchal30
Copy link
Copy Markdown
Contributor

Summary

Fixed the item's description and content retrieval.

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/feedzy-rss-feeds-pro/issues/958

@girishpanchal30 girishpanchal30 requested a review from Copilot April 27, 2026 10:54
@girishpanchal30 girishpanchal30 added the pr-checklist-skip Allow this Pull Request to skip checklist. label Apr 27, 2026
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Apr 27, 2026
@pirate-bot
Copy link
Copy Markdown
Contributor

Plugin build for 286b90d is ready 🛎️!

Note

You can preview the changes in the Playground

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes how condition evaluation retrieves an item’s description vs. full content, aligning field behavior with the intended SimplePie APIs (and removing a now-unneeded PHPStan baseline suppression).

Changes:

  • Update conditions evaluation to use SimplePie\Item::get_description() for the description field.
  • Update conditions evaluation to use SimplePie\Item::get_content() for the fullcontent field.
  • Remove the PHPStan baseline entry related to the previously referenced SIMPLEPIE_NAMESPACE_ATOM_10 constant.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
includes/util/feedzy-rss-feeds-conditions.php Corrects which SimplePie fields are used for description vs fullcontent when evaluating filters.
phpstan-baseline.neon Drops an ignore for a constant that is no longer referenced.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 277 to +281
case 'description':
$value = wp_strip_all_tags( $item->get_content(), true );
$value = wp_strip_all_tags( $item->get_description(), true );
break;
case 'fullcontent':
$content = $item->get_item_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'full-content' );
$content = ! empty( $content[0]['data'] ) ? $content[0]['data'] : '';
$value = wp_strip_all_tags( $content, true );
$value = wp_strip_all_tags( $item->get_content(), true );
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior of the 'description' and 'fullcontent' condition fields is changed here (description now uses SimplePie Item::get_description(); fullcontent uses Item::get_content()). There are existing PHPUnit tests for this class (tests/test-conditions.php) but none currently exercise evaluate_conditions(); please add/extend unit tests to cover these two fields so regressions in content/description selection are caught.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants