Skip to content
This repository has been archived by the owner on Feb 23, 2019. It is now read-only.

Enhance "remove_query()" to Recognize Other Ampersand Forms #383

Merged
merged 1 commit into from
Feb 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Util_Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ static public function translate_file( $file ) {
* Removes WP query string from URL
*/
static public function remove_query( $url ) {
$url = preg_replace( '~[&\?]+(ver=([a-z0-9-_\.]+|[0-9-]+))~i', '', $url );
$url = preg_replace( '~(\?|&|&|&)+ver=[a-z0-9-_\.]+~i', '', $url );

return $url;
}
Expand Down