Advertisement
Guest User

functions.php

a guest
Apr 16th, 2014
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.17 KB | None | 0 0
  1. <?php
  2. /*
  3.  * Functions file
  4.  * Calls all other required files
  5.  * PLEASE DO NOT EDIT THIS FILE IN ANY WAY
  6.  *
  7.  * @package parabola
  8.  */
  9.  
  10. // variable for theme version
  11. define ("PARABOLA_VERSION","1.3.3");
  12.  
  13. require_once(dirname(__FILE__) . "/admin/main.php"); // Load necessary admin files
  14.  
  15. //Loading include files
  16. require_once(dirname(__FILE__) . "/includes/theme-setup.php");     // Setup and init theme
  17. require_once(dirname(__FILE__) . "/includes/theme-styles.php");    // Register and enqeue css styles and scripts
  18. require_once(dirname(__FILE__) . "/includes/theme-loop.php");      // Loop functions
  19. require_once(dirname(__FILE__) . "/includes/theme-meta.php");      // Meta functions
  20. require_once(dirname(__FILE__) . "/includes/theme-frontpage.php"); // Frontpage styling
  21. require_once(dirname(__FILE__) . "/includes/theme-comments.php");  // Comment functions
  22. require_once(dirname(__FILE__) . "/includes/theme-functions.php"); // Misc functions
  23. require_once(dirname(__FILE__) . "/includes/theme-hooks.php");     // Hooks
  24. require_once(dirname(__FILE__) . "/includes/shortcodes.php");     // shortcodes
  25. require_once(dirname(__FILE__) . "/js/shortcodes-generator.php");     // shortcodes
  26. require_once(dirname(__FILE__) . "/includes/post-types.php");     // cpt
  27.  
  28. remove_action( 'wp_head', 'feed_links_extra', 3 ); // Display the links to the extra feeds such as category feeds
  29. remove_action( 'wp_head', 'feed_links', 2 ); // Display the links to the general feeds: Post and Comment Feed
  30. remove_action( 'wp_head', 'rsd_link' ); // Display the link to the Really Simple Discovery service endpoint, EditURI link
  31. remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file.
  32. remove_action( 'wp_head', 'index_rel_link' ); // index link
  33. remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // prev link
  34. remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link
  35. remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
  36. remove_action( 'wp_head', 'wp_generator' ); // Display the XHTML generator that is generated on the wp_head hook, WP version
  37. remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 ); //
  38.  
  39.  
  40. class SplitMenu_Walker_Nav_Menu extends Walker_Nav_Menu {
  41.  var $startMenu = false;
  42.  
  43.  function start_lvl(&$output, $depth) {
  44.     return false;
  45.  }
  46.  
  47.  function end_lvl(&$output, $depth) {
  48.   $this->startMenu = false;
  49.  }
  50.  
  51.  function start_el(&$output, $item, $depth, $args) {
  52.   if(($args->has_children && $item->current) || $item->current_item_parent)
  53.    $this->startMenu = true;
  54.    
  55.   if($this->startMenu && $depth > 0)
  56.     parent::start_el($output, $item, $depth, $args);
  57.  }
  58.  
  59.  function end_el(&$output, $item, $depth) {
  60.   if( $this->startMenu )
  61.     parent::end_el($output, $item, $depth);
  62.  }
  63.  
  64.  function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) {
  65.  
  66.         $id_field = $this->db_fields['id'];
  67.         if ( is_object( $args[0] ) ) {
  68.             $args[0]->has_children = ! empty( $children_elements[$element->$id_field] );
  69.         }
  70.         return parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
  71.     }
  72. };
  73. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement