llms_setup_product_data( mixed $post )
When the_post is called, put course data into a global.
Description Description
Parameters Parameters
- $post
-
(mixed) (Required)
Return Return
Source Source
File: includes/llms.template.functions.php
function llms_setup_product_data( $post ) { if ( ! is_admin() ) { if ( 'course' == $post->post_type || 'llms_membership' == $post->post_type ) { unset( $GLOBALS['product'] ); if ( is_int( $post ) ) { $post = get_post( $post ); } if ( empty( $post->post_type ) ) { return; } $GLOBALS['product'] = llms_get_product( $post ); return $GLOBALS['product']; } } }
Expand full source code Collapse full source code View on GitHub