public/wordpress/wp-content/plugins/wp-courseware/includes/functions/core.php
/**
 * Set a Cookie.
 *
 * @since 4.3.0
 *
 * @param string  $name Name of the cookie being set.
 * @param string  $value Value of the cookie.
 * @param integer $expire Expiry of the cookie.
 * @param bool    $secure Whether the cookie should be served only over https.
 */
Set a Cookie.

@param string  $name Name of the cookie being set.
@param string  $value Value of the cookie.
@param integer $expire Expiry of the cookie.
@param bool    $secure Whether the cookie should be served only over https.
Set a Cookie . @param string $name Name of the cookie being set . @param string $value Value of the cookie . @param integer $expire Expiry of the cookie . @param bool $secure Whether the cookie should be served only over https .
function wpcw_setcookie( $name, $value, $expire = 0, $secure = false ) {
	if ( ! headers_sent() ) {
		setcookie( $name, $value, $expire, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, $secure, apply_filters( 'wpcw_cookie_httponly', false, $name, $value, $expire, $secure ) );
	} elseif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
		headers_sent( $file, $line );
		trigger_error( "{$name} cookie cannot be set - headers already sent by {$file} on line {$line}", E_USER_NOTICE );
	}
}
function wpcw_setcookie ( $ name , $ value , $ expire = 0 , $ secure = false ) { if ( ! headers_sent ( ) ) { setcookie ( $ name , $ value , $ expire , COOKIEPATH ? COOKIEPATH : '/' , COOKIE_DOMAIN , $ secure , apply_filters ( 'wpcw_cookie_httponly' , false , $ name , $ value , $ expire , $ secure ) ) ; } elseif ( defined ( 'WP_DEBUG' ) && WP_DEBUG ) { headers_sent ( $ file , $ line ) ; trigger_error ( " { $ name }  cookie cannot be set - headers already sent by  { $ file }  on line  { $ line } " , E_USER_NOTICE ) ; } }
Set a Cookie.
Set a Cookie .