'ffffff', ) ); /** * Enable support for Post Thumbnails on posts and pages. * * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 150, true ); add_image_size( 'amaryllo-news-box', 335, 219, true ); add_image_size( 'amaryllo-portfolio-box', 360, 230, true ); // Menus add_theme_support( 'menus' ); register_nav_menu( 'main-menu', _x( 'Main Menu', 'backend', 'amaryllo' ) ); register_nav_menu( 'top-menu', _x( 'Top Menu', 'backend', 'amaryllo' ) ); // Add theme support for Semantic Markup add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); // add excerpt support for pages add_post_type_support( 'page', 'excerpt' ); // Add CSS for the TinyMCE editor add_editor_style(); } add_action( 'after_setup_theme', 'amaryllo_theme_setup' ); } /** * Enqueue CSS stylesheets */ if( ! function_exists( 'amaryllo_enqueue_styles' ) ) { function amaryllo_enqueue_styles() { // main style wp_enqueue_style( 'amaryllo-style', get_stylesheet_uri() ); // owl theme wp_enqueue_style( 'amaryllo-owl-theme', get_template_directory_uri() . '/assets/css/owl.theme.css', array(), '1.0' ); // owl carousel wp_enqueue_style( 'amaryllo-owl-carousel', get_template_directory_uri() . '/assets/css/owl.carousel.css', array(), '1.0' ); // font awesome wp_enqueue_style( 'amaryllo-font-awesome', get_template_directory_uri() . '/assets/css/font-awesome.css', array(), '1.0' ); // app wp_enqueue_style( 'amaryllo-app-main', get_template_directory_uri() . '/assets/css/app.css', array(), '1.0' ); // responsive wp_enqueue_style( 'amaryllo-responsive-main', get_template_directory_uri() . '/assets/css/responsive.css', array(), '1.0' ); } add_action( 'wp_enqueue_scripts', 'amaryllo_enqueue_styles' ); } /** * Enqueue JS scripts */ if( ! function_exists( 'amaryllo_enqueue_scripts' ) ) { function amaryllo_enqueue_scripts() { // modernizr for the frontend feature detection wp_enqueue_script( 'amaryllo-modernizr', get_template_directory_uri() . '/assets/js/modernizr.js', array(), null ); // OWL carousel for sliders wp_enqueue_script( 'amaryllo-carousel', get_template_directory_uri() . '/assets/js/owl.carousel.js', array('jquery'), null ); // main for script js wp_enqueue_script( 'amaryllo-main', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), null ); // for nested comments if ( is_singular() && comments_open() ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'amaryllo_enqueue_scripts' ); } // load script for IE9 function amaryllo_ie_support_header() { echo ''. "\n"; } add_action( 'wp_head', 'amaryllo_ie_support_header', 1 ); /** * Register sidebars for Amaryllo * * @package Amaryllo */ function amaryllo_sidebars() { // Blog Sidebar register_sidebar(array( 'name' => __( 'Blog Sidebar', "amaryllo"), 'id' => 'blog-sidebar', 'description' => __( 'Sidebar on the blog layout.', "amaryllo"), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); // Footer Sidebar register_sidebar(array( 'name' => __( 'Footer Widget Area', "amaryllo"), 'id' => 'footer-widget-area', 'description' => __( 'The footer widget area', "amaryllo"), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); } add_action( 'widgets_init', 'amaryllo_sidebars' ); /** * Create a nicely formatted and more specific title element text for output * in head of document, based on current view. * * @param string $title Default title text for current view. * @param string $sep Optional separator. * @return string The filtered title. */ if ( ! function_exists( 'amaryllo_wp_title' ) ) { function amaryllo_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', 'amaryllo'), max( $paged, $page ) ); } return $title; } add_filter( 'wp_title', 'amaryllo_wp_title', 10, 2 ); } // Create Function Paginate if ( ! function_exists( 'amaryllo_paginate_page' ) ) : function amaryllo_paginate_page() { wp_link_pages( array( 'before' => '
', 'link_before' => '','link_after' => '' ) ); } endif; // Create Function Credits if ( ! function_exists( 'amaryllo_credits' ) ) : function amaryllo_credits() { $text = 'Theme created by Themes Tune. Powered by WordPress.org'; echo apply_filters( 'amaryllo_credits_text', $text) ; } endif; add_action( 'amaryllo_display_credits', 'amaryllo_credits' ); ?>