[wp-hackers] fallback for empty values [general thought about filter call position]

Malaiac malaiac at gmail.com
Tue Sep 16 04:14:39 GMT 2008


exemple :
function get_tags_to_edit() // in wp-admin/includes/taxonomy.php
{
$tags = wp_get_post_tags($post_id);
if ( !$tags ) return false;
<tags cleaning>
$tags_to_edit = apply_filters('tags_to_edit',$tags_to_edit);
return $tags_to_edit;
}

What if the $tags are empty ? The function return false, with no way
to act on that.
Why couldn't it be
if ( !$tags ) return apply_filters('tags_to_edit',false);
?

Malaiac


More information about the wp-hackers mailing list