Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_View_Manager::get_url( string $role, array $args = array() )
Get a view url for the requested view
Description Description
Parameters Parameters
- $role
-
(string) (Required) view option [self|visitor|student]
- $args
-
(array) (Optional) additional query args to add to the url
Default value: array()
Return Return
(string)
Source Source
File: includes/class.llms.view.manager.php
private function get_url( $role, $args = array() ) { global $post; $permalink = get_permalink( $post->ID ); if ( 'self' === $role ) { return $permalink; } $args['llms-view-as'] = $role; $href = add_query_arg( $args, $permalink ); $href = wp_nonce_url( $href, 'llms-view-as', 'view_nonce' ); return $href; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |