. add_theme_support( 'automatic-feed-links' ); // This theme uses wp_nav_menu() in one location. register_nav_menu( 'primary', __( 'Primary Menu', AKYUZ_TEXT_DOMAIN ) ); // Add support for a variety of post formats add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image', 'video', 'audio', 'chat' ) ); // Add support for custom backgrounds add_custom_background(); // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images add_theme_support( 'post-thumbnails' ); // The default header text color register_nav_menus( array( 'primary' => __( 'Main Navigation', AKYUZ_TEXT_DOMAIN ), 'secondary' => __( 'Top Navigation', AKYUZ_TEXT_DOMAIN ), ) ); // By leaving empty, we allow for random image rotation. // The height and width of your custom header. define( 'HEADER_IMAGE_WIDTH', apply_filters( 'akyuz_header_image_width', 943 ) ); define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'akyuz_header_image_height', 190 ) ); define( 'NO_HEADER_TEXT', false ); define( 'HEADER_TEXTCOLOR', 'd2691e'); define( 'HEADER_IMAGE', get_header_image() ); set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); // Add Akyuz's custom image sizes add_image_size( 'large-feature', HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); // Used for large feature (header) images add_image_size( 'small-feature', 573, 320 ); // Used for featured posts if a large-feature doesn't exist add_image_size( 'size-full', 573, 320, true ); // Used for featured posts if a large-feature doesn't exist // Turn on random header image rotation by default. add_theme_support( 'custom-header' ); // Add a way for the custom header to be styled in the admin panel that controls add_custom_image_header( 'akyuz_header_style', 'akyuz_admin_header_style', 'akyuz_admin_header_image' ); // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'wheel' => array( 'url' => '%s/images/headers/wheel.jpg', 'thumbnail_url' => '%s/images/headers/wheel-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Wheel', AKYUZ_TEXT_DOMAIN ) ), 'shore' => array( 'url' => '%s/images/headers/shore.jpg', 'thumbnail_url' => '%s/images/headers/shore-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Shore', AKYUZ_TEXT_DOMAIN ) ), 'trolley' => array( 'url' => '%s/images/headers/trolley.jpg', 'thumbnail_url' => '%s/images/headers/trolley-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Trolley', AKYUZ_TEXT_DOMAIN ) ), 'pine-cone' => array( 'url' => '%s/images/headers/pine-cone.jpg', 'thumbnail_url' => '%s/images/headers/pine-cone-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Pine Cone', AKYUZ_TEXT_DOMAIN ) ), 'chessboard' => array( 'url' => '%s/images/headers/chessboard.jpg', 'thumbnail_url' => '%s/images/headers/chessboard-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Chessboard', AKYUZ_TEXT_DOMAIN ) ), 'lanterns' => array( 'url' => '%s/images/headers/lanterns.jpg', 'thumbnail_url' => '%s/images/headers/lanterns-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Lanterns', AKYUZ_TEXT_DOMAIN ) ), 'willow' => array( 'url' => '%s/images/headers/willow.jpg', 'thumbnail_url' => '%s/images/headers/willow-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Willow', AKYUZ_TEXT_DOMAIN ) ), 'hanoi' => array( 'url' => '%s/images/headers/hanoi.jpg', 'thumbnail_url' => '%s/images/headers/hanoi-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Hanoi Plant', AKYUZ_TEXT_DOMAIN ) ) ) ); } endif; // akyuz_setup if ( ! function_exists( 'akyuz_header_style' ) ) : /** * Styles the header image and text displayed on the blog * * @since Akyuz 1.0 */ function akyuz_header_style() { if(HEADER_IMAGE) { ?> Header admin panel. * * @since Akyyuz 1.0 */ function akyuz_admin_header_style() { ?> Header admin panel. * * @since Akyuz 1.0 */ function akyuz_admin_header_image() { ?>
' . __( 'Continue reading ', AKYUZ_TEXT_DOMAIN ) . ''; } /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link(). */ function akyuz_auto_excerpt_more( $more ) { return ' …' . akyuz_continue_reading_link(); } add_filter( 'excerpt_more', 'akyuz_auto_excerpt_more' ); /** * Adds a pretty "Continue Reading" link to custom post excerpts. */ function akyuz_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= akyuz_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'akyuz_custom_excerpt_more' ); /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. */ function akyuz_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'akyuz_page_menu_args' ); /** * Register our sidebars and widgetized areas. Also register the default Epherma widget. * * @since Akyuz 1.0 */ function akyuz_widgets_init() { register_sidebar( array( 'name' => __( 'Main Sidebar', AKYUZ_TEXT_DOMAIN ), 'id' => 'sidebar-1', 'before_widget' => '", 'before_title' => '', '' ); ?>