GravityView icon indicating copy to clipboard operation
GravityView copied to clipboard

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

Open rafaehlers opened this issue 1 year ago • 2 comments

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

rafaehlers avatar Feb 12 '24 20:02 rafaehlers

FreeScout #77233.
https://support.gravitykit.com/conversation/77233?folder_id=1

floatytheastronaut avatar Feb 12 '24 20:02 floatytheastronaut

Implemented in fa45dce5f.

mrcasual avatar Apr 29 '24 14:04 mrcasual

@mrcasual This never worked:

On a form notification: image

image

Inside a custom content field: image

image

Tested on GV 2.27.1

rafaehlers avatar Aug 24 '24 22:08 rafaehlers

@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 avatar Aug 26 '24 15:08 mrcasual

@rafaehlers, implemented by 5565cca14. Please test.

mrcasual avatar Aug 27 '24 13:08 mrcasual