__( 'Primary', 'easel' ) )); /* child-functions.php / child-widgets.php - in the child theme */ if (is_child_theme()) { get_template_part('child', 'functions'); get_template_part('child', 'widgets'); } // load up the addons that it finds, loads before functions just in case we want to rewrite a function if (is_dir(easel_themeinfo('themepath') . '/addons')) { if (easel_themeinfo('enable_addon_comics')) @require_once(easel_themeinfo('themepath') . '/addons/comics.php'); if (easel_themeinfo('enable_addon_membersonly')) @require_once(easel_themeinfo('themepath') . '/addons/membersonly.php'); if (easel_themeinfo('enable_addon_playingnow')) @require_once(easel_themeinfo('themepath') . '/addons/playingnow.php'); if (easel_themeinfo('enable_addon_showcase')) @require_once(easel_themeinfo('themepath') . '/addons/showcase.php'); } // These autoload foreach (glob(easel_themeinfo('themepath') . "/functions/*.php") as $funcfile) { @require_once($funcfile); } // Load all the widgets. foreach (glob(easel_themeinfo('themepath') . '/widgets/*.php') as $widgefile) { @require_once($widgefile); } // Load all the widgets from the child theme *if* a child theme exists if (is_child_theme()) { if (is_dir(easel_themeinfo('stylepath') . '/widgets')) { $results = glob(easel_themeinfo('stylepath') . '/widgets/*.php'); if (!empty($results)) { foreach ($results as $widgefile) { @require_once($widgefile); } } } } // Dashboard Menu Easel Options if (is_admin()) { @require_once(easel_themeinfo('themepath') . '/options.php'); } function __easel_init() { global $is_IE; easel_register_sidebars(); if (!is_admin()) { wp_enqueue_script('jquery'); if (!easel_themeinfo('disable_jquery_menu_code')) { wp_enqueue_script('ddsmoothmenu_js', easel_themeinfo('themeurl') . '/js/ddsmoothmenu.js'); wp_enqueue_script('menubar_js', easel_themeinfo('themeurl') . '/js/menubar.js'); } if (!easel_themeinfo('disable_scroll_to_top')) { wp_enqueue_script('easel_scroll', easel_themeinfo('themeurl') . '/js/scroll.js', array(), false, true); } if (easel_themeinfo('enable_avatar_trick') && !$is_IE) { wp_enqueue_script('themetricks_historic1', easel_themeinfo('themeurl') . '/js/cvi_text_lib.js', array(), false, true); wp_enqueue_script('themetricks_historic2', easel_themeinfo('themeurl') . '/js/instant.js', array(), false, true); } } } add_action('init', '__easel_init'); if (!function_exists('easel_register_sidebars')) { function easel_register_sidebars() { foreach (array( __('Left Sidebar', 'easel'), __('Right Sidebar', 'easel'), __('Above Header', 'easel'), __('Header', 'easel'), __('Menubar', 'easel'), __('Over Blog', 'easel'), __('Under Blog', 'easel'), __('Footer', 'easel') ) as $sidebartitle) { register_sidebar(array( 'name'=> $sidebartitle, 'id' => 'sidebar-'.sanitize_title($sidebartitle), 'before_widget' => "
\r\n", 'before_title' => "queries. Memory usage. seconds.
true, '_builtin' => false ); $output = 'names'; $operator = 'and'; $post_types = get_post_types( $args , $output , $operator ); $post_types = array_merge( $post_types , array( 'post' ) ); if (is_search() || is_archive()) $post_types = array_merge( $post_types, array( 'page' ) ); // Set all the custom post types to be able to be seen by the feed. if ($query->is_feed) { $query->set( 'post_type' , $post_types ); } else { $my_post_type = get_query_var( 'post_type' ); if (is_home()) $post_types = array_diff( $post_types, array ( 'comic' ) ); if ( empty( $my_post_type ) ) $query->set( 'post_type' , $post_types ); } } return $query; } ?>