function parse_pretty_entry_url() { global $frm_entry, $wpdb, $post; $post_url = get_permalink($post->ID); $request_uri = FrmProAppHelper::current_url(); $match_str = '#^' . $post_url . '(.*?)([\\?/].*?)?$#'; if (preg_match($match_str, $request_uri, $match_val)) { // match short slugs (most common) if (isset($match_val[1]) and !empty($match_val[1]) and $frm_entry->exists($match_val[1])) { // Artificially set the GET variable $_GET['entry'] = $match_val[1]; } } }