public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/admin/functions.php
/**
 * Get the URL for the desired page, preserving any parameters.
 *
 * @since 1.0.0
 *
 * @param string $pageBase The based page to fetch.
 * @param mixed  $ignoreFields The array or string of parameters not to include.
 *
 * @return string The newly formed URL.
 */
Get the URL for the desired page, preserving any parameters.

@param string $pageBase The based page to fetch.
@param mixed  $ignoreFields The array or string of parameters not to include.

@return string The newly formed URL.
Get the URL for the desired page preserving any parameters . @param string $pageBase The based page to fetch . @param mixed $ignoreFields The array or string of parameters not to include . @return string The newly formed URL .
function WPCW_urls_getURLWithParams( $pageBase, $ignoreFields = false ) {
	$params = array(
		's'       => false,
		'pagenum' => false,
		'filter'  => false,
		'order'   => false,
		'orderby' => false,
	);
	if ( $ignoreFields ) {
		if ( is_array( $ignoreFields ) ) {
			foreach ( $ignoreFields as $field ) {
				unset( $params[ $field ] );
			}
		} else {
			unset( $params[ $ignoreFields ] );
		}
	}
	foreach ( $params as $paramName => $notused ) {
		$value = WPCW_arrays_getValue( $_GET, $paramName );
		if ( $value ) {
			$pageBase .= '&' . $paramName . '=' . $value;
		}
	}
	return $pageBase;
}
function WPCW_urls_getURLWithParams ( $ pageBase , $ ignoreFields = false ) { $ params = array ( 's' => false , 'pagenum' => false , 'filter' => false , 'order' => false , 'orderby' => false , ) ; if ( $ ignoreFields ) { if ( is_array ( $ ignoreFields ) ) { foreach ( $ ignoreFields as $ field ) { unset ( $ params [ $ field ] ) ; } } else { unset ( $ params [ $ ignoreFields ] ) ; } } foreach ( $ params as $ paramName => $ notused ) { $ value = WPCW_arrays_getValue ( $ _GET , $ paramName ) ; if ( $ value ) { $ pageBase .= '&' . $ paramName . '=' . $ value ; } } return $ pageBase ; }
Get the URL for the desired page, preserving any parameters.
Get the URL for the desired page preserving any parameters .
// Parameters to extract from URL to keep in the URL. // Got fields we don't want in the URL? Handle both a string and // arrays