Edit permalink in place. Fixes #5679. Hat tip: nbachiyski.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user