llms_set_permalink_structure( array $permalinks )
Set the permalink structure and only allow keys we know about.
Parameters Parameters
- $permalinks
-
(array) (Required)
Return Return
(void)
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 );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.6.0 | Introduced. |