Steve,
Hi. I fudged around with this for a bit and got to the bottom of why the above examples are not working as expected. The latest versions of WordPress have introduced post revisions and this seems to be causing get_children() to return a "false" positive when there are no actual children pages. A page revision is stored in the database as a child page of the "actual" page with a post_type of "revision" and a post_status of "inherit". I believe that the inherited post status is to blame here, but am not actually sure This being said, the following conditional code should print only when there are actual (non-revision) children":
<?php
$mf_children = get_children( 'post_parent=' . $post->ID . '&post_type=page&post_status=publish' );
print '<pre>'; print_r( $mf_children ); print '</pre>';
print 'COUNT: ' . count( mf_children );
print ' - ' . $mf_children;
print ' - ' . $post->ID;
if( count( $mf_children ) > 0 ) {
print '<div class="Menu" style="background:black;height:20px">';
print '<ul>';
$pages = wp_list_pages( 'sort_column=menu_order&title_li=&echo=0&child_of=' . $post->ID );
$pages = preg_replace( '%<a>]+)>%U', '</a><a><span>', $pages );
$pages = str_replace( '</a>', '</span>', $pages );
echo $pages;
print '</ul>';
unset($pages);
print '</div>';
}
?>
However, this is not the case...
Sorry, I do not have a solution in this particular case - prior to 2.6, the above code should work...