diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php
index 261540a1a..da112378f 100644
--- a/wp-includes/comment-functions.php
+++ b/wp-includes/comment-functions.php
@@ -92,7 +92,6 @@ function comments_popup_script($width=400, $height=400, $file='') {
function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') {
global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb;
- global $querystring_start, $querystring_equal, $querystring_separator;
global $comment_count_cache;
if (! is_single() && ! is_page()) {
@@ -113,7 +112,7 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com
}
echo 'get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
diff --git a/wp-includes/feed-functions.php b/wp-includes/feed-functions.php
index 8f144c25f..6e1992b2c 100644
--- a/wp-includes/feed-functions.php
+++ b/wp-includes/feed-functions.php
@@ -76,7 +76,6 @@ function comments_rss_link($link_text = 'Comments RSS', $commentsrssfilename = '
function comments_rss($commentsrssfilename = 'wp-commentsrss2.php') {
global $id;
- global $querystring_start, $querystring_equal, $querystring_separator;
if ('' != get_settings('permalink_structure'))
$url = trailingslashit( get_permalink() ) . 'feed/';
@@ -87,13 +86,12 @@ function comments_rss($commentsrssfilename = 'wp-commentsrss2.php') {
}
function get_author_rss_link($echo = false, $author_id, $author_nicename) {
- global $querystring_start, $querystring_equal;
$auth_ID = $author_id;
$permalink_structure = get_settings('permalink_structure');
if ('' == $permalink_structure) {
$file = get_settings('siteurl') . '/wp-rss2.php';
- $link = $file . $querystring_start . 'author' . $querystring_equal . $author_id;
+ $link = $file . '?author=' . $author_id;
} else {
$link = get_author_link(0, $author_id, $author_nicename);
$link = $link . "feed/";
@@ -104,13 +102,12 @@ function get_author_rss_link($echo = false, $author_id, $author_nicename) {
}
function get_category_rss_link($echo = false, $category_id, $category_nicename) {
- global $querystring_start, $querystring_equal;
$cat_ID = $category_id;
$permalink_structure = get_settings('permalink_structure');
if ('' == $permalink_structure) {
$file = get_settings('siteurl') . '/wp-rss2.php';
- $link = $file . $querystring_start . 'cat' . $querystring_equal . $category_id;
+ $link = $file . '?cat=' . $category_id;
} else {
$link = get_category_link(0, $category_id, $category_nicename);
$link = $link . "feed/";
diff --git a/wp-includes/template-functions-author.php b/wp-includes/template-functions-author.php
index ccf61de87..ba9c2c82e 100644
--- a/wp-includes/template-functions-author.php
+++ b/wp-includes/template-functions-author.php
@@ -123,13 +123,13 @@ function the_author_posts_link($idmode='') {
function get_author_link($echo = false, $author_id, $author_nicename) {
- global $wpdb, $wp_rewrite, $post, $querystring_start, $querystring_equal, $cache_userdata;
+ global $wpdb, $wp_rewrite, $post, $cache_userdata;
$auth_ID = $author_id;
$link = $wp_rewrite->get_author_permastruct();
if (empty($link)) {
$file = get_settings('home') . '/';
- $link = $file.$querystring_start.'author'.$querystring_equal.$auth_ID;
+ $link = $file . '?author=' . .$auth_ID;
} else {
if ('' == $author_nicename) $author_nicename = $cache_userdata[$author_id]->author_nicename;
$link = str_replace('%author%', $author_nicename, $link);
diff --git a/wp-includes/template-functions-category.php b/wp-includes/template-functions-category.php
index 6d5f91406..390410823 100644
--- a/wp-includes/template-functions-category.php
+++ b/wp-includes/template-functions-category.php
@@ -25,13 +25,13 @@ function get_the_category($id = false) {
}
function get_category_link($echo = false, $category_id, $category_nicename) {
- global $wpdb, $wp_rewrite, $post, $querystring_start, $querystring_equal, $cache_categories;
+ global $wpdb, $wp_rewrite, $post, $cache_categories;
$cat_ID = $category_id;
$catlink = $wp_rewrite->get_category_permastruct();
if (empty($catlink)) {
$file = get_settings('home') . '/';
- $catlink = $file.$querystring_start.'cat'.$querystring_equal.$cat_ID;
+ $catlink = $file . '?cat=' . $cat_ID;
} else {
$category_nicename = $cache_categories[$category_id]->category_nicename;
if ($parent=$cache_categories[$category_id]->category_parent) $category_nicename = get_category_parents($parent, FALSE, '/', TRUE) . $category_nicename . '/';
@@ -182,7 +182,6 @@ function dropdown_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_
$optiondates = 0, $optioncount = 0, $hide_empty = 1, $optionnone=FALSE,
$selected=0, $hide=0) {
global $wpdb;
- global $querystring_start, $querystring_equal, $querystring_separator;
if (($file == 'blah') || ($file == '')) $file = get_settings('home') . '/';
if (!$selected) $selected=$cat;
$sort_column = 'cat_'.$sort_column;
@@ -253,7 +252,6 @@ function wp_list_cats($args = '') {
function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=FALSE, $child_of=0, $categories=0, $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=FALSE) {
global $wpdb, $category_posts;
- global $querystring_start, $querystring_equal, $querystring_separator;
// Optiondates now works
if ('' == $file) {
$file = get_settings('home') . '/';
@@ -308,16 +306,6 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
}
}
- if (intval($optionall) == 1 && !$child_of && $categories) {
- $all = apply_filters('list_cats', $all);
- $link = "'.$all."";
- if ($list) {
- echo "\n\t
$link";
- } else {
- echo "\t$link
\n";
- }
- }
-
$num_found=0;
$thelist = "";
diff --git a/wp-includes/template-functions-general.php b/wp-includes/template-functions-general.php
index c0d572f4b..69145ba61 100644
--- a/wp-includes/template-functions-general.php
+++ b/wp-includes/template-functions-general.php
@@ -262,7 +262,7 @@ function wp_get_archives($args = '') {
}
function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
- global $querystring_start, $querystring_equal, $querystring_separator, $month, $wpdb;
+ global $month, $wpdb;
if ('' == $type) {
$type = 'monthly';
@@ -276,9 +276,9 @@ function get_archives($type='', $limit='', $format='html', $before = '', $after
$archive_week_separator = '–';
// archive link url
- $archive_link_m = get_settings('siteurl').'/'.$querystring_start.'m'.$querystring_equal; # monthly archive;
- $archive_link_w = get_settings('siteurl').'/'.$querystring_start.'w'.$querystring_equal; # weekly archive;
- $archive_link_p = get_settings('siteurl').'/'.$querystring_start.'p'.$querystring_equal; # post-by-post archive;
+ $archive_link_m = get_settings('siteurl') . '/?m='; # monthly archive;
+ $archive_link_w = get_settings('siteurl') . '/?w='; # weekly archive;
+ $archive_link_p = get_settings('siteurl') . '/?p='; # post-by-post archive;
// over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride
$archive_date_format_over_ride = 0;
@@ -338,9 +338,9 @@ function get_archives($type='', $limit='', $format='html', $before = '', $after
$arc_week = get_weekstartend($arcresult->yyyymmdd, get_settings('start_of_week'));
$arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']);
$arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']);
- $url = sprintf('%s/%s%sm%s%s%sw%s%d', get_settings('home'), '', $querystring_start,
- $querystring_equal, $arc_year, $querystring_separator,
- $querystring_equal, $arcresult->week);
+ $url = sprintf('%s/%s%sm%s%s%sw%s%d', get_settings('home'), '', '?',
+ '=', $arc_year, '&',
+ '=', $arcresult->week);
$text = $arc_week_start . $archive_week_separator . $arc_week_end;
echo get_archives_link($url, $text, $format, $before, $after);
}
diff --git a/wp-includes/template-functions-links.php b/wp-includes/template-functions-links.php
index 923a3af25..ebd2ea36e 100644
--- a/wp-includes/template-functions-links.php
+++ b/wp-includes/template-functions-links.php
@@ -102,19 +102,19 @@ function get_page_link($id = false) {
}
function get_year_link($year) {
- global $querystring_start, $querystring_equal, $wp_rewrite;
+ global $wp_rewrite;
if (!$year) $year = gmdate('Y', time()+(get_settings('gmt_offset') * 3600));
$yearlink = $wp_rewrite->get_year_permastruct();
if (!empty($yearlink)) {
$yearlink = str_replace('%year%', $year, $yearlink);
return apply_filters('year_link', get_settings('home') . trailingslashit($yearlink), $year);
} else {
- return apply_filters('year_link', get_settings('home') .'/'. $querystring_start.'m'.$querystring_equal.$year, $year);
+ return apply_filters('year_link', get_settings('home') . '/?m=' . $year, $year);
}
}
function get_month_link($year, $month) {
- global $querystring_start, $querystring_equal, $wp_rewrite;
+ global $wp_rewrite;
if (!$year) $year = gmdate('Y', time()+(get_settings('gmt_offset') * 3600));
if (!$month) $month = gmdate('m', time()+(get_settings('gmt_offset') * 3600));
$monthlink = $wp_rewrite->get_month_permastruct();
@@ -123,12 +123,12 @@ function get_month_link($year, $month) {
$monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink);
return apply_filters('month_link', get_settings('home') . trailingslashit($monthlink), $year, $month);
} else {
- return apply_filters('month_link', get_settings('home') .'/'. $querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2), $year, $month);
+ return apply_filters('month_link', get_settings('home') . '/?m=' . $year . zeroise($month, 2), $year, $month);
}
}
function get_day_link($year, $month, $day) {
- global $querystring_start, $querystring_equal, $wp_rewrite;
+ global $wp_rewrite;
if (!$year) $year = gmdate('Y', time()+(get_settings('gmt_offset') * 3600));
if (!$month) $month = gmdate('m', time()+(get_settings('gmt_offset') * 3600));
if (!$day) $day = gmdate('j', time()+(get_settings('gmt_offset') * 3600));
@@ -140,7 +140,7 @@ function get_day_link($year, $month, $day) {
$daylink = str_replace('%day%', zeroise(intval($day), 2), $daylink);
return apply_filters('day_link', get_settings('home') . trailingslashit($daylink), $year, $month, $day);
} else {
- return apply_filters('day_link', get_settings('home') .'/'. $querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2).zeroise($day, 2), $year, $month, $day);
+ return apply_filters('day_link', get_settings('home') . '/?m=' . $year . zeroise($month, 2) . zeroise($day, 2), $year, $month, $day);
}
}
@@ -300,7 +300,6 @@ function next_post_link($format='%link »', $link='%title', $in_same_cat =
function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
global $id, $post, $wpdb;
global $posts, $posts_per_page, $s;
- global $querystring_start, $querystring_equal, $querystring_separator;
if(($posts_per_page == 1) || is_single()) {
@@ -403,11 +402,10 @@ function get_pagenum_link($pagenum = 1){
// lets see what sort of URL we have...
} else {
// we need to know the way queries are being written
- global $querystring_start, $querystring_equal, $querystring_separator;
// if there's a querystring_start (a "?" usually), it's deffinitely not mod_rewritten
- if ( stristr( $qstr, $querystring_start ) ){
+ if ( stristr( $qstr, '?' ) ){
// so append the query string (using &, since we already have ?)
- $qstr .= $querystring_separator.$page_querystring.$querystring_equal.$pagenum;
+ $qstr .= '&' . $page_querystring . '=' . $pagenum;
// otherwise, it could be rewritten, OR just the default index ...
} elseif( '' != get_settings('permalink_structure')) {
$permalink = 1;
@@ -425,7 +423,7 @@ function get_pagenum_link($pagenum = 1){
$qstr = trailingslashit($qstr) . $page_modstring . $pagenum;
} else {
- $qstr = $index . $querystring_start.$page_querystring.$querystring_equal.$pagenum;
+ $qstr = $index . '?' . $page_querystring . '=' . $pagenum;
}
}
@@ -436,7 +434,6 @@ function get_pagenum_link($pagenum = 1){
function next_posts($max_page = 0) { // original by cfactor at cooltux.org
global $paged, $pagenow;
- global $querystring_start, $querystring_equal, $querystring_separator;
if (! is_single()) {
if (!$paged) $paged = 1;
@@ -468,7 +465,6 @@ function next_posts_link($label='Next Page »', $max_page=0) {
function previous_posts() { // original by cfactor at cooltux.org
global $_SERVER, $paged, $pagenow;
- global $querystring_start, $querystring_equal, $querystring_separator;
if (! is_single()) {
$nextpage = intval($paged) - 1;
diff --git a/wp-includes/template-functions-post.php b/wp-includes/template-functions-post.php
index 01b781fb8..f4a4d10c4 100644
--- a/wp-includes/template-functions-post.php
+++ b/wp-includes/template-functions-post.php
@@ -170,7 +170,6 @@ function wp_link_pages($args = '') {
function link_pages($before='
', $after='
', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page', $pagelink='%', $more_file='') {
global $id, $page, $numpages, $multipage, $more;
global $pagenow;
- global $querystring_start, $querystring_equal, $querystring_separator;
if ($more_file != '') {
$file = $more_file;
} else {
@@ -184,9 +183,9 @@ function link_pages($before='
', $after='
', $next_or_number='number',
echo ' ';
if (($i != $page) || ((!$more) && ($page==1))) {
if ('' == get_settings('permalink_structure')) {
- echo '';
+ echo '';
} else {
- echo '';
+ echo '';
}
}
echo $j;
@@ -200,15 +199,15 @@ function link_pages($before='
', $after='
', $next_or_number='number',
$i=$page-1;
if ($i && $more) {
if ('' == get_settings('permalink_structure')) {
- echo ''.$previouspagelink.'';
+ echo ''.$previouspagelink.'';
} else {
- echo ''.$previouspagelink.'';
+ echo ''.$previouspagelink.'';
}
}
$i=$page+1;
if ($i<=$numpages && $more) {
if ('' == get_settings('permalink_structure')) {
- echo ''.$nextpagelink.'';
+ echo ''.$nextpagelink.'';
} else {
echo ''.$nextpagelink.'';
}
diff --git a/wp-includes/vars.php b/wp-includes/vars.php
index 97ea2724c..1619576bb 100644
--- a/wp-includes/vars.php
+++ b/wp-includes/vars.php
@@ -9,9 +9,6 @@ if (preg_match('#([^/]+.php)#', $PHP_SELF, $self_matches)) {
$pagenow = trim($pagenow[(sizeof($pagenow)-1)]);
$pagenow = explode('?', $pagenow);
$pagenow = $pagenow[0];
- if (($querystring_start == '/') && ($pagenow != 'post.php')) {
- $pagenow = get_settings('siteurl') . '/';
- }
} else {
$pagenow = 'index.php';
}
diff --git a/wp-settings.php b/wp-settings.php
index aa351ed51..c1309e5df 100644
--- a/wp-settings.php
+++ b/wp-settings.php
@@ -88,9 +88,6 @@ require (ABSPATH . WPINC . '/kses.php');
require (ABSPATH . WPINC . '/version.php');
if (!strstr($_SERVER['PHP_SELF'], 'install.php') && !strstr($_SERVER['PHP_SELF'], 'wp-admin/import')) :
- $querystring_start = '?';
- $querystring_equal = '=';
- $querystring_separator = '&';
// Used to guarantee unique hash cookies
$cookiehash = md5(get_settings('siteurl')); // Remove in 1.4