add_menu( array( 'id' => 'eclipse', 'title' => 'Eclipse Pro Options', 'href' => admin_url('themes.php?page=eclipse') ) ); } add_action( 'admin_bar_menu', 'admin_link', 113 ); /** * Custom markup for gallery posts in main blog index. */ function custom_gallery_post_format( $content ) { global $options, $themeslug, $post; $root = get_template_directory_uri(); ob_start(); if ( has_post_thumbnail() && $featured_images == '1' && !is_single()) { echo ''; } ?>

$post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); if ( $images ) : $total_images = count( $images ); $image = array_shift( $images ); $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); ?>
get($themeslug.'_excerpt_link_text') == '') { $linktext = 'Continue Reading'; } elseif ($custom_excerpt == 'recent') { $linktext = 'Continue Reading'; } else { $linktext = $options->get($themeslug.'_excerpt_link_text'); } return '…'; } add_filter('excerpt_more', 'new_excerpt_more'); /** * Set custom post excerpt length based on theme option. */ function new_excerpt_length($length) { global $themename, $themeslug, $custom_excerpt, $options; if ($options->get($themeslug.'_excerpt_length') == '') { $length = '55'; } elseif ($custom_excerpt == 'recent') { $length = '15'; } else { $length = $options->get($themeslug.'_excerpt_length'); } return $length; } add_filter('excerpt_length', 'new_excerpt_length'); /** * Attach CSS3PIE behavior to elements */ function render_ie_pie() { ?> get($themeslug.'_ga_code')); } add_action('wp_head', 'eclipse_google_analytics'); function eclipse_lazy_load() { global $root; $placeholder = "$root/images/grey.gif"; echo << jQuery(document).ready(function($){ jQuery("img").not("#orbitDemo img, .es-carousel img, #credit img").lazyload({ effect:"fadeIn", placeholder: "$placeholder" }); }); EOF; } add_action('wp_head', 'eclipse_lazy_load'); /** * Register custom menus for header, footer. */ function eclipse_register_menus() { register_nav_menus( array( 'header-menu' => __( 'Header Menu' )) ); } add_action( 'init', 'eclipse_register_menus' ); /** * Menu fallback if custom menu not used. */ function menu_fallback() { global $post; ?> 'Full Sidebar', 'id' => 'sidebar-widgets', 'description' => 'These are widgets for the sidebar.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Left Half Sidebar', 'id' => 'sidebar-left', 'description' => 'These are widgets for the left sidebar.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Right Half Sidebar', 'id' => 'sidebar-right', 'description' => 'These are widgets for the right sidebar.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Footer', 'id' => 'footer-widgets', 'description' => 'These are the footer widgets', 'before_widget' => '', 'before_title' => '', )); } add_action ('widgets_init', 'ifp_widgets_init'); function ec_custom_pagination($pages = '', $range = 4) { $showitems = ($range * 2)+1; global $paged; if(empty($paged)) $paged = 1; if($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { echo '\n"; } } /** * Initialize response Core Framework and Pro Extension. */ require_once ( get_template_directory() . '/core/core-init.php' ); /** * Call additional files required by theme. */ require_once ( get_template_directory() . '/includes/classy-options-init.php' ); // Theme options markup. require_once ( get_template_directory() . '/includes/options-functions.php' ); // Custom functions based on theme options. require_once ( get_template_directory() . '/includes/meta-box.php' ); // Meta options markup. require_once ( get_template_directory() . '/includes/presstrends.php' ); // Meta options markup. ?>