Procedural File: _functions_cats.php
Source Location: /blogs/b2evocore/_functions_cats.php
Functions
void blog_has_cats(
$blog_ID
)
|
|
Parameters:
void cat_children(
$ccats, $blog_ID, $parent_ID, $callback_before_first, $callback_before_each, $callback_after_each, $callback_after_last, [ $level = 0]
)
|
|
Parameters:
|
|
$ccats: |
|
|
|
$blog_ID: |
|
|
|
$parent_ID: |
|
|
|
$callback_before_first: |
|
|
|
$callback_before_each: |
|
|
|
$callback_after_each: |
|
|
|
$callback_after_last: |
|
|
|
$level: |
|
void cat_create(
$cat_name, $cat_parent_ID, [ $cat_blog_ID = NULL]
)
|
|
cat_create(-)
Create a new category This funtion has to handle all needed DB dependencies!
fplanque: created
Parameters:
|
|
$cat_name: |
|
|
|
$cat_parent_ID: |
|
|
|
$cat_blog_ID: |
|
void cat_delete(
$cat_ID
)
|
|
Parameters:
cat_load_cache [line 290]
cat_load_postcats_cache [line 402]
void cat_load_postcats_cache(
)
|
|
void cat_update(
$cat_ID, $cat_name, [ $cat_parent_ID = 0], [ $cat_blog_ID = '']
)
|
|
Parameters:
|
|
$cat_ID: |
|
|
|
$cat_name: |
|
|
|
$cat_parent_ID: |
|
|
|
$cat_blog_ID: |
|
void get_catblog(
$cat_ID
)
|
|
Parameters:
void get_catname(
$cat_ID
)
|
|
Parameters:
void get_catparent(
$cat_ID
)
|
|
Parameters:
get_the_category [line 234]
get_the_category_by_ID [line 206]
void get_the_category_by_ID(
integer $cat_ID, [ $die = true], boolean die()
)
|
|
get_the_category_by_ID(-)
Get category name+blog_id for specified cat ID
fplanque: reused "R. U. Serious" optimization here fplanque: added blog ID stuff TODO: move. dis is not a template tag
Parameters:
|
boolean |
die(): |
if category does not exist? (default: true) |
|
integer |
$cat_ID: |
category ID |
|
|
$die: |
|
postcats_get_byID [line 449]
void postcats_get_byID(
$post_ID
)
|
|
Parameters:
single_cat_title [line 563]
void single_cat_title(
[string $prefix = '#'], [mixed $display = 'htmlbody']
)
|
|
Display currently filtered categories names
This tag is out of the b2 loop. It outputs the title of the category when you load the page with
?cat=
When the weblog page is loaded without ?cat=, this tag doesn't display anything. Generally, you could use this as a page title.fplanque: multiple category support (so it's not really 'single' anymore!)
Parameters:
|
string |
$prefix: |
Prefix to be displayed if something is going to be displayed |
|
mixed |
$display: |
Output format, see format_to_output() or false to return value instead of displaying it |
the_categories [line 625]
void the_categories(
[ $link_title = '#'], [ $before_main = '<strong>'], [ $after_main = '</strong>'], [ $before_other = ''], [ $after_other = ''], [ $before_external = '<em>'], [ $after_external = '</em>'], [ $separator = ', '], [ $format_each = 'raw'], [ $format_list = 'htmlbody']
)
|
|
the_categories(-)
lists all the category names
fplanque: created fplanque: 0.8.3: changed defaults
Parameters:
|
|
$link_title: |
|
|
|
$before_main: |
|
|
|
$after_main: |
|
|
|
$before_other: |
|
|
|
$after_other: |
|
|
|
$before_external: |
|
|
|
$after_external: |
|
|
|
$separator: |
|
|
|
$format_each: |
|
|
|
$format_list: |
|
API Tags:
the_categories_IDs [line 716]
void the_categories_IDs(
)
|
|
void the_category(
[ $format = 'htmlbody']
)
|
|
the_category(-)
echoes the main category name the name of the main category the post belongs to. you can as an admin add categories, and rename them if needed. default category is 'General', you can rename it too.
Parameters:
API Tags:
the_category_head [line 736]
void the_category_head(
[ $before = ''], [ $after = '']
)
|
|
Parameters:
the_category_ID [line 703]