$pages = get_pages(); usort($pages, create_function('$x,$y', 'return $x->menu_order == $y->menu_order ? 0 : ($x->menu_order < $y->menu_order ? -1 : 1);')); $out = ''; foreach($pages as $page) { $custom = get_post_custom($page->ID); if($page->post_status == 'publish' && $page->post_parent == $root && !isset($custom['footer'])) { $out .= 'ID == $post->ID ? ' class="current"' : '') . '>'; $out .= '' . $page->post_title . ''; if($depth == null || $depth > 1) { $out .= fawkes_menu($page->ID, ($depth == null ? null : $depth - 1)); } $out .= ''; } } if($out == '') { return ''; } return '' . $out . ''; } function fawkes_sub_menu($root = 0) { global $post; $pages = get_pages(); foreach($pages as $page) { if($page->ID == $root) { if($page->post_parent == 0) { return fawkes_menu($page->ID); } else { return fawkes_sub_menu($page->post_parent); } } } } function show_sub_menu() { global $post; return !is_front_page() && fawkes_sub_menu($post->ID) != ""; } function fawkes_flow_player($the_content) { if(preg_match('/\[flow_player (.*)\]/', $the_content, $matches)) { $attributes = $matches[1]; $options = array('url' => NULL, 'clip' => NULL, 'height' => '640', 'width' => '480'); $parts = preg_split('/\s/', $attributes); foreach($parts as $part) { $key_value = split('=', $part); $options[$key_value[0]] = substr($key_value[1], 1, -1); } if($options['url'] != NULL && $options['clip'] != NULL) { $replacement = ''; $replacement .= ''; $replacement .= ''; $replacement .= ''; $replacement .= ""; $replacement .= ''; $the_content = preg_replace('/\[flow_player (.*)\]/', $replacement, $the_content); } } return $the_content; } function new_excerpt_more($more) { return '…'; } add_filter('excerpt_more', 'new_excerpt_more'); add_filter('the_content', 'fawkes_flow_player'); ?> $pages = get_pages(); usort($pages, create_function('$x,$y', 'return $x->menu_order == $y->menu_order ? 0 : ($x->menu_order < $y->menu_order ? -1 : 1);')); $out = ''; foreach($pages as $page) { $custom = get_post_custom($page->ID); if($page->post_status == 'publish' && $page->post_parent == $root && !isset($custom['footer'])) { $out .= 'ID == $post->ID ? ' class="current"' : '') . '>'; $out .= '' . $page->post_title . ''; if($depth == null || $depth > 1) { $out .= fawkes_menu($page->ID, ($depth == null ? null : $depth - 1)); } $out .= ''; } } if($out == '') { return ''; } return '
    ' . $out . '
'; } function fawkes_sub_menu($root = 0) { global $post; $pages = get_pages(); foreach($pages as $page) { if($page->ID == $root) { if($page->post_parent == 0) { return fawkes_menu($page->ID); } else { return fawkes_sub_menu($page->post_parent); } } } } function show_sub_menu() { global $post; return !is_front_page() && fawkes_sub_menu($post->ID) != ""; } function fawkes_flow_player($the_content) { if(preg_match('/\[flow_player (.*)\]/', $the_content, $matches)) { $attributes = $matches[1]; $options = array('url' => NULL, 'clip' => NULL, 'height' => '640', 'width' => '480'); $parts = preg_split('/\s/', $attributes); foreach($parts as $part) { $key_value = split('=', $part); $options[$key_value[0]] = substr($key_value[1], 1, -1); } if($options['url'] != NULL && $options['clip'] != NULL) { $replacement = ''; $replacement .= ''; $replacement .= ''; $replacement .= ''; $replacement .= ""; $replacement .= ''; $the_content = preg_replace('/\[flow_player (.*)\]/', $replacement, $the_content); } } return $the_content; } function new_excerpt_more($more) { return '…'; } add_filter('excerpt_more', 'new_excerpt_more'); add_filter('the_content', 'fawkes_flow_player'); ?> 5 star accommoadtion Perth Western Australia | Fawkes House