get($ne_themeslug.'_rsslink'); if ($my_feed) { echo ''; } else { feed_links(); } } remove_action( 'wp_head', 'feed_links', 2); // Display the links to the general feeds: Post and Comment Feed add_action('wp_head', 'neuro_feed_links'); /** * Basic theme setup. */ function neuro_theme_setup() { /** * Initialize neuro 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' ); // Opt-in PressTrends code. add_theme_support( 'post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat') ); add_theme_support( 'post-thumbnails' ); add_theme_support('automatic-feed-links'); add_editor_style(); } add_action( 'after_setup_theme', 'neuro_theme_setup' ); /** * Redirect user to theme options page after activation. */ if ( is_admin() && isset($_GET['activated'] ) && $pagenow =="themes.php" ) { wp_redirect( 'themes.php?page=neuro' ); } /** * Add link to theme options in Admin bar. */ function neuro_admin_link() { global $wp_admin_bar; $wp_admin_bar->add_menu( array( 'id' => 'neuro', 'title' => 'Neuro Options', 'href' => admin_url('themes.php?page=neuro') ) ); } add_action( 'admin_bar_menu', 'neuro_admin_link', 113 ); /** * Custom markup for gallery posts in main blog index. */ function neuro_custom_gallery_post_format( $content ) { global $options, $ne_themeslug, $post; $ne_root = get_template_directory_uri(); ob_start();?> get($ne_themeslug.'_post_formats') == '1') : ?>

get($ne_themeslug.'_show_featured_images') == '1' && !is_single() ) { echo ''; } ?>
get($ne_themeslug.'_show_featured_images') == '1' ) { echo 'style="min-height: 115px;" '; }?>> $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($ne_themeslug.'_excerpt_link_text') == '') { $linktext = '(Read More...)'; } else { $linktext = $options->get($ne_themeslug.'_excerpt_link_text'); } return '

'.$linktext.''; } add_filter('excerpt_more', 'neuro_excerpt_link'); /** * Set custom post excerpt length based on theme option. */ function neuro_excerpt_length($length) { global $ne_themename, $ne_themeslug, $options; if ($options->get($ne_themeslug.'_excerpt_length') == '') { $length = '55'; } else { $length = $options->get($ne_themeslug.'_excerpt_length'); } return $length; } add_filter('excerpt_length', 'neuro_excerpt_length'); /** * Custom featured image size based on theme options. */ function neuro_featured_image() { if ( function_exists( 'add_theme_support' ) ) { global $ne_themename, $ne_themeslug, $options; if ($options->get($ne_themeslug.'_featured_image_height') == '') { $featureheight = '100'; } else { $featureheight = $options->get($ne_themeslug.'_featured_image_height'); } if ($options->get($ne_themeslug.'_featured_image_width') == "") { $featurewidth = '100'; } else { $featurewidth = $options->get($ne_themeslug.'_featured_image_width'); } set_post_thumbnail_size( $featurewidth, $featureheight, true ); } } add_action( 'init', 'neuro_featured_image', 11); /** * Attach CSS3PIE behavior to elements */ function neuro_pie() { ?> get($ne_themeslug.'_ga_code')); } add_action('wp_head', 'neuro_google_analytics'); /** * Add custom header scripts support based on theme option. */ function neuro_custom_scripts() { global $ne_themename, $ne_themeslug, $options; echo stripslashes ($options->get($ne_themeslug.'_custom_header_scripts')); } add_action('wp_head', 'neuro_custom_scripts'); /** * Register custom menus for header, footer. */ function neuro_register_menus() { register_nav_menus( array( 'header-menu' => __( 'Header Menu', 'response' )) ); } add_action( 'init', 'neuro_register_menus' ); /** * Register widgets. */ function neuro_widgets_init() { register_sidebar(array( 'name' => 'Full Sidebar', 'id' => 'sidebar-widgets', 'description' => 'These are widgets for the full 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 half 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 half 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', 'neuro_widgets_init'); /** * End */ ?>