'ffffff', 'default-image' => '%s/images/header.jpg', 'width' => apply_filters( 'typo_header_image_width', 1920 ), 'height' => apply_filters( 'typo_header_image_height', 400 ), 'flex-height' => true, 'flex-width' => true, 'random-default' => true, 'wp-head-callback' => 'swiss_header_style', 'admin-head-callback' => 'swiss_admin_header_style', 'admin-preview-callback' => 'swiss_header_img', ); add_theme_support( 'custom-header', $custom_header_support ); /*********************/ register_default_headers( array( 'sketchbook' => array( 'url' => '%s/images/header.jpg', 'thumbnail_url' => '%s/images/header-thumbnail.jpg', 'description' => __( 'Headers 1', 'swiss' ) ), 'sketchbook2' => array( 'url' => '%s/images/header-2.jpg', 'thumbnail_url' => '%s/images/header-2-thumbnail.jpg', 'description' => __( 'Headers 2', 'swiss' ) ), 'sketchbook3' => array( 'url' => '%s/images/header-3.jpg', 'thumbnail_url' => '%s/images/header-3-thumbnail.jpg', 'description' => __( 'Headers 3', 'swiss' ), ), 'sketchbook4' => array( 'url' => '%s/images/header-4.jpg', 'thumbnail_url' => '%s/images/header-4-thumbnail.jpg', 'description' => __( 'Headers 4', 'swiss' ), ) ) ); /*********************/ add_editor_style('css/editor-style.css'); /*********************/ register_nav_menus(array('primary' =>__( 'Primary navigation', 'swiss' ))); /*********************/ add_filter('use_default_gallery_style', '__return_false'); /**********end setup***********/ } /*********************/ function swiss_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar Widget Area', 'swiss'), 'id' => 'sidebar-widget-area', 'description' => __( 'The sidebar widget area', 'swiss' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } add_action( 'widgets_init', 'swiss_widgets_init' ); /*********************/ function swiss_pagination() { global $wp_query; $big = 99999; echo '
    '; echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'prev_next' => True, 'show_all' => False, 'total' => $wp_query->max_num_pages, 'prev_text' => __('« Previous','swiss'), 'next_text' => __('Next »','swiss') ) ); echo'
    ' ; } /********************************************************************************************/ function swiss_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; $title .= get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'swiss' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'swiss_wp_title', 10, 2 ); /********************************************************************************************/ function swiss_get_link_url() { $content = get_the_content(); $has_url = get_url_in_content( $content ); return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() ); } /*********************/ function swiss_author() { if ( is_single() && get_the_author_meta( 'description' ) ) : ?>