__( 'Primary Menu', 'amora' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); // Setup the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'amora_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); } endif; // amora_setup add_action( 'after_setup_theme', 'amora_setup' ); /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function amora_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'amora' ), 'id' => 'sidebar-1', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 1', 'amora' ), 'id' => 'sidebar-2', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 2', 'amora' ), 'id' => 'sidebar-3', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 3', 'amora' ), 'id' => 'sidebar-4', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 4', 'amora' ), 'id' => 'sidebar-5', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'amora_widgets_init' ); /** * Enqueue scripts and styles. */ function amora_scripts() { wp_enqueue_style( 'amora-style', get_stylesheet_uri() ); global $opt_amora; if ($opt_amora['opt-layout'] == '1') { wp_enqueue_style('amora-layout',get_template_directory_uri()."/css/layout/content-sidebar.css"); } else { wp_enqueue_style('amora-layout',get_template_directory_uri()."/css/layout/sidebar-content.css"); } wp_enqueue_style('amora-bootstrap-style',get_template_directory_uri()."/css/bootstrap/bootstrap.min.css", array('amora-layout')); wp_enqueue_style('amora-main-skin', get_template_directory_uri()."/css/skins/main.css",array('amora-bootstrap-style')); wp_enqueue_script('nivo-slider-js', get_template_directory_uri(). '/js/nivoslider.js', array('jquery')); wp_enqueue_style('nivo-slider-css', get_template_directory_uri(). "/css/slider/nivo-slider.css", array('amora-main-skin')); /* wp_enqueue_style('nivo-slider-default-theme-style', get_template_directory_uri(). "/css/slider/nivo.css", array('nivo-slider-css')); */ wp_enqueue_style('nivo-slider-default-theme-skin', get_template_directory_uri(). "/images/slider/default.css", array('nivo-slider-css')); wp_enqueue_script( 'amora-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); wp_enqueue_script( 'amora-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } function amora_initialize_header() { global $opt_amora; //Global theme options variable echo ""; ?> '2 Column Layout', '2' => '3 Column Layout', '1' => '4 Column layout', ); if (array_key_exists($input,$valid)) { return $input; } else { return ''; } } function amora_customizer( $wp_customize ) { $wp_customize-> add_section( 'layout_grid', array( 'title' => 'Layout Settings', 'priority' => 1 ) ); $wp_customize->add_setting( 'layout_option', array( 'default' => 'left', 'sanitize_callback' => 'sanitize_radio', ) ); $wp_customize->add_control( 'layout_option', array( 'type' => 'radio', 'label' => 'Select a Layout', 'section' => 'layout_grid', 'default' => '1', 'choices' => array( '3' => '2 Column Layout', '2' => '3 Column Layout', '1' => '4 Column layout', ) ) ); } add_action('customize_register', 'amora_customizer'); function amora_pagination() { global $wp_query; $big = 12345678; $page_format = paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages, 'type' => 'array' ) ); if( is_array($page_format) ) { $paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged'); echo ''; }} function amora_social() { global $opt_amora; return $opt_amora['social']; } add_action( 'wp_enqueue_scripts', 'amora_scripts' ); /** * Implement the Custom Header feature. */ //require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; require get_template_directory() . '/admin/admin-init.php'; require get_template_directory() . '/admin/layout.php';