FeedWordPress_Walker_Category_Checklist::set_prefix PHP Method

set_prefix() public method

* FeedWordPress_Walker_Category_Checklist::__construct ()
public set_prefix ( $prefix )
    function set_prefix($prefix)
    {
        $this->prefix = $prefix;
    }

Usage Example

Esempio n. 1
0
function fwp_category_checklist($post_id = 0, $descendents_and_self = 0, $selected_cats = false, $params = array())
{
    if (is_string($params)) {
        $prefix = $params;
        $taxonomy = 'category';
    } elseif (is_array($params)) {
        $prefix = isset($params['prefix']) ? $params['prefix'] : '';
        $taxonomy = isset($params['taxonomy']) ? $params['taxonomy'] : 'category';
    }
    $walker = new FeedWordPress_Walker_Category_Checklist($params);
    $walker->set_prefix($prefix);
    $walker->set_taxonomy($taxonomy);
    wp_terms_checklist($post_id, array('taxonomy' => $taxonomy, 'descendents_and_self' => $descendents_and_self, 'selected_cats' => $selected_cats, 'popular_cats' => false, 'walker' => $walker, 'checked_ontop' => true));
}
All Usage Examples Of FeedWordPress_Walker_Category_Checklist::set_prefix
FeedWordPress_Walker_Category_Checklist