public function basename( $url ) {
		$filename = explode( '?', basename( $url ) );
		$filename = array_shift( $filename );
		$filename = explode( '#', $filename )[0]; // Remove trailing anchors
		$filename = sanitize_file_name( urldecode( $filename ) );

		return $filename;
	}
public function basename( $url ) {
		$filename = explode( '?', basename( $url ) );
		$filename = array_shift( $filename );
		$filename = explode( '#', $filename )[0]; // Remove trailing anchors
		$filename = sanitize_file_name( urldecode( $filename ) );

		return $filename;
	}
public function basename ( $ url ) { $ filename = explode ( '?' , basename ( $ url ) ) ; $ filename = array_shift ( $ filename ) ; $ filename = explode ( '#' , $ filename ) [ 0 ] ; // Remove trailing anchors $ filename = sanitize_file_name ( urldecode ( $ filename ) ) ; return $ filename ; }
Get sanitized basename without query string or anchors

@param $url

@return array|mixed|string
Get sanitized basename without query string or anchors