[wp-cvs] wordpress/wp-includes template-functions-links.php, 1.26,
1.27
Ryan Boren
rboren at users.sourceforge.net
Sat Aug 14 17:29:11 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15760
Modified Files:
template-functions-links.php
Log Message:
Complete support for %author% in post permalinks.
Index: template-functions-links.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-links.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** template-functions-links.php 13 Aug 2004 15:00:45 -0000 1.26
--- template-functions-links.php 14 Aug 2004 17:29:09 -0000 1.27
***************
*** 41,49 ****
'%post_id%',
'%category%',
'%pagename%'
);
if ($id) {
! $idpost = $wpdb->get_row("SELECT ID, post_date, post_name, post_status FROM $wpdb->posts WHERE ID = $id");
} else {
$idpost = $post;
--- 41,50 ----
'%post_id%',
'%category%',
+ '%author%',
'%pagename%'
);
if ($id) {
! $idpost = $wpdb->get_row("SELECT ID, post_date, post_name, post_status, post_author FROM $wpdb->posts WHERE ID = $id");
} else {
$idpost = $post;
***************
*** 61,64 ****
--- 62,67 ----
$cats = get_the_category($idpost->ID);
$category = $cats[0]->category_nicename;
+ $authordata = get_userdata($idpost->post_author);
+ $author = $authordata->user_nicename;
$rewritereplace = array(
***************
*** 72,75 ****
--- 75,79 ----
$idpost->ID,
$category,
+ $author,
$idpost->post_name,
);
More information about the cvs
mailing list