LLMS_REST_Posts_Controller::can_access_password_content( LLMS_Post_Model $object, WP_REST_Request $request )

Checks if the user can access password-protected content.


Parameters Parameters

$object

(LLMS_Post_Model) (Required) The LLMS_Post_model object.

$request

(WP_REST_Request) (Required) Request data to check.


Top ↑

Return Return

(bool) True if the user can access password-protected content, otherwise false.


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-posts-controller.php

1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
        if ( $parent ) {
            return $this->check_read_permission( $parent );
        }
    }
 
    /*
     * If there isn't a parent, but the status is set to inherit, assume
     * it's published (as per get_post_status()).
     */
    if ( 'inherit' === $status ) {
        return true;
    }
 
    return false;
 
}
 
 
/**
 * Checks if the user can access password-protected content.


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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