Edit permalink in place. Fixes #5679. Hat tip: nbachiyski.

git-svn-id: https://develop.svn.wordpress.org/trunk@6633 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2008-01-17 16:51:32 +00:00
parent 2b0713315f
commit 098e6672e4
7 changed files with 114 additions and 5 deletions
+3 -3
View File
@@ -43,7 +43,7 @@ function permalink_anchor($mode = 'id') {
}
function get_permalink($id = 0) {
function get_permalink($id = 0, $leavename=false) {
$rewritecode = array(
'%year%',
'%monthnum%',
@@ -51,11 +51,11 @@ function get_permalink($id = 0) {
'%hour%',
'%minute%',
'%second%',
'%postname%',
$leavename? '' : '%postname%',
'%post_id%',
'%category%',
'%author%',
'%pagename%'
$leavename? '' : '%pagename%',
);
$post = &get_post($id);