. 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 define( 'HEADER_TEXTCOLOR', '000' ); 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. //define( 'HEADER_IMAGE', get_template_directory().'/images/headers/hanoi.jpg' ); // The height and width of your custom header. define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyeleven_header_image_width', 943 ) ); define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyeleven_header_image_height', 190 ) ); 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 // Turn on random header image rotation by default. add_theme_support( 'custom-header', array( 'random-default' => true ) ); // 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 no custom options for text are set, let's bail if ( HEADER_TEXTCOLOR == get_header_textcolor() ) return; ?> Header admin panel. * * @since Akyyuz 1.0 */ function akyuz_admin_header_style() { ?> Header admin panel. * * @since Akyuz 1.0 */ function akyuz_admin_header_image() { ?>

onclick="return false;" href="">

>
' . __( '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' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Page Sidebar', AKYUZ_TEXT_DOMAIN ), 'id' => 'sidebar-2', 'description' => __( 'The sidebar for the optional Page Template', AKYUZ_TEXT_DOMAIN ), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Area One', AKYUZ_TEXT_DOMAIN ), 'id' => 'sidebar-3', 'description' => __( 'An optional widget area for your site footer', AKYUZ_TEXT_DOMAIN ), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Area Two', AKYUZ_TEXT_DOMAIN ), 'id' => 'sidebar-4', 'description' => __( 'An optional widget area for your site footer', AKYUZ_TEXT_DOMAIN ), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Area Three', AKYUZ_TEXT_DOMAIN ), 'id' => 'sidebar-5', 'description' => __( 'An optional widget area for your site footer', AKYUZ_TEXT_DOMAIN ), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Area Four', AKYUZ_TEXT_DOMAIN ), 'id' => 'sidebar-6', 'description' => __( 'An optional widget area for your site footer', AKYUZ_TEXT_DOMAIN ), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'akyuz_widgets_init' ); if ( ! function_exists( 'akyuz_content_nav' ) ) : /** * Display navigation to next/previous pages when applicable */ function akyuz_content_nav( $nav_id ) { global $wp_query; if ( $wp_query->max_num_pages > 1 ) : ?> ]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) return false; return esc_url_raw( $matches[1] ); } /** * Count the number of footer sidebars to enable dynamic classes for the footer */ function akyuz_footer_sidebar_class() { $count = 0; if ( is_active_sidebar( 'sidebar-3' ) ) $count++; if ( is_active_sidebar( 'sidebar-4' ) ) $count++; if ( is_active_sidebar( 'sidebar-5' ) ) $count++; if ( is_active_sidebar( 'sidebar-6' ) ) $count++; $class = ''; switch ( $count ) { case '1': $class = 'one'; break; case '2': $class = 'two'; break; case '3': $class = 'three'; break; case '4': $class = 'four'; break; } if ( $class ) echo 'class="' . $class . '"'; } if ( ! function_exists( 'akyuz_comment' ) ) : /** * Template for comments and pingbacks. * * @since Akyuz 1.0 */ function akyuz_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?>
  • ', '' ); ?>

  • id="li-comment-">
    comment_parent ) $avatar_size = 39; echo get_avatar( $comment, $avatar_size ); ?>
    said:', AKYUZ_TEXT_DOMAIN ), sprintf( '%3$s', get_comment_author_link(), esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_author_link() ) ); ?>
    ', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', AKYUZ_TEXT_DOMAIN ), get_comment_date(), get_comment_time() ) ) ); ?> | | __( 'Reply ', AKYUZ_TEXT_DOMAIN ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> comment_approved == '0' ) : ?>
    - ', AKYUZ_TEXT_DOMAIN ), esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date('j M') ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', AKYUZ_TEXT_DOMAIN ), get_the_author() ) ), get_the_author() ); } endif; /** * Adds two classes to the array of body classes. * * @since Akyuz 1.0 */ function akyuz_body_classes( $classes ) { if ( function_exists( 'is_multi_author' ) && ! is_multi_author() ) $classes[] = 'single-author'; if ( is_singular() && ! is_home() && ! is_page_template( 'sidebar-page.php' ) ) $classes[] = 'singular'; return $classes; } add_filter( 'body_class', 'akyuz_body_classes' ); /* * Akyuz Get Options Value Function */ if ( ! function_exists( 'akyuz_get_options_value' ) ) : function akyuz_get_options_value($akyuz_options){ $my_options = get_option( 'mytheme_options' ); return $my_options[$akyuz_options]; } endif; /* * Akyuz Get Social Bar Function */ if ( ! function_exists( 'akyuz_get_social_bar' ) ) : function akyuz_get_social_bar(){ $my_options = get_option( 'mytheme_options' ); if ( isset($my_options[AKYUZ_SHORTNAME.'_social_enable']))?> <?php bloginfo( 'name' );?>- Feedburner 0) ?> <?php bloginfo( 'name' );?>- Facebook 0) ?> <?php bloginfo( 'name' );?>- Twitter 0) ?> <?php bloginfo( 'name' );?>- Youtube 0) ?> <?php bloginfo( 'name' );?>- Flickr 0) ?> <?php bloginfo( 'name' );?>- Linkedin 0) ?><?php bloginfo( 'name' );?>- Delicious

    max_num_pages; if(!$pages) {$pages = 1;} } if(1 != $pages) { echo "
    Page ".$paged." of ".$pages.""; if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "« " . __("First", AKYUZ_TEXT_DOMAIN) . ""; if($paged > 1 && $showitems < $pages) echo "‹ " . __("Previous", AKYUZ_TEXT_DOMAIN) . ""; for ($i=1; $i <= $pages; $i++){ if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) { echo ($paged == $i)? "".$i."":"".$i.""; } } if ($paged < $pages && $showitems < $pages) echo "" . __("Next", AKYUZ_TEXT_DOMAIN) . " ›"; if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "" . __("Last", AKYUZ_TEXT_DOMAIN) . " »"; echo "
    \n"; } } add_action('wp_enqueue_scripts','akyuz_scripts_function'); function akyuz_scripts_function() { wp_enqueue_style('BluPrintResetCss', get_stylesheet_directory_uri() . '/css/reset.css', false); wp_enqueue_style('BluPrintScreenCss', get_stylesheet_directory_uri() . '/css/blueprint/screen.css', false); wp_enqueue_style('BluPrintPrintCss', get_stylesheet_directory_uri() . '/css/blueprint/print.css', false, '1.0','print'); wp_enqueue_style('BluPrintIECss', get_stylesheet_directory_uri() . '/css/blueprint/ie.css', false); wp_enqueue_style('jqslidemenu_css', get_stylesheet_directory_uri() . '/functions/menu/jqueryslidemenu.css', false); wp_enqueue_script("jquery"); wp_register_script('jqslidemenu_scr', get_stylesheet_directory_uri() . '/functions/menu/jqueryslidemenu.js', false); wp_enqueue_script('jqslidemenu_scr'); } ?>