Changeset 1527 for trunk/wp-includes/template-functions-links.php
- Timestamp:
- 08/10/2004 05:35:59 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/template-functions-links.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)