wp2.7.1
my own server
I have seen how to exclude a specific page from a custom header menu using exclude pages in the menu building function below but, I cannot find how to apply the:
$pages = apply_filters( 'get_pages', $pages );
when a non standard menu building function is used. eg:
<?php function get_the_pa_ges() {
global $wpdb;
if ( ! $these_pages = wp_cache_get('these_pages', 'pages') ) {
$these_pages = $wpdb->get_results('select ID, post_title from '. $wpdb->posts .' where post_status = "publish" and post_type = "page" order by menu_order');
}
return $these_pages;
}
function list_all_pages(){
$all_pages = get_the_pa_ges ();
/*$all_pages = apply_filters(get_the_pa_ges ());*/
foreach ($all_pages as $thats_all){
$the_page_id = $thats_all->ID;
if (is_page($the_page_id)) {
$addclass = ' class="current_page"';
} else {
$addclass = '';
}
$output .= '<li' . $addclass . '><a href="'.get_permalink($thats_all->ID).'" title="'.$thats_all->post_title.'"><span>'.$thats_all->post_title.'</span></a></li>';
}
return $output;
}
?>
I tried several methods on my own with no luck. I searched and searched to no avail.
How can i apply the exclude pages filter to the function above?
Any clues for me folks?
Thanks in advance for your assistance.