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

Added new fillter for item_url #963

Merged
merged 3 commits into from
Aug 9, 2024
Merged

Added new fillter for item_url #963

merged 3 commits into from
Aug 9, 2024

Conversation

girishpanchal30
Copy link
Contributor

Add new fillter for item_url

Summary

I've added a new filter to add/remove item link attributes and change the link text.

Will affect visual aspect of the product

Ref: https://tinyurl.com/22kqe3dm

Test instructions

Add the following code snippet to the functions.php file of your current active theme or in any custom plugin file:

add_filter(
	'feedzy_item_link',
	function ( $item_link_data, $item, $job ) {
		// Change link text.
		$item_link_data['text'] = 'LINK TEXT HERE';

		// Add tracking parameters/UTMs.
		$item_link_data['attr']['href'] = add_query_arg(
			array(
				'utm_source'   => '',
				'utm_medium'   => '',
				'utm_campaign' => '',
			),
			$item_link_data['attr']['href']
		);

		// Change link opening behavior.
		$item_link_data['attr']['target'] = '_self'; // _blank, _self, _parent, _top

		// Add link type - follow/nofollow link.
		$item_link_data['attr']['rel'] = 'nofollow'; // noopener, nofollow.
		return $item_link_data;
	},
	10,
	3
);

Check before Pull Request is ready:

Closes #813

@girishpanchal30 girishpanchal30 added the pr-checklist-skip Allow this Pull Request to skip checklist. label Aug 1, 2024
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Aug 1, 2024
@girishpanchal30 girishpanchal30 linked an issue Aug 1, 2024 that may be closed by this pull request
4 tasks
@pirate-bot
Copy link
Contributor

pirate-bot commented Aug 1, 2024

Plugin build for 8758af5 is ready 🛎️!

@vytisbulkevicius vytisbulkevicius merged commit 9575486 into development Aug 9, 2024
8 checks passed
@vytisbulkevicius vytisbulkevicius deleted the feat/813 branch August 9, 2024 12:31
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 4.4.13 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Aug 9, 2024
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. released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to customize the [#item_url] tag
4 participants