Warning: This method has been deprecated. $paged automatically set via add_rewrite_rule() in $this->add_endpoints() method instead.
LLMS_Query::set_dashboard_pagination()
Handles setting the “paged” variable on Student Dashboard endpoints which utilize page/{n} style pagination
Contents
Return Return
(void)
Source Source
File: includes/class.llms.query.php
* @since 7.5.0 Fixed passing null to parameter #1 ($haystack) using `strpos`.
*
* @return void
*/
public function maybe_redirect_certificate() {
global $wp, $wp_query;
$old = sprintf( '/%s/', _x( 'my_certificate', 'slug', 'lifterlms' ) );
$path = wp_parse_url( home_url( $wp->request ), PHP_URL_PATH );
if ( $wp_query->is_404() && $path && 0 === strpos( $path, $old ) ) {
$slug = str_replace( $old, '', $path );
$new_post = get_page_by_path( $slug, 'OBJECT', 'llms_my_certificate' );
if ( $new_post ) {
llms_redirect_and_exit( get_permalink( $new_post->ID ) );
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.28.2 | $paged automatically set via add_rewrite_rule() in $this->add_endpoints() method. |
| 3.14.0 | Introduced. |