learndash_permalinks_nested_urls

apply_filters( 'learndash_permalinks_nested_urls',  array $permalink_structure,  array $ld_rewrite_patterns,  array $ld_rewrite_values )

Filters list of permalinks structure rules.


Description #


Parameters #

$permalink_structure

(array) An array of permalink structure rules. @since 2.5.0

$ld_rewrite_patterns

(array) An array of rewrite patterns. @since 3.1.4

$ld_rewrite_values

(array) An array of rewrite placeholder/value pairs. @since 3.1.4


Source #

File: includes/class-ld-permalinks.php


Examples #

 <?php
/**
 * Example usage for learndash_permalinks_nested_urls filter.
 */
add_filter(
	'learndash_permalinks_nested_urls',
	function( $permalink_structure, $ld_rewrite_patterns, $ld_rewrite_values ) {
		// May add any custom logic using $permalink_structure, $ld_rewrite_patterns, $ld_rewrite_values.

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