[ Index ]

PHP Cross Reference of zeList

title

Body

[close]

/includes/ -> link-category.php (summary)

(no description)

File Size: 502 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 17 functions

  zelist_single_cat_title()
  single_link_cat_title()
  get_link_category_by_path()
  get_the_link_category_by_ID()
  get_link_category_link()
  link_category_link()
  zelist_check_categories_taxonomy()
  get_link_category_parents()
  get_link_category_by_slug()
  get_link_category_by_name()
  get_link_category()
  get_the_link_category()
  zelist_filter_get_terms()
  _hack_pad_term_counts()
  get_link_category_to_edit()
  wp_get_link_categories()
  _update_link_category_term_count()

Functions
Functions that are not part of a class:

zelist_single_cat_title($category)   X-Ref
Return title for a link category

param: $category
return: unknown_type

single_link_cat_title($prefix = '', $display = true )   X-Ref
Display or retrieve page title for link category archive.

This is useful for category template file or files, because it is optimized
for category page title and with less overhead than {@link wp_title()}.

It does not support placing the separator after the title, but by leaving the
prefix parameter empty, you can set the title separator manually. The prefix
does not automatically place a space between the prefix, so if there should
be a space, the parameter value will need to have it at the end.

param: string $prefix Optional. What to display before the title.
param: bool $display Optional, default is true. Whether to display or retrieve title.
return: string|null Title when retrieving, null when displaying or failure.

get_link_category_by_path( $link_category_path, $full_match = true, $output = OBJECT )   X-Ref
Retrieve link_category based on URL containing the link_category slug.

Breaks the $link_category_path parameter up to get the link_category slug.

Tries to find the child path and will return it. If it doesn't find a
match, then it will return the first link_category matching slug, if $full_match,
is set to false. If it does not, then it will return null.

It is also possible that it will return a WP_Error object on failure. Check
for it when using this function.

param: string $link_category_path URL containing link_category slugs.
param: bool $full_match Optional. Whether should match full path or not.
param: string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
return: null|object|array Null on failure. Type is based on $output value.

get_the_link_category_by_ID( $cat_ID )   X-Ref
Retrieve category name based on category ID.

param: int $cat_ID Category ID.
return: string Category name.

get_link_category_link( $category_id )   X-Ref
Retrieve link category link URL.

param: int $category_id Category ID.
return: string

link_category_link($catlink, $category_id )   X-Ref
Retrieve link to a link category. REMOVED due to messing with regular categories links

param: $catlink
param: $category_id
return: unknown_type

zelist_check_categories_taxonomy($taxonomy,$args)   X-Ref
The worst hack ever, due to missing hooks during wp_list_categories
Used by link_category_link filter

param: $taxonomy
param: $args
return: $taxonomy (unchanged)

get_link_category_parents( $id, $link = false, $separator = '/', $nicename = false, $visited = array()   X-Ref
Retrieve category parents with separator.

param: int $id Category ID.
param: bool $link Optional, default is false. Whether to format with link.
param: string $separator Optional, default is '/'. How to separate categories.
param: bool $nicename Optional, default is false. Whether to use nice name for display.
param: array $visited Optional. Already linked to categories to prevent duplicates.
return: string

get_link_category_by_slug( $slug )   X-Ref
Retrieve link category object by category slug.

param: string $slug The category slug.
return: object Category data object

get_link_category_by_name($name)   X-Ref
Retrieve link category object by category name

param: $name
return: unknown_type

get_link_category( $category, $output = OBJECT, $filter = 'raw' )   X-Ref
Retrieves link category data given a category ID or category object.

If you pass the $category parameter an object, which is assumed to be the
category row object retrieved the database. It will cache the category data.

If you pass $category an integer of the category ID, then that category will
be retrieved from the database, if it isn't already cached, and pass it back.

If you look at get_term(), then both types will be passed through several
filters and finally sanitized based on the $filter parameter value.

The category will converted to maintain backwards compatibility.

param: int|object $category Category ID or Category row object
param: string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
param: string $filter Optional. Default is raw or no WordPress defined filter will applied.
return: mixed Category data in type defined by $output parameter.

get_the_link_category( $id = false )   X-Ref
Retrieve link categories.

param: int $id Optional, default to current post ID. The post ID.
return: array

zelist_filter_get_terms($terms, $taxonomies = '', $args = '')   X-Ref
Hack some sense into get_categories for link_categories

param: $terms
param: $taxonomies
param: $args
return: $terms

_hack_pad_term_counts(&$terms, $taxonomy)   X-Ref
Add count of children to parent count, works with all hierarchical taxonomies

Recalculates term counts by including items from child terms. Assumes all
relevant children are already in the $terms argument.

param: array $terms List of Term IDs
param: string $taxonomy Term Context
return: null Will break from function if conditions are not met.

get_link_category_to_edit( $id )   X-Ref
Returns a link category with edit context

param: $id
return: unknown_type

wp_get_link_categories( $link_id = 0, $args = array()   X-Ref
Retrieve the list of categories for a link.

Compatibility layer for themes and plugins. Also an easy layer of abstraction
away from the complexity of the taxonomy layer.

param: int $link_id Optional. The link ID.
param: array $args Optional. Overwrite the defaults.
return: array

_update_link_category_term_count( $terms )   X-Ref
Will update link category count based on links.

Private function for the default callback for link_tag and category
taxonomies.

param: array $terms List of Term taxonomy IDs



Generated: Sat May 30 23:51:06 2009 Cross-referenced by PHPXref 0.7