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

Add a Merge Tag modifier to the Entry moderation Merge Tags to output the URL only #1986

Closed
rafaehlers opened this issue Feb 12, 2024 · 6 comments
Assignees

Comments

@rafaehlers
Copy link
Contributor

There's no way at this moment to just output the URL for the entry moderation merge tags.

This will be useful for so many use cases, including generating a QRCode, as requested by a user.

Related: https://github.com/GravityKit/GravityView/blob/develop/includes/class-gravityview-entry-approval-merge-tags.php#L227

@floatytheastronaut
Copy link

@mrcasual
Copy link
Collaborator

Implemented in fa45dce.

@mrcasual mrcasual added this to the 2.23.0 milestone Apr 29, 2024
@rafaehlers
Copy link
Contributor Author

@mrcasual This never worked:

On a form notification:
image

image

Inside a custom content field:
image

image

Tested on GV 2.27.1

@rafaehlers rafaehlers assigned mrcasual and unassigned rafaehlers Aug 24, 2024
@mrcasual
Copy link
Collaborator

mrcasual commented Aug 26, 2024

@rafaehlers,the issue wasn't clear about adding a new (:url) merge tag modifier. Your "related" code link pointed to where the merge tag can be modified using a filter, and that's what was done here as well. It would have worked for the customer who asked for this. This is consistent with how we modify other links (e.g., gk/gravityview/widget/search/clear-button/params).

add_filter( 'gk/gravityview/entry/approval-link/params', function ( $params ) {
	$params['format'] = 'text';

	return $params;
} );

If a new merge tag modifier is needed, please update the issue with more details and I'll implement that.

@mrcasual mrcasual assigned rafaehlers and unassigned mrcasual Aug 26, 2024
@mrcasual mrcasual removed this from the 2.23.0 milestone Aug 27, 2024
@mrcasual
Copy link
Collaborator

@rafaehlers, implemented by 5565cca. Please test.

@rafaehlers
Copy link
Contributor Author

It works! Customer notified ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants