Guest User

Untitled

a guest
Dec 22nd, 2012
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.60 KB | None | 0 0
  1. <?php
  2.     update_option('siteurl','http://www.home-cube.net');
  3.     update_option('home','http://www.home-cube.net');
  4.  
  5.     $functions_path = TEMPLATEPATH . '/functions/';
  6.     $includes_path = TEMPLATEPATH . '/includes/';
  7.    
  8.     //Loading jQuery and Scripts
  9.     require_once $includes_path . 'theme-scripts.php';
  10.    
  11.     //Widget and Sidebar
  12.     require_once $includes_path . 'sidebar-init.php';
  13.     require_once $includes_path . 'register-widgets.php';
  14.    
  15.     //Theme initialization
  16.     require_once $includes_path . 'theme-init.php';
  17.    
  18.     //Additional function
  19.     require_once $includes_path . 'theme-function.php';
  20.    
  21.     //Shortcodes
  22.     require_once $includes_path . 'theme_shortcodes/shortcodes.php';
  23.     include_once(TEMPLATEPATH . '/includes/theme_shortcodes/alert.php');
  24.     include_once(TEMPLATEPATH . '/includes/theme_shortcodes/tabs.php');
  25.     include_once(TEMPLATEPATH . '/includes/theme_shortcodes/toggle.php');
  26.     include_once(TEMPLATEPATH . '/includes/theme_shortcodes/html.php');
  27.    
  28.     //tinyMCE includes
  29.     include_once(TEMPLATEPATH . '/includes/theme_shortcodes/tinymce/tinymce_shortcodes.php');
  30.    
  31.     //Aqua Resizer for image cropping and resizing on the fly
  32.     require_once $includes_path . 'aq_resizer.php';
  33.    
  34.    
  35.     //Loading theme textdomain
  36.     load_theme_textdomain( 'theme5865', TEMPLATEPATH . '/languages' );
  37.    
  38.     // Add the post meta
  39.     include("includes/theme-postmeta.php");
  40.    
  41.    
  42.    
  43.    
  44.    
  45.  
  46.    
  47.    
  48.    
  49.    
  50.     // removes detailed login error information for security
  51.     add_filter('login_errors',create_function('$a', "return null;"));
  52.    
  53.     /*
  54.  * Loads the Options Panel
  55.  *
  56.  * If you're loading from a child theme use stylesheet_directory
  57.  * instead of template_directory
  58.  */
  59.     if ( !function_exists( 'optionsframework_init' ) ) {
  60.         define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_bloginfo('template_directory') . '/admin/' );
  61.         require_once dirname( __FILE__ ) . '/admin/options-framework.php';
  62.     }
  63.    
  64.    
  65.    
  66.        
  67.     // Removes Trackbacks from the comment cout
  68.     add_filter('get_comments_number', 'comment_count', 0);
  69.     function comment_count( $count ) {
  70.         if ( ! is_admin() ) {
  71.             global $id;
  72.             $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
  73.             return count($comments_by_type['comment']);
  74.         } else {
  75.             return $count;
  76.         }
  77.     }
  78.    
  79.    
  80.     // Post Formats
  81.     /*$formats = array(
  82.                 'aside',
  83.                 'gallery',
  84.                 'link',
  85.                 'image',
  86.                 'quote',
  87.                 'audio',
  88.                 'video');
  89.  
  90.     add_theme_support( 'post-formats', $formats );
  91.  
  92.     add_post_type_support( 'post', 'post-formats' );*/
  93.    
  94.    
  95.    
  96.     // Custom excpert length
  97.     function new_excerpt_length($length) {
  98.     return 60;
  99.     }
  100.     add_filter('excerpt_length', 'new_excerpt_length');
  101.  
  102.    
  103.     // enable shortcodes in sidebar
  104.     add_filter('widget_text', 'do_shortcode');
  105.    
  106.     // custom excerpt ellipses for 2.9+
  107.     function custom_excerpt_more($more) {
  108.         return 'Read More &raquo;';
  109.     }
  110.     add_filter('excerpt_more', 'custom_excerpt_more');
  111.     // no more jumping for read more link
  112.     function no_more_jumping($post) {
  113.         return '&nbsp;<a href="'.get_permalink($post->ID).'" class="read-more">'.'Continue Reading'.'</a>';
  114.     }
  115.     add_filter('excerpt_more', 'no_more_jumping');
  116.    
  117.    
  118.     // category id in body and post class
  119.     function category_id_class($classes) {
  120.         global $post;
  121.         foreach((get_the_category($post->ID)) as $category)
  122.             $classes [] = 'cat-' . $category->cat_ID . '-id';
  123.             return $classes;
  124.     }
  125.    
  126.     add_filter('post_class', 'category_id_class');
  127.     add_filter('body_class', 'category_id_class');
  128.    
  129.    
  130. function SearchFilter($query) {
  131.     if ($query->is_search) {
  132.         $query->set('post_type', 'post');
  133.     }
  134.     return $query;
  135. }
  136. add_filter('pre_get_posts','SearchFilter');
  137.  
  138. ?>
Advertisement
Add Comment
Please, Sign In to add comment