Make WordPress Core

Changeset 1759


Ignore:
Timestamp:
10/08/2004 08:06:21 AM (22 years ago)
Author:
rboren
Message:

Use page_id=xx instead of p=xx&static=1

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-blog-header.php

    r1753 r1759  
    8080 }
    8181
    82 $wpvarstoreset = array('m','p','posts','w', 'cat','withcomments','s','search','exact', 'sentence','poststart','postend','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name', 'static', 'pagename', 'error');
     82$wpvarstoreset = array('m','p','posts','w', 'cat','withcomments','s','search','exact', 'sentence','poststart','postend','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error');
    8383
    8484for ($i=0; $i<count($wpvarstoreset); $i += 1) {
  • trunk/wp-includes/classes.php

    r1728 r1759  
    6666                }
    6767
     68                if ('' != $qv['static'] || '' != $qv['pagename'] || '' != $qv['page_id']) {
     69                        $this->is_page = true;
     70                        $this->is_single = false;
     71                }
     72
    6873                if ('' != $qv['second']) {
    6974                        $this->is_time = true;
     
    144149                }
    145150           
    146                 // single, date, and search override category.
    147                 if ($this->is_single || $this->is_date || $this->is_search) {
     151                // single, page, date, and search override category.
     152                if ($this->is_single || $this->is_page || $this->is_date || $this->is_search) {
    148153                        $this->is_category = false;               
    149154                }
     
    161166                if ('' != $qv['feed']) {
    162167                        $this->is_feed = true;
    163                 }
    164 
    165                 if ('' != $qv['static'] || '' != $qv['pagename']) {
    166                         $this->is_page = true;
    167                         $this->is_single = false;
    168168                }
    169169
     
    268268                        $where .= " AND post_name = '" . $q['name'] . "'";
    269269                } else if ('' != $q['pagename']) {
    270                         // If pagename is set, set static to true and set name to pagename.
    271270                        $q['pagename'] = sanitize_title($q['pagename']);
    272271                        $q['name'] = $q['pagename'];
    273                         $q['static'] = true;
    274272                        $where .= " AND post_name = '" . $q['pagename'] . "'";
    275273                }
     
    285283                        $q['p'] = intval($q['p']);
    286284                        $where = ' AND ID = '.$q['p'];
     285                }
     286
     287                if (($q['page_id'] != '') && ($q['page_id'] != 'all')) {
     288                        $q['page_id'] = intval($q['page_id']);
     289                        $q['p'] = $q['page_id'];
     290                        $where = ' AND ID = '.$q['page_id'];
    287291                }
    288292
     
    456460                }
    457461
    458                 if ('' != $q['static']) {
     462                if (is_page()) {
    459463                        $where .= ' AND (post_status = "static"';
    460464                } else {
  • trunk/wp-includes/template-functions-links.php

    r1752 r1759  
    9797                $link = get_settings('home') . "/$link/";
    9898        } else {
    99                 $link = get_settings('home') . "/index.php?p=$id&static=1";
     99                $link = get_settings('home') . "/index.php?page_id=$id";
    100100        }
    101101
Note: See TracChangeset for help on using the changeset viewer.