- Timestamp:
- 08/10/2004 05:35:59 AM (21 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
-
wp-admin/categories.php (modified) (2 diffs)
-
wp-admin/edit-comments.php (modified) (1 diff)
-
wp-admin/edit.php (modified) (1 diff)
-
wp-admin/moderation.php (modified) (1 diff)
-
wp-admin/post.php (modified) (4 diffs)
-
wp-blog-header.php (modified) (1 diff)
-
wp-includes/classes.php (modified) (1 diff)
-
wp-includes/functions.php (modified) (6 diffs)
-
wp-includes/template-functions-category.php (modified) (1 diff)
-
wp-includes/template-functions-links.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/categories.php
r1494 r1527 94 94 <ul id="adminmenu2"> 95 95 <li><a href="edit.php"><?php _e('Posts') ?></a></li> 96 <li><a href="edit-pages.php"><?php _e('Pages') ?></a></li> 96 97 <li><a href="categories.php" class="current"><?php _e('Categories') ?></a></li> 97 98 <li><a href="edit-comments.php"><?php _e('Comments') ?></a></li> … … 154 155 <ul id="adminmenu2"> 155 156 <li><a href="edit.php"><?php _e('Posts') ?></a></li> 157 <li><a href="edit-pages.php"><?php _e('Pages') ?></a></li> 156 158 <li><a class="current"><?php _e('Categories') ?></a></li> 157 159 <li><a href="edit-comments.php"><?php _e('Comments') ?></a></li> -
trunk/wp-admin/edit-comments.php
r1494 r1527 10 10 <ul id="adminmenu2"> 11 11 <li><a href="edit.php"><?php _e('Posts') ?></a></li> 12 <li><a href="edit-pages.php"><?php _e('Pages') ?></a></li> 12 13 <li><a href="categories.php"><?php _e('Categories') ?></a></li> 13 14 <li><a href="edit-comments.php" class="current"><?php _e('Comments') ?></a></li> -
trunk/wp-admin/edit.php
r1494 r1527 8 8 <ul id="adminmenu2"> 9 9 <li><a href="edit.php" class="current"><?php _e('Posts') ?></a></li> 10 <li><a href="edit-pages.php"><?php _e('Pages') ?></a></li> 10 11 <li><a href="categories.php"><?php _e('Categories') ?></a></li> 11 12 <li><a href="edit-comments.php"><?php _e('Comments') ?></a></li> -
trunk/wp-admin/moderation.php
r1494 r1527 100 100 <ul id="adminmenu2"> 101 101 <li><a href="edit.php"> <?php _e('Posts') ?></a></li> 102 <li><a href="edit-pages.php"><?php _e('Pages') ?></a></li> 102 103 <li><a href="categories.php"><?php _e('Categories') ?></a></li> 103 104 <li><a href="edit-comments.php"> <?php _e('Comments') ?></a></li> -
trunk/wp-admin/post.php
r1512 r1527 108 108 if ('' != $_POST['publish']) $post_status = 'publish'; 109 109 if ('' != $_POST['advanced']) $post_status = 'draft'; 110 110 if ('' != $_POST['savepage']) $post_status = 'static'; 111 111 112 112 if((get_settings('use_geo_positions')) && (strlen($latstr) > 2) && (strlen($lonstr) > 2) ) { … … 143 143 if ( '' != $_POST['advanced'] || isset($_POST['save']) ) 144 144 $location = "post.php?action=edit&post=$post_ID"; 145 146 if ( '' != $_POST['savepage'] ) 147 $location = "post.php?action=createpage"; 145 148 146 149 header("Location: $location"); // Send user on their way while we keep working … … 234 237 $post_name = $postdata->post_name; 235 238 236 include('edit-form-advanced.php'); 239 if ($post_status == 'static') { 240 include('edit-page-form.php'); 241 } else { 242 include('edit-form-advanced.php'); 243 } 237 244 238 245 $post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = '$post_ID'"); … … 712 719 do_action('edit_comment', $comment_ID); 713 720 break; 721 722 case 'createpage': 723 $standalone = 0; 724 $title = __('Create New Page'); 725 require_once ('./admin-header.php'); 726 727 if ($user_level > 0) { 728 $action = 'post'; 729 get_currentuserinfo(); 730 //set defaults 731 $post_status = 'static'; 732 $comment_status = get_settings('default_comment_status'); 733 $ping_status = get_settings('default_ping_status'); 734 $post_pingback = get_settings('default_pingback_flag'); 735 $default_post_cat = get_settings('default_post_category'); 736 737 include('edit-page-form.php'); 738 } else { 739 ?> 740 <div class="wrap"> 741 <p><?php printf(__('Since you’re a newcomer, you’ll have to wait for an admin to raise your level to 1, in order to be authorized to post.<br /> 742 You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br /> 743 When you’re promoted, just reload this page and you’ll be able to blog. :)'), get_settings('admin_email')); ?> 744 </p> 745 </div> 746 <?php 747 748 } 749 750 break; 714 751 715 752 default: -
trunk/wp-blog-header.php
r1516 r1527 51 51 } 52 52 53 $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' );53 $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'); 54 54 55 55 for ($i=0; $i<count($wpvarstoreset); $i += 1) { -
trunk/wp-includes/classes.php
r1516 r1527 455 455 $distinct = 'DISTINCT'; 456 456 } 457 $where .= ' AND (post_status = "publish"'; 457 458 if ('' != $q['static']) { 459 $where .= ' AND (post_status = "static"'; 460 } else { 461 $where .= ' AND (post_status = "publish"'; 462 } 458 463 459 464 // Get private posts 460 465 if (isset($user_ID) && ('' != intval($user_ID))) 461 $where .= " OR post_author = $user_ID AND post_status != 'draft' )";466 $where .= " OR post_author = $user_ID AND post_status != 'draft' AND post_status != 'static')"; 462 467 else 463 468 $where .= ')'; -
trunk/wp-includes/functions.php
r1523 r1527 1176 1176 } 1177 1177 1178 1179 function page_permastruct() { 1180 $permalink_structure = get_settings('permalink_structure'); 1181 1182 if (empty($permalink_structure)) { 1183 return ''; 1184 } 1185 1186 $front = substr($permalink_structure, 0, strpos($permalink_structure, '%')); 1187 $index = get_settings('blogfilename'); 1188 $prefix = ''; 1189 if (preg_match('#^/*' . $index . '#', $front)) { 1190 $prefix = $index . '/'; 1191 } 1192 1193 return '/' . $prefix . 'site/%pagename%'; 1194 } 1195 1178 1196 function generate_rewrite_rules($permalink_structure = '', $matches = '') { 1179 1197 $rewritecode = … … 1188 1206 '%post_id%', 1189 1207 '%category%', 1190 '%author%' 1208 '%author%', 1209 '%pagename%' 1191 1210 ); 1192 1211 … … 1202 1221 '([0-9]+)', 1203 1222 '([/_0-9a-z-]+)', 1204 '([_0-9a-z-]+)' 1223 '([_0-9a-z-]+)', 1224 '([_0-9a-z-]+)', 1205 1225 ); 1206 1226 … … 1216 1236 'p=', 1217 1237 'category_name=', 1218 'author_name=' 1238 'author_name=', 1239 'static=1&name=', 1219 1240 ); 1220 1241 … … 1356 1377 $author_rewrite = generate_rewrite_rules($author_structure, $matches); 1357 1378 1379 // Site static pages 1380 $page_structure = $prefix . 'site/%pagename%'; 1381 $page_rewrite = generate_rewrite_rules($page_structure, $matches); 1382 1358 1383 // Put them together. 1359 $rewrite = $site_rewrite + $ category_rewrite + $author_rewrite;1384 $rewrite = $site_rewrite + $page_rewrite + $category_rewrite + $author_rewrite; 1360 1385 1361 1386 // Add on archive rewrite rules if needed. … … 1465 1490 WHERE category_id = cat_ID AND post_id = ID AND post_id IN ($post_id_list)"); 1466 1491 1467 foreach ($dogs as $catt) { 1468 $category_cache[$catt->ID][] = $catt; 1492 if (!empty($dogs)) { 1493 foreach ($dogs as $catt) { 1494 $category_cache[$catt->ID][] = $catt; 1495 } 1469 1496 } 1470 1497 -
trunk/wp-includes/template-functions-category.php
r1486 r1527 65 65 function the_category($seperator = '', $parents='') { 66 66 $categories = get_the_category(); 67 if (empty($categories)) { 68 _e('Uncategorized'); 69 return; 70 } 71 67 72 $thelist = ''; 68 73 if ('' == $seperator) { -
trunk/wp-includes/template-functions-links.php
r1514 r1527 40 40 '%postname%', 41 41 '%post_id%', 42 '%category%' 42 '%category%', 43 '%pagename%' 43 44 ); 44 45 45 46 if ($id) { 46 $idpost = $wpdb->get_row("SELECT ID, post_date, post_name FROM $wpdb->posts WHERE ID = $id");47 $idpost = $wpdb->get_row("SELECT ID, post_date, post_name, post_status FROM $wpdb->posts WHERE ID = $id"); 47 48 } else { 48 49 $idpost = $post; 49 50 } 50 51 if ('' != get_settings('permalink_structure')) { 51 52 $permalink = get_settings('permalink_structure'); 53 54 if ('' != $permalink) { 55 if ($idpost->post_status == 'static') { 56 $permalink = page_permastruct(); 57 } 58 52 59 $unixtime = strtotime($idpost->post_date); 53 60 … … 64 71 $idpost->post_name, 65 72 $idpost->ID, 66 $category 73 $category, 74 $idpost->post_name, 67 75 ); 68 return get_settings('home') . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure'));76 return get_settings('home') . str_replace($rewritecode, $rewritereplace, $permalink); 69 77 } else { // if they're not using the fancy permalink option 70 return get_settings('home') . '/' . get_settings('blogfilename').$querystring_start.'p'.$querystring_equal.$idpost->ID; 78 $permalink = get_settings('home') . '/' . get_settings('blogfilename').$querystring_start.'p'.$querystring_equal.$idpost->ID; 79 if ($idpost->post_status == 'static') { 80 $permalink .= $querystring_separator . "static=1"; 81 } 71 82 } 72 83 }
Note: See TracChangeset
for help on using the changeset viewer.