PluginProbe
FeedWordPress / 2010.0602
FeedWordPress v2010.0602
trunk 0.8 0.9 0.91 0.95 0.96 0.97 0.98 0.981 0.99 0.991 0.992 0.993 2008.1030 2008.1101 2008.1105 2008.1214 2009.0612 2009.0613 2009.0618 2009.0707 2009.1111 2009.1112 2010.0127 2010.0528 All 65 releases
← All changes | compatability.php +30 -2 2010.05282010.0602 View file →
@@ -236,11 +236,39 @@
236 236 endif;
237 237 } /* add_post_meta() */
238 238 } /* if */
239 239
240 -function fwp_category_checklist ($post_id = 0, $descendents_and_self = 0, $selected_cats = false) {
240 +if (!function_exists('disabled')) {
241 + /**
242 + * Outputs the html disabled attribute.
243 + *
244 + * Compares the first two arguments and if identical marks as disabled
245 + *
246 + * @since 3.0.0
247 + *
248 + * @param mixed $disabled One of the values to compare
249 + * @param mixed $current (true) The other value to compare if not just true
250 + * @param bool $echo Whether to echo or just return the string
251 + * @return string html attribute or empty string
252 + */
253 + function disabled( $disabled, $current = true, $echo = true ) {
254 + return __checked_selected_helper( $disabled, $current, $echo, 'disabled' );
255 + }
256 +} /* if */
257 +
258 +require_once(dirname(__FILE__).'/feedwordpress-walker-category-checklist.class.php');
259 +
260 +function fwp_category_checklist ($post_id = 0, $descendents_and_self = 0, $selected_cats = false, $prefix = '') {
241 261 if (function_exists('wp_category_checklist')) :
242 - wp_category_checklist($post_id, $descendents_and_self, $selected_cats);
262 + $walker = new FeedWordPress_Walker_Category_Checklist;
263 + $walker->set_prefix($prefix);
264 + wp_category_checklist(
265 + /*post_id=*/ $post_id,
266 + /*descendents_and_self=*/ $descendents_and_self,
267 + /*selected_cats=*/ $selected_cats,
268 + /*popular_cats=*/ false,
269 + /*walker=*/ $walker
270 + );
243 271 else :
244 272 // selected_cats is an array of integer cat_IDs / term_ids for
245 273 // the categories that should be checked
246 274 global $post_ID;