WordPress.org

Forums

FeedWordPress
Make use of walker-category-checklist? (5 posts)

  1. 3x7
    Member
    Posted 2 years ago #

    Hi,

    If I understand corectly file feedwordpress-walker-category-checklist.class.php is some kind of function for selecting multiple categories and taxonomies?

    How to make use of it?

    Thanks

    http://wordpress.org/extend/plugins/feedwordpress/

  2. Daedalon
    Member
    Posted 2 years ago #

    This might be helpful: http://phpdoc.wordpress.org/trunk/WordPress/Administration/Walker_Category_Checklist.html

    Walker to output an unordered list of category checkbox <input> elements.

    see: wp_terms_checklist()
    see: wp_category_checklist()
    see: Walker
    since: 2.5.1

    Located in /wp-admin/includes/template.php (line 23)

  3. uday.dahale
    Member
    Posted 2 years ago #

    Hi DAedalon,

    Sorry for my english....

    Could I VAlidation for the Category check list.

    Please I want the mandatory of category fields.

    please fix my issue.

    regards,

    uday

  4. Daedalon
    Member
    Posted 2 years ago #

    Sorry, I am not currently using the plugin and am not that familiar with it. Hopefully someone more experienced with it can help you out.

    You should consider opening a new thread on this plugin's forum if your issue is different than what the first post is about.

  5. uday.dahale
    Member
    Posted 2 years ago #

    thank you very much for reply DAedalon

    The check list come from template.php file.

    code is:
    function start_el( &$output, $category, $depth, $args, $id = 0 ) {
    extract($args);
    if ( empty($taxonomy) )
    $taxonomy = 'category';

    if ( $taxonomy == 'category' )
    $name = 'post_category';
    else
    $name = 'tax_input['.$taxonomy.']';

    $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : '';

    if($category->tax_order != '0'){

    //echo $category->tax_order;
    $checka= "in-".$taxonomy."-" .$category->term_id."
    ";

    $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>';
    }

    }

    I want these field is mandatory.
    Please tell me how????

    help me please.

    regards,

    uday

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • FeedWordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.