Template tag for category_description and set $cat if you have category_name thing going on. Space out options screen.
git-svn-id: http://svn.automattic.com/wordpress/trunk@643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
723bae7219
commit
42db9e2708
|
@ -169,6 +169,7 @@ if ('' != $category_name) {
|
||||||
$category_name = preg_replace('|[^a-z0-9-/]|', '', $category_name);
|
$category_name = preg_replace('|[^a-z0-9-/]|', '', $category_name);
|
||||||
$join = " LEFT JOIN $tablepost2cat ON ($tableposts.ID = $tablepost2cat.post_id) LEFT JOIN $tablecategories ON ($tablepost2cat.category_id = $tablecategories.cat_ID) ";
|
$join = " LEFT JOIN $tablepost2cat ON ($tableposts.ID = $tablepost2cat.post_id) LEFT JOIN $tablecategories ON ($tablepost2cat.category_id = $tablecategories.cat_ID) ";
|
||||||
$whichcat = " AND (category_nicename = '$category_name') ";
|
$whichcat = " AND (category_nicename = '$category_name') ";
|
||||||
|
$cat = $wpdb->get_var("SELECT cat_ID FROM $tablecategories WHERE category_nicename = '$category_name'");
|
||||||
}
|
}
|
||||||
|
|
||||||
// author stuff
|
// author stuff
|
||||||
|
|
|
@ -1226,7 +1226,7 @@ function posts_nav_link($sep=' :: ', $prelabel='<< Previous Page', $nxtlabel='Ne
|
||||||
function get_the_category() {
|
function get_the_category() {
|
||||||
global $post, $tablecategories, $tablepost2cat, $wpdb;
|
global $post, $tablecategories, $tablepost2cat, $wpdb;
|
||||||
$categories = $wpdb->get_results("
|
$categories = $wpdb->get_results("
|
||||||
SELECT category_id, cat_name, category_nicename
|
SELECT category_id, cat_name, category_nicename, category_description
|
||||||
FROM $tablecategories, $tablepost2cat
|
FROM $tablecategories, $tablepost2cat
|
||||||
WHERE $tablepost2cat.category_id = cat_ID AND $tablepost2cat.post_id = $post->ID
|
WHERE $tablepost2cat.category_id = cat_ID AND $tablepost2cat.post_id = $post->ID
|
||||||
");
|
");
|
||||||
|
@ -1323,6 +1323,14 @@ function the_category_head($before='', $after='') {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function category_description($category = 0) {
|
||||||
|
global $cat, $wpdb, $tablecategories;
|
||||||
|
if (!$category) $category = $cat;
|
||||||
|
$category_description = $wpdb->get_var("SELECT category_description FROM $tablecategories WHERE cat_ID = $category");
|
||||||
|
$category_description = apply_filters('category_description', $category_description);
|
||||||
|
return $category_description;
|
||||||
|
}
|
||||||
|
|
||||||
// out of the b2 loop
|
// out of the b2 loop
|
||||||
function dropdown_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc',
|
function dropdown_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc',
|
||||||
$optiondates = 0, $optioncount = 0, $hide_empty = 1) {
|
$optiondates = 0, $optioncount = 0, $hide_empty = 1) {
|
||||||
|
|
|
@ -269,9 +269,12 @@ foreach($wpsmiliestrans as $smiley => $img) {
|
||||||
$wp_smiliesreplace[] = " <img src='$smilies_directory/$img' alt='$smiley_masked' />";
|
$wp_smiliesreplace[] = " <img src='$smilies_directory/$img' alt='$smiley_masked' />";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Some default filters
|
||||||
add_filter('all', 'wptexturize');
|
add_filter('all', 'wptexturize');
|
||||||
add_filter('the_content', 'wpautop');
|
add_filter('the_content', 'wpautop');
|
||||||
add_filter('comment_text', 'wpautop');
|
add_filter('comment_text', 'wpautop');
|
||||||
|
|
||||||
// Uncomment the following for Textile support
|
// Uncomment the following for Textile support
|
||||||
// include_once('textile.php');
|
// include_once('textile.php');
|
||||||
// add_filter('the_content', 'textile');
|
// add_filter('the_content', 'textile');
|
||||||
|
|
Loading…
Reference in New Issue