Changeset 3581
- Timestamp:
- 03/01/2006 07:08:04 AM (20 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
wp-admin/options-reading.php (modified) (2 diffs)
-
wp-admin/upgrade-functions.php (modified) (1 diff)
-
wp-admin/upgrade-schema.php (modified) (1 diff)
-
wp-includes/classes.php (modified) (3 diffs)
-
wp-includes/version.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-reading.php
r3541 r3581 10 10 <div class="wrap"> 11 11 <h2><?php _e('Reading Options') ?></h2> 12 <form name="form1" method="post" action="options.php"> 12 <form name="form1" method="post" action="options.php"> 13 14 <?php if ( get_pages() ): ?> 15 <fieldset class="options"> 16 <legend><?php _e('Front Page') ?></legend> 17 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 18 <tr valign="top"> 19 <th width="33%" scope="row"></th> 20 <td> 21 <p> 22 <label> 23 <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked('posts', get_option('show_on_front')); ?> /> 24 <?php _e('Show the latest posts on the front page'); ?> 25 </label> 26 </p> 27 <p> 28 <label> 29 <input name="show_on_front" type="radio" value="page" class="tog" <?php checked('page', get_option('show_on_front')); ?> /> 30 <?php printf(__('Show another <a href="%s">page</a> on the front page (Select below)'), 'edit-pages.php'); ?> 31 </label> 32 </p> 33 <p> 34 <?php printf(__('Show this page on the front page: %s'), wp_dropdown_pages("name=page_on_front&echo=0&selected=" . get_option('page_on_front'))); ?><br /> 35 <?php printf(__('Show the latest posts on this page: %s'), wp_dropdown_pages("name=page_for_posts&echo=0&selected=" . get_option('page_for_posts'))); ?> 36 </p> 37 </td> 38 </tr> 39 </table> 40 </fieldset> 41 <?php endif; ?> 42 13 43 <fieldset class="options"> 14 44 <legend><?php _e('Blog Pages') ?></legend> … … 56 86 <p class="submit"> 57 87 <input type="hidden" name="action" value="update" /> 58 <input type="hidden" name="page_options" value="posts_per_page,what_to_show,posts_per_rss,rss_use_excerpt,blog_charset,gzipcompression " />88 <input type="hidden" name="page_options" value="posts_per_page,what_to_show,posts_per_rss,rss_use_excerpt,blog_charset,gzipcompression,show_on_front,page_on_front,page_for_posts" /> 59 89 <input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /> 60 90 </p> -
trunk/wp-admin/upgrade-functions.php
r3570 r3581 35 35 upgrade_160(); 36 36 37 if ( $wp_current_db_version < 35 70)37 if ( $wp_current_db_version < 3582 ) 38 38 upgrade_210(); 39 39 -
trunk/wp-admin/upgrade-schema.php
r3570 r3581 243 243 add_option('blog_public', 1); 244 244 add_option('default_link_category', 2); 245 add_option('show_on_front', 'posts'); 245 246 246 247 // Delete unused options -
trunk/wp-includes/classes.php
r3576 r3581 294 294 } 295 295 296 if ( $this->is_home && ( 'page' == get_option('show_on_front') ) && get_option('page_on_front') ) { 297 $this->is_page = true; 298 $this->is_home = false; 299 $q['page_id'] = get_option('page_on_front'); 300 } 301 296 302 if (isset($q['page'])) { 297 303 $q['page'] = trim($q['page'], '/'); … … 364 370 else 365 371 $reqpage = 0; 366 $q['pagename'] = str_replace('%2F', '/', urlencode(urldecode($q['pagename']))); 367 $page_paths = '/' . trim($q['pagename'], '/'); 368 $q['pagename'] = sanitize_title(basename($page_paths)); 369 $q['name'] = $q['pagename']; 370 371 $where .= " AND (ID = '$reqpage')"; 372 373 if ( ('page' == get_option('show_on_front') ) && ( $reqpage == get_option('page_for_posts') ) ) { 374 $this->is_page = false; 375 $this->is_home = true; 376 } else { 377 $q['pagename'] = str_replace('%2F', '/', urlencode(urldecode($q['pagename']))); 378 $page_paths = '/' . trim($q['pagename'], '/'); 379 $q['pagename'] = sanitize_title(basename($page_paths)); 380 $q['name'] = $q['pagename']; 381 $where .= " AND (ID = '$reqpage')"; 382 } 372 383 } elseif ('' != $q['attachment']) { 373 384 $q['attachment'] = str_replace('%2F', '/', urlencode(urldecode($q['attachment']))); … … 398 409 if (($q['page_id'] != '') && (intval($q['page_id']) != 0)) { 399 410 $q['page_id'] = intval($q['page_id']); 400 $q['p'] = $q['page_id']; 401 $where = ' AND ID = '.$q['page_id']; 411 if ( ('page' == get_option('show_on_front') ) && ( $q['page_id'] == get_option('page_for_posts') ) ) { 412 $this->is_page = false; 413 $this->is_home = true; 414 } else { 415 $q['p'] = $q['page_id']; 416 $where = ' AND ID = '.$q['page_id']; 417 } 402 418 } 403 419 -
trunk/wp-includes/version.php
r3570 r3581 4 4 5 5 $wp_version = '2.1-alpha1'; 6 $wp_db_version = 35 70;6 $wp_db_version = 3582; 7 7 8 8 ?>
Note: See TracChangeset
for help on using the changeset viewer.