Example #1
0
 function __construct()
 {
     automatic_feed_links();
     add_action('init', array($this, 'remove_junk'));
     add_filter('show_admin_bar', '__return_false');
     add_filter('redirect_canonical', array($this, 'stop_guessing'));
     add_action('template_redirect', array($this, 'remove_author_pages_page'));
     add_filter('author_link', array($this, 'remove_author_pages_link'));
     register_activation_hook(__FILE__, array($this, 'on_activate'));
     add_action('template_redirect', array($this, 'on_render_frontend'));
 }
Example #2
0
function it_builder_load_theme_features()
{
    global $wp_version;
    $path = dirname(dirname(__FILE__));
    it_classes_load('it-cache.php');
    require $path . '/import-export/init.php';
    require $path . '/widgets/init.php';
    require $path . '/data/init.php';
    require $path . '/theme-settings/init.php';
    require $path . '/layout-engine/init.php';
    require $path . '/title/init.php';
    $file_cache = builder_theme_supports('builder-file-cache') ? true : false;
    $GLOBALS['builder_cache'] = new ITCache('builder-core', array('enable_file_cache' => $file_cache));
    $GLOBALS['builder_cache']->add_content_type('javascript-footer', 'javascript-footer.js', 'text/javascript', array('async_load' => true));
    $GLOBALS['builder_cache']->add_content_filter('javascript', 'builder_filter_javascript_content');
    $GLOBALS['builder_cache']->add_content_filter('javascript-footer', 'builder_filter_javascript_footer_content');
    $GLOBALS['builder_cache']->add_content_filter('css', 'builder_filter_css_content');
    if (builder_theme_supports('builder-my-theme-menu')) {
        require $path . '/tutorials/init.php';
    }
    // Compatibility check for pre-3.0 automatic-feed-links support
    if (version_compare($wp_version, '2.9.7', '<=') && builder_theme_supports('automatic-feed-links') && function_exists('automatic_feed_links')) {
        automatic_feed_links();
    }
    if (builder_theme_supports('builder-extensions')) {
        require $path . '/extensions/init.php';
    }
    if (builder_theme_supports('builder-admin-bar')) {
        require $path . '/admin-bar/init.php';
    }
    if (builder_theme_supports('builder-plugin-features')) {
        require $path . '/plugin-features/init.php';
    }
    if (builder_theme_supports('builder-3.0')) {
        add_theme_support('loop-standard');
    }
    if (builder_theme_supports('loop-standard')) {
        require $path . '/loop-standard/functions.php';
    }
    if (builder_theme_supports('builder-responsive')) {
        add_theme_support('builder-percentage-widths');
        add_theme_support('builder-responsive-ready');
        require $path . '/responsive/init.php';
    }
    if (builder_theme_supports('builder-gallery-shortcode')) {
        require $path . '/gallery-shortcode/init.php';
    }
    if ('on' == builder_get_theme_setting('dashboard_favicon')) {
        add_action('admin_enqueue_scripts', 'builder_add_favicon', 0);
    }
    do_action('builder_theme_features_loaded');
}
Example #3
0
function minicard_feed_link()
{
    global $wp_version;
    $default_feed_link = '<link rel="alternate" type="application/rss+xml" title="' . get_bloginfo('name') . ' RSS Feed" href="' . get_bloginfo('rss2_url') . '" />';
    if ($wp_version < 3) {
        if (function_exists(automatic_feed_links)) {
            $output .= automatic_feed_links();
        } else {
            $output .= $default_feed_link;
        }
    }
    echo $output;
}
Example #4
0
 function GZ()
 {
     $options = $this->get_options();
     if (!is_admin()) {
         add_filter('pre_get_posts', array(&$this, 'exclude_from_front'));
     }
     add_action('register', array(&$this, 'register'));
     add_action('loginout', array(&$this, 'register'));
     add_action('wp_head', array(&$this, 'wp_head'), 1);
     add_filter('sniplet_places', array(&$this, 'sniplet_places'));
     if ($options['author_posts'] != 10 && $options['author_posts'] != 0) {
         add_filter('post_limits', array(&$this, 'author_post_limit'));
     }
     if (function_exists('automatic_feed_links')) {
         automatic_feed_links();
     }
 }
Example #5
0
 /**
  * Initializes K2
  *
  * @uses do_action() Provides 'k2_init' action
  */
 function init()
 {
     // Loads localisation from K2's languages directory
     load_theme_textdomain('k2_domain', TEMPLATEPATH . '/languages');
     // Load required classes and includes
     require_once TEMPLATEPATH . '/app/includes/wp-compat.php';
     require_once TEMPLATEPATH . '/app/classes/archive.php';
     require_once TEMPLATEPATH . '/app/includes/info.php';
     require_once TEMPLATEPATH . '/app/includes/display.php';
     require_once TEMPLATEPATH . '/app/includes/comments.php';
     if (class_exists('WP_Widget')) {
         // WP 2.8+
         require_once TEMPLATEPATH . '/app/includes/widgets.php';
     }
     if (defined('K2_STYLES') and K2_STYLES == true) {
         require_once TEMPLATEPATH . '/app/classes/styles.php';
     }
     if (defined('K2_HEADERS') and K2_HEADERS == true) {
         require_once TEMPLATEPATH . '/app/classes/header.php';
     }
     // Check installed version, upgrade if needed
     $k2version = get_option('k2version');
     if ($k2version === false) {
         K2::install();
     } elseif (version_compare($k2version, K2_CURRENT, '<')) {
         K2::upgrade($k2version);
     }
     // Register our scripts with script loader
     K2::register_scripts();
     // There may be some things we need to do before K2 is initialised
     // Let's do them now
     do_action('k2_init');
     // Finally load pluggable functions
     require_once TEMPLATEPATH . '/app/includes/pluggable.php';
     // Register our sidebars with widgets
     k2_register_sidebars();
     // Register the fact that K2 supports post-thumbnails
     if (function_exists('add_theme_support')) {
         add_theme_support('post-thumbnails');
     }
     // Automatically output feed links. Requires WP 2.8+
     automatic_feed_links();
 }
<?php
        // Translations can be filed in the /languages/ directory
        load_theme_textdomain( 'html5reset', TEMPLATEPATH . '/languages' );
 
        $locale = get_locale();
        $locale_file = TEMPLATEPATH . "/languages/$locale.php";
        if ( is_readable($locale_file) )
            require_once($locale_file);
	
	// Add RSS links to <head> section
	automatic_feed_links();
	
	// Load jQuery
	if ( !function_exists(core_mods) ) {
		function core_mods() {
			if ( !is_admin() ) {
				wp_deregister_script('jquery');
				wp_register_script('jquery', ("//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"), false);
				wp_enqueue_script('jquery');
			}
		}
		core_mods();
	}

	// Clean up the <head>
	function removeHeadLinks() {
    	remove_action('wp_head', 'rsd_link');
    	remove_action('wp_head', 'wlwmanifest_link');
    }
    add_action('init', 'removeHeadLinks');
    remove_action('wp_head', 'wp_generator');
Example #7
0
<?php

include TEMPLATEPATH . '/constants.php';
include TEMPLATEPATH . '/classes.php';
include TEMPLATEPATH . '/widgets.php';
/**
 * Disable automatic general feed link outputting.
 */
automatic_feed_links(false);
//remove_action('wp_head', 'feed_links_extra', 3);
remove_action('wp_head', 'wp_generator');
if (function_exists('register_sidebar')) {
    register_sidebar(array('id' => 'default-sidebar', 'name' => 'Default Sidebar', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    register_sidebar(array('id' => 'menus-sidebar', 'name' => 'Menus Sidebar', 'before_widget' => '<div class="col">', 'after_widget' => '</div>', 'before_title' => '<h4><a href="#">', 'after_title' => '</a></h4>'));
    register_sidebar(array('id' => 'footer-sidebar', 'name' => 'Footer Sidebar', 'before_widget' => '<div class="frame">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>'));
    register_sidebar(array('id' => 'social-sidebar', 'name' => 'Social Sidebar', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    register_sidebar(array('id' => 'carousel-sidebar', 'name' => 'Carousel Sidebar', 'before_widget' => '<div class="carousel">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    register_sidebar(array('id' => 'promo-sidebar', 'name' => 'Promo Sidebar', 'before_widget' => '<div class="promo-box">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    register_sidebar(array('id' => 'section-one-sidebar', 'name' => 'Section One Sidebar', 'before_widget' => '<section class="grid_8 alpha col1">', 'after_widget' => '</section>', 'before_title' => '<div class="heading"><h2>', 'after_title' => '</h2></div>'));
    register_sidebar(array('id' => 'section-two-sidebar', 'name' => 'Section Two Sidebar', 'before_widget' => '<section class="grid_4 omega col2">', 'after_widget' => '</section>', 'before_title' => '<div class="heading"><h2>', 'after_title' => '</h2></div>'));
    register_sidebar(array('id' => 'carousel-post-sidebar', 'name' => 'Carousel Post Sidebar', 'before_widget' => '<div class="carousel1">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    register_sidebar(array('id' => 'posts-sidebar', 'name' => 'Posts Sidebar', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    register_sidebar(array('id' => 'posts-sidebar-comm', 'name' => 'Posts Sidebar Commercial', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h3>', 'after_title' => '</h3>'));
}
if (function_exists('add_theme_support')) {
    add_theme_support('post-thumbnails');
    set_post_thumbnail_size(50, 50, true);
    // Normal post thumbnails
    add_image_size('single-post-thumbnail', 620, 220, true);
}
register_nav_menus(array('primary' => __('Primary Navigation', 'base')));
/**
 * This initial function hooks into and calls our next functions
 *
 */
function omega_initialize()
{
    //initializing theme options
    automatic_feed_links();
    //actions
    add_action('init', 'omega_show_ajax', 100);
    add_action('init', 'omega_scripts');
    add_action('init', 'omega_sidebars');
    add_filter('wp_get_nav_menu_items', 'omega_filter_nav_menu_items', 20, 3);
}