add_menu( array( 'id' => 'Eclipse', 'title' => 'Eclipse Options', 'href' => admin_url('themes.php?page=eclipse') ) );
}
add_action( 'admin_bar_menu', 'eclipse_admin_link', 113 );
/**
* Custom markup for gallery posts in main blog index.
*/
function eclipse_custom_gallery_post_format( $content ) {
global $options, $ec_themeslug, $post;
$ec_root = get_template_directory_uri();
$featured_images = $options->get($ec_themeslug.'_show_featured_images');
ob_start();
?>
';
}
?>
$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($ec_themeslug.'_excerpt_link_text') == '') {
$linktext = 'Continue Reading';
}
elseif ($custom_excerpt == 'recent') {
$linktext = 'Continue Reading';
}
else {
$linktext = $options->get($ec_themeslug.'_excerpt_link_text');
}
return '…';
}
add_filter('excerpt_more', 'eclipse_new_excerpt_more');
/**
* Set custom post excerpt length based on theme option.
*/
function eclipse_new_excerpt_length($length) {
global $ec_themename, $ec_themeslug, $custom_excerpt, $options;
if ($options->get($ec_themeslug.'_excerpt_length') == '') {
$length = '55';
}
elseif ($custom_excerpt == 'recent') {
$length = '15';
}
else {
$length = $options->get($ec_themeslug.'_excerpt_length');
}
return $length;
}
add_filter('excerpt_length', 'eclipse_new_excerpt_length');
/**
* Attach CSS3PIE behavior to elements
*/
function eclipse_render_ie_pie() { ?>
get($ec_themeslug.'_ga_code'));
}
add_action('wp_head', 'eclipse_google_analytics');
/**
* Register custom menus for header, footer.
*/
function eclipse_register_menus() {
register_nav_menus(
array( 'header-menu' => __( 'Header Menu', 'response' ))
);
}
add_action( 'init', 'eclipse_register_menus' );
/**
* Menu fallback if custom menu not used.
*/
function eclipse_menu_fallback() {
global $post; ?>
'Full Sidebar',
'id' => 'sidebar-widgets',
'description' => 'These are widgets for the sidebar.',
'before_widget' => '',
'after_widget' => '
',
'before_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' => ''
));
register_sidebar(array(
'name' => 'Right Half Sidebar',
'id' => 'sidebar-right',
'description' => 'These are widgets for the right sidebar.',
'before_widget' => '',
'after_widget' => '
',
'before_title' => ''
));
register_sidebar(array(
'name' => 'Footer',
'id' => 'footer-widgets',
'description' => 'These are the footer widgets',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
));
}
add_action ('widgets_init', 'eclipse_widgets_init');
?>