feedzy-rss-feeds icon indicating copy to clipboard operation
feedzy-rss-feeds copied to clipboard

Allow chained actions for `[#item_title]`

Open Soare-Robert-Daniel opened this issue 1 year ago • 1 comments

Summary

Added the option to have chained actions for Post Title field in the Map Content on the tag [#item_title]. ( the process is similar to the one from post content)

Changes:

  • added tagify with the custom format for Post Title field that allow serialization for chained actions.
  • added [#item_title] in the list of allowed tags that can use the chained actions.
  • updated the data processing for $post_title to account for the new format.

If the user had some tags already in the title field, they will appear normal since they are saved like [#item_title], [#item_source].

The workflow:

  1. The import UI encodes all the chained actions data inside the Tagify action. (import-metabox-edit.js)
  2. On the import process, the field data is decoded and extracted from the tagify structure. (feedzy-rss-feeds-import.php)
  3. The structure is a serialized array with all the actions. The data field will be a mix of tags and normal text (if present).
  4. The tags are extracted from the entire field data. Then they are deserialized and processed.
  5. The result of the process is replaced in the field data (swaps the result with serialized data in the string).

[!NOTE] I did some code refactoring on the function and variable names so that the above process is reflected in their names.

[!NOTE] I removed the code from PR since they conflict. This version is more advance.

Will affect visual aspect of the product

NO

Screenshots

https://github.com/Codeinwp/feedzy-rss-feeds/assets/17597852/28367d6e-9b96-4e92-8e3e-09400780531f

Test instructions

Check before Pull Request is ready:

  • [x] I have written a test and included it in this PR
  • [x] I have run all tests and they pass
  • [x] The code passes when running the PHP CodeSniffer
  • [x] Code meets WordPress Coding Standards for PHP, HTML, CSS and JS
  • [x] Security and Sanitization requirements have been followed
  • [x] I have assigned a reviewer or two to review this PR (if you're not sure who to assign, we can do this step for you)

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

Soare-Robert-Daniel avatar Mar 29 '24 16:03 Soare-Robert-Daniel

Plugin build for b987a2b79e124e52512b251c4092692be42e4646 is ready :bellhop_bell:!

pirate-bot avatar Mar 29 '24 16:03 pirate-bot

@Soare-Robert-Daniel

  • [x] If i have Feedzy Pro installed and activated, and use any actions for the title (for example https://vertis.d.pr/i/ytLY22), the result will look like this https://vertis.d.pr/i/xKdPSa

Can be checked here:

 Admin area URL: https://inexpensivegiraffe.s2-tastewp.com/wp-admin 
 Username: irinel 
 Password: 1vT9Vr7SHKQ 

irinelenache avatar May 22 '24 12:05 irinelenache

:tada: This PR is included in version 4.4.9 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

pirate-bot avatar May 30 '24 12:05 pirate-bot