Browse: Home / Hooks /

ld_sensei_url_link

apply_filters( 'ld_sensei_url_link',  string $url,  array $url_params,  int $post_id,  string $action )

Filters duplicate URL link.


Description #

Used in get_duplicate_link function to get duplicate post link.


Parameters #

$url

(string) Duplicate link for a post.

$url_params

(array) An array of URL parameters.

$post_id

(int) Post ID.

$action

(string) URL action.


Source #

File: includes/import/class-ld-import-post.php


Examples #

Note: Extended code example below not guaranteed, you may need to consult with a developer

 <?php
/**
 * Example usage for ld_sensei_url_link filter.
 */
add_filter(
	'ld_sensei_url_link',
	function( $url, $url_params, $action ) {
		// May add any custom logic using $url, $url_params, $action.

		// Always return $url.
		return $url;
	},
	10,
	3
);