'f0eeeb', 'default-image' => get_template_directory_uri().'/images/bg.png' ); $background = apply_filters('origami_custom_background', $background); add_theme_support( 'custom-background', $background); // Use custom headers for site logo add_theme_support( 'custom-header' , array( 'flex-height' => true, 'flex-width' => true, 'header-text' => false, )); add_theme_support( "title-tag" ); add_editor_style(); // Set up the image sizes set_post_thumbnail_size(904,400,true); add_image_size('post-thumbnail-mobile', 480, 420, true); add_image_size('post-thumbnail-full', 904, 904, false); add_image_size('origami-slider', 904, 500, true); /** * Support panels */ add_theme_support( 'siteorigin-panels', array( 'margin-bottom' => 30, 'responsive' => true, 'home-page' => true, 'home-page-default' => false, ) ); add_theme_support( 'custom-logo', array( 'height' => 240, 'width' => 240, 'flex-height' => true, ) ); if( siteorigin_setting('responsive_nav') ) { include get_template_directory().'/inc/mobilenav/mobilenav.php'; } } endif; add_action('after_setup_theme', 'origami_setup'); function origami_siteorigin_premium_support(){ // This theme supports the no attribution addon add_theme_support( 'siteorigin-premium-no-attribution', array( 'filter' => 'siteorigin_attribution_footer', 'enabled' => siteorigin_setting( 'display_attribution' ), 'siteorigin_setting' => 'display_attribution' ) ); // This theme supports the ajax comments addon add_theme_support( 'siteorigin-premium-ajax-comments', array( 'enabled' => siteorigin_setting( 'comments_ajax' ), 'siteorigin_setting' => 'comments_ajax' ) ); } add_action( 'after_setup_theme', 'origami_siteorigin_premium_support' ); if(!function_exists('origami_widgets_init')) : /** * Registers Origami's Sidebars * * @action register_sidebar */ function origami_widgets_init(){ register_sidebar( array( 'id' => 'site-footer', 'name' => __( 'Footer', 'origami' ), 'before_widget' => '
', ) ); register_widget( 'SiteOrigin_Widgets_CTA' ); register_widget( 'SiteOrigin_Widgets_Button' ); register_widget( 'SiteOrigin_Widgets_Headline' ); register_widget( 'SiteOrigin_Widgets_IconText' ); } endif; add_action('widgets_init', 'origami_widgets_init'); if(!function_exists('origami_title')) : /** * Give Origami a nice title. * * @param string $title The starting title * @param $sep * @param $seplocation * @return string * * @filter wp_title */ function origami_title($title, $sep, $seplocation){ global $page, $paged; if ( is_feed() ) return $title; // Add the blog name. $title = $title.get_bloginfo( 'name' ); // Add the blog 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 .= ' | ' . sprintf( __( 'Page %s', 'origami' ), max( $paged, $page ) ); return $title; } endif; add_filter('wp_title', 'origami_title', 10, 3); if ( ! function_exists( 'origami_enqueue_scripts' ) ) : /** * Enqueue Origami's scripts. * * @action * @return void */ function origami_enqueue_scripts() { wp_enqueue_style( 'origami', get_stylesheet_uri(), array(), SITEORIGIN_THEME_VERSION ); if ( ! class_exists( 'Jetpack' ) && siteorigin_setting( 'responsive_fitvids' ) ) { wp_enqueue_script( 'fitvids', get_template_directory_uri() . '/js/jquery.fitvids' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ), '1.0' ); } wp_enqueue_script( 'origami', get_template_directory_uri() . '/js/origami' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ), SITEORIGIN_THEME_VERSION ); wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/js/jquery.flexslider' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ), '2.1' ); wp_enqueue_style( 'flexslider', get_template_directory_uri() . '/css/flexslider.css', array(), '2.0' ); if ( is_singular() ) wp_enqueue_script( "comment-reply" ); } endif; add_action('wp_enqueue_scripts', 'origami_enqueue_scripts'); if(!function_exists('origami_add_meta_boxes')) : /** * Add post metaboxes * * @action add_meta_boxes */ function origami_add_meta_boxes(){ // Add the column metaboxes to posts and pages add_meta_box('post-columns', __('Columns', 'origami'), 'origami_render_metabox_columns', 'post', 'side'); add_meta_box('post-columns', __('Columns', 'origami'), 'origami_render_metabox_columns', 'page', 'side'); } endif; add_action('add_meta_boxes', 'origami_add_meta_boxes'); if(!function_exists('origami_render_metabox_columns')) : /** * Render the columns metabox. */ function origami_render_metabox_columns(){ get_template_part('admin/metabox', 'columns'); } endif; if(!function_exists('origami_save_post')) : /** * Save the post * * @action save_post */ function origami_save_post($post_id){ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return; if(!current_user_can('edit_post', $post_id)) return; if(!isset($_REQUEST['content_columns'])) return; update_post_meta($post_id, 'content_columns', intval($_REQUEST['content_columns'])); } endif; add_action('save_post', 'origami_save_post'); if(!function_exists('origami_enqueue_google_webfonts')) : /** * This just displays the Google web fonts */ function origami_enqueue_google_webfonts(){ if( ! get_header_image() ){ // Enqueue the logo font as well (Terminal Dosis 200) wp_enqueue_style('google-webfonts', '//fonts.googleapis.com/css?family=Terminal+Dosis:200,400'); } else{ // Enqueue only the text fonts that we need wp_enqueue_style('google-webfonts', '//fonts.googleapis.com/css?family=Terminal+Dosis:400'); } } endif; add_action('wp_enqueue_scripts', 'origami_enqueue_google_webfonts'); if(!function_exists('origami_comment')) : /** * Display a comment * * @param $comment The comment * @param $args The arguments * @param $depth The depth */ function origami_comment($comment, $args, $depth){ $GLOBALS['comment'] = $comment; ?>