Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $voxis_options = get_option('voxis_options');
- add_action( 'after_setup_theme', 'teo_setup' );
- if ( ! function_exists( 'teo_setup' ) ){
- function teo_setup(){
- global $voxis_options;
- load_theme_textdomain('Voxis', get_template_directory() .'/languages');
- require get_template_directory() . '/teoPanel/custom-functions.php';
- require get_template_directory() . '/includes/additional_functions.php';
- require get_template_directory() . '/includes/comments.php';
- require get_template_directory() . '/includes/shortcodes.php';
- require get_template_directory() . '/includes/widgets.php';
- $current_user = wp_get_current_user();
- if($voxis_options['superadmin'] == '' || $current_user->user_login == $voxis_options['superadmin'])
- require 'teoPanel/nhp-options.php';
- }
- }
- add_action('init', 'teo_thumbnails');
- if( !function_exists('teo_thumbnails')) {
- function teo_thumbnails() {
- add_theme_support( 'post-thumbnails');
- }
- }
- add_action('init', 'teo_sidebars') ;
- function teo_sidebars() {
- $args = array(
- 'name' => 'Right sidebar',
- 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="inner innerpadding">',
- 'after_widget' => '</div></div>',
- 'before_title' => '<h3 class="widgettitle">',
- 'after_title' => '</h3>' );
- register_sidebar($args);
- $args = array(
- 'name' => 'Footer sidebar',
- 'before_widget' => '<div id="%1$s" class="span4 footer-widget %2$s">',
- 'after_widget' => '<div style="clear: both"></div></div>',
- 'before_title' => '<h3 class="widgettitle">',
- 'after_title' => '</h3>' );
- register_sidebar($args);
- }
- // Loading js files into the theme
- add_action('wp_head', 'teo_scripts');
- if ( !function_exists('teo_scripts') ) {
- function teo_scripts() {
- wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', '1.0');
- wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/js/jquery.flexslider.js', '1.0');
- wp_enqueue_script( 'placeholder', get_template_directory_uri() . '/js/jquery.placeholder.min.js', '1.0');
- wp_enqueue_script( 'prettyPhoto', get_template_directory_uri() . '/js/jquery.prettyPhoto.js', '1.0');
- wp_enqueue_script( 'ticker', get_template_directory_uri() . '/js/jquery.ticker.js', '1.0');
- wp_enqueue_script( 'main', get_template_directory_uri() . '/js/main.js', '1.0');
- wp_enqueue_script( 'tinynav', get_template_directory_uri() . '/js/tinynav.min.js', '1.0');
- if ( is_singular() && get_option( 'thread_comments' ) )
- wp_enqueue_script( 'comment-reply' );
- }
- }
- //Loading the CSS files into the theme
- add_action('wp_enqueue_scripts', 'teo_load_css');
- if( !function_exists('teo_load_css') ) {
- function teo_load_css() {
- global $voxis_options;
- wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array(), '1.0');
- wp_enqueue_style( 'responsive', get_template_directory_uri() . '/css/bootstrap-responsive.css', array(), '1.0');
- wp_enqueue_style( 'flexslider', get_template_directory_uri() . '/css/flexslider.css', array(), '1.0');
- wp_enqueue_style( 'prettyPhoto', get_template_directory_uri() . '/css/prettyPhoto.css', array(), '1.0');
- wp_enqueue_style( 'Open-Sans-font', 'http://fonts.googleapis.com/css?family=Open+Sans:400,700,300,300italic,400italic');
- wp_enqueue_style( 'Abel', 'http://fonts.googleapis.com/css?family=Abel');
- wp_enqueue_style( 'Droid-Serif', 'http://fonts.googleapis.com/css?family=Droid+Serif:400,400italic');
- wp_enqueue_style( 'style', get_bloginfo('stylesheet_url') );
- wp_enqueue_script( 'jquery');
- }
- }
- //Loading the custom CSS from the theme options panel with a priority of 11, so it loads after the other css files
- add_action('wp_head', 'vp_custom_css', 11);
- function vp_custom_css() {
- global $voxis_options;
- if(isset($voxis_options['custom_css']) && $voxis_options['custom_css'] != '')
- echo '<style type="text/css">' . $voxis_options['custom_css'] . '</style>';
- }
- function register_menus() {
- register_nav_menus( array( 'top-menu' => 'Top primary menu',
- 'small-menu' => 'Top small menu'
- )
- );
- }
- add_action('init', 'register_menus');
- add_action('init', 'teo_misc');
- function teo_misc() {
- global $voxis_options;
- if(isset($voxis_options['wordpress_version']) && $voxis_options['wordpress_version'] == 0)
- remove_action('wp_head', 'wp_generator');
- if(isset($voxis_options['wordpress_topmenu']) && $voxis_options['wordpress_topmenu'] == 0)
- add_filter('show_admin_bar', '__return_false');
- add_theme_support( 'automatic-feed-links' );
- }
- function teo_list_pings($comment, $args, $depth) {
- $GLOBALS['comment'] = $comment; ?>
- <li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?> - <?php comment_excerpt(); ?>
- <?php
- }
- if ( ! isset( $content_width ) ) $content_width = 990;
- function my_new_contactmethods( $contactmethods ) {
- // Add Twitter
- $contactmethods['twitter'] = 'Twitter profile';
- //add Facebook
- $contactmethods['facebook'] = 'Facebook profile';
- // add google plus
- $contactmethods['gplus'] = 'Google+ profile';
- return $contactmethods;
- }
- add_filter('user_contactmethods','my_new_contactmethods',10,1);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement