';} pixopoint_menu(); // Adds main menu if (get_option('suckerfish_secondmenu') == 'on') {pixopoint_menu(2);} // Adds second menu if (function_exists('pixopoint_studiopress')) {echo '';} } // *** Themes with hooks *** // Hybrid by Justin Tadlock ... http://themehybrid.com/themes/hybrid add_action('init','remove_header_hybrid'); // Plugin is loaded before the theme, so its remove_action() won't work unless fired later ... hat tip to Justin Tadlock (http://justintadlock.com/) function remove_header_hybrid() {remove_action( 'hybrid_after_header', 'hybrid_page_nav' );} add_action( 'hybrid_after_header', 'pixopoint_themesupport' ); // Add new function(s) // Thematic by Ian Stewart ... http://themeshaper.com/ add_action('init','remove_header_thematic'); // Plugin is loaded before the theme, so its remove_action() won't work unless fired later ... hat tip to Justin Tadlock (http://justintadlock.com/) function remove_header_thematic() {remove_action( 'thematic_header', 'thematic_access' );} add_action( 'thematic_header', 'pixopoint_themesupport' ); // Add new function(s) // Selected StudioPress themes by Brian Gardner ... http://studiopress.com/ // Hacks for CSS issues // function pixopoint_studiopress() {if (function_exists('studiopress_navigation')) {echo '';}} // add_action('wp_head', 'pixopoint_studiopress'); // Removes current menu and adds new one add_action('init','remove_studiopress_navigation'); // Plugin is loaded before the theme, so its remove_action() won't work unless fired later ... hat tip to Justin Tadlock (http://justintadlock.com/) function remove_studiopress_navigation() {remove_action( 'studiopress_after_header', 'studiopress_navigation' );} add_action( 'studiopress_after_header', 'pixopoint_themesupport' ); // Add new function(s) // Thesis remove_action('thesis_hook_before_header', 'thesis_nav_menu'); // Remove current navigation ... doesn't work :( add_action('thesis_hook_after_header', 'pixopoint_themesupport'); // add_action('’thesis_hook_before_header', 'pixopoint_themesupport'); // Could be used to add support for Thesis BEFORE header /* THIS DOESN'T WORK AS IT ADDS THE CODE BEFORE THE HEADER INSTEAD OF AFTER IT - NEED TO FIND A FIX FOR IT! add_action( 'get_header', 'pixopoint_themesupport', 5 ); // Add new function(s) */ // *** Hacks for themes with coding errors *** // Default (Kubrick) by Michael Heilemann ... http://binarybonsai.com/ function pixopoint_kubrick() {if (function_exists('kubrick_head')) {echo '';}} add_action('wp_head', 'pixopoint_kubrick'); } /************************************************************ ************************************************************ ************* Add content to HEAD section ****************** ************************************************************ ************************************************************/ add_action('wp_print_scripts', 'suckerfish_mainhead'); function suckerfish_mainhead() {global $pixopoint_menu_version; // Only load this if not on an admin page if (!is_admin()) {echo ' '; // Maintenance mode if ($_SESSION['mln'] == 'on') {echo ' ';} // If we're not using the theme generated CSS, we've disabled CSS or the test CSS is enabled the style.php file is loaded elseif (get_option('suckerfish_generator') != 'Theme CSS' AND get_option('suckerfish_displaycss') != 'Disable' AND $_SESSION['mln_testcss'] != 'on') { if (get_option('suckerfish_editingpane') != 'on' OR !current_user_can('manage_options')) { // Don't load if editing pane is on echo ''; // There is a way to enqueue CSS now which should be used here - will be added in future release } } // If test CSS is activated then loads that (useful for debugging purposes) elseif ($_SESSION['mln_testcss'] == 'on') {echo '';} // ******** SCRIPTS TO BE ADDED TO HEAD ******* // Adds script for keyboard accessibility if (get_option('suckerfish_keyboard') == 'on') { wp_enqueue_script('sfkeyboard', 'pixopoint-menu/scripts/suckerfish_keyboard.js', array('dependency'), '1', true ); // TRUE makes it load in footer wp_enqueue_script( 'superfish_init', 'pixopoint-menu/scripts/superfish_settings.js.php', array('dependency'), '1', true ); // TRUE makes it load in footer } // Checks if Superfish mode is needed, if not then goes back to suckerfish approach if (get_option('suckerfish_delay') != '0' || get_option('suckerfish_superfish_arrows') == 'on' || get_option('suckerfish_superfish_speed') != 'instant') { wp_enqueue_script( 'superfish_init', 'pixopoint-menu/scripts/superfish_settings.js.php', array('dependency'), '1', true ); // TRUE makes it load in footer } // Any ideas how to enqueue a script in IE conditional comments? else {echo ' '; } } } /************************************************************ ************************************************************ ****** Functions for displaying various menu contents ****** ************************************************************ *************************************************************/ // Displays the 'Pages' option function pages($meta_key='') { // $meta_key has something to do with Gregs custom fields mod ($meta_key==''?$suckerfish_pages_title=get_option('suckerfish_pagestitle'):$suckerfish_pages_title=$meta_key); $suckerfish_depthpages = get_option('suckerfish_depthpages'); switch ($suckerfish_depthpages){ // Sets nesting of pages case "Top level only":$suckerfish_depthpagesecho = '&depth=1';break; case "No nesting":$suckerfish_depthpagesecho = '&depth=-1';break; case "1 level of children":$suckerfish_depthpagesecho = '&depth=2';break; case "2 levels of children":$suckerfish_depthpagesecho = '&depth=3';break; case "Infinite":$suckerfish_depthpagesecho = '&depth=0';break; case "":$suckerfish_depthpagesecho = '&depth=0';break; } if (is_page()&&get_post_custom_values($meta_key)!='') { $class=' class="current_page_parent current_page_item"'; } // For putting the pages into a sinle dropdown if (get_option('suckerfish_pages_singledropdown') == 'on') { echo '' . $suckerfish_pages_title . '