'__return_false') ); } add_action( 'after_setup_theme', 'alimir_setup' ); function alimir_scripts() { if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); wp_enqueue_style( 'style', get_stylesheet_uri() ); wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,700|Open+Sans+Condensed:300,700' ); wp_deregister_script('jquery'); wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js", false, null); wp_enqueue_script('jquery'); wp_enqueue_script( 'skel', get_template_directory_uri() . '/js/skel.min.js', array( 'jquery' ), '2013-9-10', true ); wp_enqueue_script( 'skel-panels', get_template_directory_uri() . '/js/skel-panels.min.js', array( 'jquery' ), '2013-9-10', true ); echo ' '; } add_action( 'wp_enqueue_scripts', 'alimir_scripts' ); function alimir_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'twentytwelve' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'alimir_wp_title', 10, 2 ); function alimir_widgets_init(){ register_sidebar(array( 'name' => __('Widget Area', 'alimir'), 'id' => 'sidebar-1', 'description' => __('Appears on posts and pages in the sidebar.', 'alimir'), 'before_widget' => '
', 'before_title' => '' )); } add_action( 'widgets_init', 'alimir_widgets_init' ); function wp_pagination() { if( is_singular() ) return; global $wp_query; /** Stop execution if there's only 1 page */ if( $wp_query->max_num_pages <= 1 ) return; $paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1; $max = intval( $wp_query->max_num_pages ); /** Add current page to the array */ if ( $paged >= 1 ) $links[] = $paged; /** Add the pages around the current page to the array */ if ( $paged >= 3 ) { $links[] = $paged - 1; $links[] = $paged - 2; } if ( ( $paged + 2 ) <= $max ) { $links[] = $paged + 2; $links[] = $paged + 1; } echo '' . "\n"; } ?>