public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/functions.php
/**
 * Attempt to get the unit meta data for a single unit.
 *
 * @since 1.0.0
 *
 * @param integer $unit_id The ID of the unit to get the meta details for.
 *
 * @return object The details of the unit if found, false otherwise.
 */
Attempt to get the unit meta data for a single unit.

@param integer $unit_id The ID of the unit to get the meta details for.

@return object The details of the unit if found, false otherwise.
Attempt to get the unit meta data for a single unit . @param integer $unit_id The ID of the unit to get the meta details for . @return object The details of the unit if found false otherwise .
function WPCW_units_getUnitMetaData( $unit_id ) {
	global $wpdb, $wpcwdb;
	$wpdb->show_errors();
	$unitMeta = $wpdb->get_row( $wpdb->prepare( "
		SELECT *
		FROM $wpcwdb->units_meta
		WHERE unit_id = %d
	", $unit_id ) );
	if ( $unitMeta && $unitMeta->unit_drip_date ) {
		$unitMeta->unit_drip_date_ts = strtotime( $unitMeta->unit_drip_date );
	}
	return $unitMeta;
}
function WPCW_units_getUnitMetaData ( $ unit_id ) { global $ wpdb , $ wpcwdb ; $ wpdb -> show_errors ( ) ; $ unitMeta = $ wpdb -> get_row ( $ wpdb -> prepare ( " 
		SELECT *
		FROM  $ wpcwdb -> units_meta 
		WHERE unit_id = %d
	 " , $ unit_id ) ) ; if ( $ unitMeta && $ unitMeta -> unit_drip_date ) { $ unitMeta -> unit_drip_date_ts = strtotime ( $ unitMeta -> unit_drip_date ) ; } return $ unitMeta ; }
Attempt to get the unit meta data for a single unit.
Attempt to get the unit meta data for a single unit .
// See if there's an entry in the courseware table // Manually convert the release date into a timestamp.