Make WordPress Core


Ignore:
Timestamp:
02/17/2004 04:56:29 AM (22 years ago)
Author:
saxmatt
Message:

Refactoring of template tags to use filters, use TABS (!!!), and general cleanliness, which is next to godliness. Some get_settings improvements, less globals.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-category.php

    r873 r885  
    104104        $category->cat_name = stripslashes(convert_chars($category->cat_name));
    105105        if ('rdf' == $type) {
    106             echo "\n<dc:subject>$category->cat_name</dc:subject>";
     106            echo "\n\t<dc:subject>$category->cat_name</dc:subject>";
    107107        } else {
    108             echo "\n<category>$category->cat_name</category>";
    109         }
    110     }
    111 
    112 }
    113 function the_category_unicode() {
    114     $category = get_the_category();
    115     $category = apply_filters('the_category_unicode', $category);
    116     echo convert_chars($category, 'unicode');
     108            echo "\n\t<category>$category->cat_name</category>";
     109        }
     110    }
     111
    117112}
    118113
     
    128123}
    129124
    130 function get_category_parents($id, $link=FALSE, $separator=' / ', $nicename=FALSE){
     125function get_category_parents($id, $link = FALSE, $separator = '/', $nicename = FALSE){
    131126    global $tablecategories, $cache_categories;
    132127    $chain = "";
     
    146141}
    147142
    148 function get_category_children($id, $before=' / ', $after='') {
     143function get_category_children($id, $before = '/', $after = '') {
    149144    global $tablecategories, $cache_categories;
    150     $c_cache=$cache_categories; // Can't do recursive foreach on a global, have to make a copy
    151     $chain = "";
     145    $c_cache = $cache_categories; // Can't do recursive foreach on a global, have to make a copy
     146    $chain = '';
    152147    foreach ($c_cache as $category){
    153148        if ($category->category_parent == $id){
     
    159154}
    160155
    161 function the_category_ID($echo=true) {
     156function the_category_ID($echo = true) {
    162157    global $post;
    163158    if ($echo)
Note: See TracChangeset for help on using the changeset viewer.