-
Notifications
You must be signed in to change notification settings - Fork 26
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
Ability to customize the [#item_url] tag #813
Comments
+1 https://secure.helpscout.net/conversation/2655505582/426945?viewId=212385 (nofollow link) |
I think having an action for this is too complicated because we have same actions for all tags and creating new actions just for [#item_url] is too much but I would like to have a filter for this that would allow manipulating data. @girishpanchal30, do you think we can create such a filter? Something like you suggested for custom tags in the past: |
@vytisbulkevicius Yes, It's better to create a new filter rather than a new action for |
@AndreeaCristinaRadacina @vytisbulkevicius I've added the new filter and I mentioned the example code in PR #963 |
@girishpanchal30 amazing! Everything works well, apart from the link type (rel). I set it to nofollow, but it appears as noopener: Should I apply other settings for this to work? Same results if I use: $item_link_data['attr']['rel'] = 'noopener noreferrer nofollow'; // noopener, nofollow. |
@girishpanchal30 I also checked a similar guide before, but it's the same when I use _self/_parent and 'nofollow'. Is it something we can control? |
I also removed this line: $item_link_data['attr']['rel'] = 'nofollow'; // noopener, nofollow. |
I tried to play around and I also can't change it with the filter, its something WordPress doesn't want to allow manipulating for security reasons, another thread about it: https://wordpress.com/forums/topic/remove-relnoopener-wtf/ What worked for me and maybe we can recommend those clients who ask for it is using this one and manipulating DOM (it works without re-doing the import):
I look with it for feedzy-rss-link-icon class which that Read More button has and then change the rel attributes value to nofollow in this case. @girishpanchal30 what do you think about this approach, any big cons recommending it if someone needs? |
@vytisbulkevicius @AndreeaCristinaRadacina I've removed the default WP link rel if found in our filter. Here: 37e3e0d Please check with the latest build zip. |
@girishpanchal30 Thank you! Now, when I use the filter and declare a rel type, nothing is displayed: If I comment that line, the default noopener is displayed: Do you have any suggestions? Should I use this in combination with Vytis' code, or should it have worked as a standalone solution? |
It should work standalone I've pushed new changes in PR, Can you please recheck with the latest build zip? Thanks |
@girishpanchal30 Great, it works now! |
- Added support for a custom filter that allows modifications of the item_url tag for imported posts #813
##### [Version 4.4.13](v4.4.12...v4.4.13) (2024-08-09) - Added support for a custom filter that allows modifications of the item_url tag for imported posts [#813](#813)
🎉 This issue has been resolved in version 4.4.13 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
What problem does this address?
Right now, we have the [#item_url] tag that adds a personalized "Read More" link. However, the site admin has no control over the link.
What is your proposed solution?
Implement actions modal with some basic actions:
Will this feature require documentation? (Optional)
Yes, it requires documentation.
The text was updated successfully, but these errors were encountered: