public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/functions.php
/**
 * Function called when registration form loads up.
 *
 * Looks for course_id parameter and adds hidden fields into the registration form.
 *
 * @since 1.0.0
 */
Function called when registration form loads up.
Looks for course_id parameter and adds hidden fields into the registration form.


Function called when registration form loads up . Looks for course_id parameter and adds hidden fields into the registration form .
function WPCW_course_enrollment_via_shortcode() {
	if ( isset( $_GET['_wp_enroll'] ) && wp_verify_nonce( $_GET['_wp_enroll'], 'wpcw_enroll' ) ) {
		$courses = array();
		if ( isset( $_GET['course_id'] ) ) {
			foreach ( $_GET['course_id'] as $key => $value ) {
				$html = '<input type="hidden" name="course_id[' . $key . ']" id="course_ID" value="' . $value . '" />';
				echo $html;
			}
		}
	}
}
function WPCW_course_enrollment_via_shortcode ( ) { if ( isset ( $ _GET [ '_wp_enroll' ] ) && wp_verify_nonce ( $ _GET [ '_wp_enroll' ] , 'wpcw_enroll' ) ) { $ courses = array ( ) ; if ( isset ( $ _GET [ 'course_id' ] ) ) { foreach ( $ _GET [ 'course_id' ] as $ key => $ value ) { $ html = '<input type="hidden" name="course_id[' . $ key . ']" id="course_ID" value="' . $ value . '" />' ; echo $ html ; } } } }
Function called when registration form loads up.
Function called when registration form loads up .