LLMS_Query::maybe_404_certificate()
Serve a 404 for certificates that are not viewable by the current user
Return Return
(void)
Source Source
File: includes/class.llms.query.php
public function maybe_404_certificate() { if ( 'llms_my_certificate' === get_post_type() ) { $cert = new LLMS_User_Certificate( get_the_ID() ); if ( ! $cert->can_user_view() ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |