static function addSearchParamsToUrl( $url ) {

		if ( ! empty( $_REQUEST['s'] ) ) {
			$url = esc_url( add_query_arg( 's', $_REQUEST['s'], $url ) );
		}

		if ( ! empty( $_REQUEST['orderby'] ) ) {
			$url = esc_url( add_query_arg( 'orderby', $_REQUEST['orderby'], $url ) );
		}

		if ( ! empty( $_REQUEST['order'] ) ) {
			$url = esc_url( add_query_arg( 'order', $_REQUEST['order'], $url ) );
		}

		if ( ! empty( $_REQUEST['paged'] ) ) {
			$url = esc_url( add_query_arg( 'paged', $_REQUEST['paged'], $url ) );
		}

		return $url;
	}
static function addSearchParamsToUrl( $url ) {

		if ( ! empty( $_REQUEST['s'] ) ) {
			$url = esc_url( add_query_arg( 's', $_REQUEST['s'], $url ) );
		}

		if ( ! empty( $_REQUEST['orderby'] ) ) {
			$url = esc_url( add_query_arg( 'orderby', $_REQUEST['orderby'], $url ) );
		}

		if ( ! empty( $_REQUEST['order'] ) ) {
			$url = esc_url( add_query_arg( 'order', $_REQUEST['order'], $url ) );
		}

		if ( ! empty( $_REQUEST['paged'] ) ) {
			$url = esc_url( add_query_arg( 'paged', $_REQUEST['paged'], $url ) );
		}

		return $url;
	}
static function addSearchParamsToUrl ( $ url ) { if ( ! empty ( $ _REQUEST [ 's' ] ) ) { $ url = esc_url ( add_query_arg ( 's' , $ _REQUEST [ 's' ] , $ url ) ) ; } if ( ! empty ( $ _REQUEST [ 'orderby' ] ) ) { $ url = esc_url ( add_query_arg ( 'orderby' , $ _REQUEST [ 'orderby' ] , $ url ) ) ; } if ( ! empty ( $ _REQUEST [ 'order' ] ) ) { $ url = esc_url ( add_query_arg ( 'order' , $ _REQUEST [ 'order' ] , $ url ) ) ; } if ( ! empty ( $ _REQUEST [ 'paged' ] ) ) { $ url = esc_url ( add_query_arg ( 'paged' , $ _REQUEST [ 'paged' ] , $ url ) ) ; } return $ url ; }
Rebuild a URL with known search parameters

@param string $url

@return string
Rebuild a URL with known search parameters