llms_set_permalink_structure( array $permalinks )

Set the permalink structure and only allow keys we know about.


Parameters Parameters

$permalinks

(array) (Required)


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/functions/llms-functions-l10n.php

function llms_set_permalink_structure( $permalinks ) {
	$defaults = llms_get_permalink_structure();

	$permalinks = wp_parse_args(
		// Only allow values whose keys are in the defaults array.
		array_intersect_key( $permalinks, $defaults ),
		$defaults
	);

	array_filter( $permalinks, 'untrailingslashit' );

	update_option( 'llms_permalinks', $permalinks );
}


Top ↑

Changelog Changelog

Changelog
Version Description
7.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.