← All changes
|
feedwordpress-walker-category-checklist.class.php
+8
-8
trunk
→
2011.0721
View file →
| @@ -12,16 +12,16 @@ | ||
| 12 | 12 | |
| 13 | 13 | class FeedWordPress_Walker_Category_Checklist extends Walker_Category_Checklist { |
| 14 | 14 | var $prefix = ''; var $taxonomy = 'category'; |
| 15 | 15 | var $checkbox_name = NULL; |
| 16 | - public function __construct ($params = array()) { | |
| 16 | + function FeedWordPress_Walker_Category_Checklist ($params = array()) { | |
| 17 | 17 | $this->set_taxonomy('category'); |
| 18 | - | |
| 18 | + | |
| 19 | 19 | if (isset($params['checkbox_name'])) : |
| 20 | 20 | $this->checkbox_name = $params['checkbox_name']; |
| 21 | 21 | endif; |
| 22 | - } /* FeedWordPress_Walker_Category_Checklist::__construct () */ | |
| 23 | - | |
| 22 | + } | |
| 23 | + | |
| 24 | 24 | function set_prefix ($prefix) { |
| 25 | 25 | $this->prefix = $prefix; |
| 26 | 26 | } |
| 27 | 27 | function set_taxonomy ($taxonomy) { |
| @@ -27,15 +27,15 @@ | ||
| 27 | 27 | function set_taxonomy ($taxonomy) { |
| 28 | 28 | $this->taxonomy = $taxonomy; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - function start_el (&$output, $category, $depth = 0, $args = array(), $id = 0) { | |
| 31 | + function start_el (&$output, $category, $depth, $args) { | |
| 32 | 32 | extract($args); |
| 33 | 33 | if ( empty($taxonomy) ) : |
| 34 | 34 | $taxonomy = 'category'; |
| 35 | - endif; | |
| 35 | + endif; | |
| 36 | 36 | |
| 37 | - if ( !is_null($this->checkbox_name)) : | |
| 37 | + if (!is_null($this->checkbox_name)) : | |
| 38 | 38 | $name = $this->checkbox_name; |
| 39 | 39 | elseif ($taxonomy=='category') : |
| 40 | 40 | $name = 'post_category'; |
| 41 | 41 | else : |
| @@ -40,9 +40,9 @@ | ||
| 40 | 40 | $name = 'post_category'; |
| 41 | 41 | else : |
| 42 | 42 | $name = 'tax_input['.$taxonomy.']'; |
| 43 | 43 | endif; |
| 44 | - | |
| 44 | + | |
| 45 | 45 | $unit = array(); |
| 46 | 46 | if (strlen($this->prefix) > 0) : |
| 47 | 47 | $unit[] = $this->prefix; |
| 48 | 48 | endif; |