get($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', 'response_feed_links'); /** * Redirect user to theme options page after activation. */ if ( is_admin() && isset($_GET['activated'] ) && $pagenow =="themes.php" ) { wp_redirect( 'themes.php?page=response' ); } /** * Add link to theme options in Admin bar. */ function response_admin_link() { global $wp_admin_bar; $wp_admin_bar->add_menu( array( 'id' => 'Response', 'title' => 'Response Options', 'href' => admin_url('themes.php?page=response') ) ); } add_action( 'admin_bar_menu', 'response_admin_link', 113 ); /** * Custom markup for gallery posts in main blog index. */ function response_custom_gallery_post_format( $content ) { global $options, $themeslug, $post; $root = get_template_directory_uri(); ob_start();?> get($themeslug.'_post_formats') == '1') : ?>

get($themeslug.'_show_featured_images') == '1' && !is_single() ) { echo ''; } ?>
get($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($themeslug.'_excerpt_link_text') == '') { $linktext = '(Read More...)'; } else { $linktext = $options->get($themeslug.'_excerpt_link_text'); } return '

'.$linktext.''; } add_filter('excerpt_more', 'response_excerpt_link'); /** * Set custom post excerpt length based on theme option. */ function response_excerpt_length($length) { global $themename, $themeslug, $options; if ($options->get($themeslug.'_excerpt_length') == '') { $length = '55'; } else { $length = $options->get($themeslug.'_excerpt_length'); } return $length; } add_filter('excerpt_length', 'response_excerpt_length'); /** * Custom featured image size based on theme options. */ function response_featured_image() { if ( function_exists( 'add_theme_support' ) ) { global $themename, $themeslug, $options; if ($options->get($themeslug.'_featured_image_height') == '') { $featureheight = '100'; } else { $featureheight = $options->get($themeslug.'_featured_image_height'); } if ($options->get($themeslug.'_featured_image_width') == "") { $featurewidth = '100'; } else { $featurewidth = $options->get($themeslug.'_featured_image_width'); } if ($options->get($themeslug.'_featured_image_crop') == "1") { $crop = 'true'; } else { $crop = 'false'; } set_post_thumbnail_size( $featurewidth, $featureheight, $crop ); } } add_action( 'init', 'response_featured_image', 11); /** * Add Google Analytics support based on theme option. */ function response_google_analytics() { global $themename, $themeslug, $options; echo stripslashes ($options->get($themeslug.'_ga_code')); } add_action('wp_head', 'response_google_analytics'); /** * Add custom header scripts support based on theme option. */ function response_custom_scripts() { global $themename, $themeslug, $options; echo stripslashes ($options->get($themeslug.'_custom_header_scripts')); } add_action('wp_head', 'response_custom_scripts'); /** * Register custom menus for header, footer. */ function response_register_menus() { register_nav_menus( array( 'header-menu' => __( 'Header Menu', 'response' )) ); } add_action( 'init', 'response_register_menus' ); /** * Menu fallback if custom menu not used. */ function response_menu_fallback() { global $post; ?> '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', 'response_widgets_init'); /** * End */ ?>