After Copy Redirect to Page

Advertisement

Thank you zecke (@zecke) for asking for such support.

As per the request, I have added a filter support to redirect user after copy content to clipboard.

Please use below code snippet:

if ( ! function_exists( 'prefix_copy_the_code_localize_vars' ) ) :
	/**
	 * Localize vars.
	 *
	 * @return array
	 */
	function prefix_copy_the_code_localize_vars( $args = array() ) {

		// Redirect to page url.
		$args['redirect_url'] = 'https://maheshwaghmare.com/';

		return $args;
	}
	add_filter( 'copy_the_code_localize_vars', 'prefix_copy_the_code_localize_vars' );

endif;

Leave a Reply