'a73511', ) ); add_theme_support('post-thumbnails'); set_post_thumbnail_size( 625, 9999 ); } add_action('after_setup_theme', 'arwebstudio_setup'); require( get_template_directory() . '/inc/custom-header.php'); function arwebstudio_scripts_styles() { if (is_singular() && comments_open() && get_option('thread_comments')) wp_enqueue_script('comment-reply'); wp_enqueue_script('ar-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '1.0', true ); if ('off' !== _x('on', 'PTSansNarrowRegular font: on or off', 'arwebstudio')) { $subsets = 'latin,latin-ext'; $subset = _x('no-subset', 'PTSansNarrowRegular font: add new subset (greek, cyrillic, vietnamese)', 'arwebstudio'); if ('cyrillic' == $subset ) $subsets .= ',cyrillic,cyrillic-ext'; elseif ('greek' == $subset ) $subsets .= ',greek,greek-ext'; elseif ('vietnamese' == $subset ) $subsets .= ',vietnamese'; $query_args = array( 'family' => 'PTSansNarrowRegular:400italic,700', 'subset' => $subsets ); wp_enqueue_style('ar-fonts'); } wp_enqueue_style('ar-style', get_stylesheet_uri()); } add_action('wp_enqueue_scripts', 'arwebstudio_scripts_styles'); function arwebstudio_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', 'arwebstudio'), max( $paged, $page ) ); return $title; } add_filter('wp_title', 'arwebstudio_wp_title', 10, 2 ); function arwebstudio_page_menu_args( $args ) { if ( ! isset( $args['show_home'] ) ) $args['show_home'] = true; return $args; } add_filter('wp_page_menu_args', 'arwebstudio_page_menu_args'); function arwebstudio_widgets_init() { register_sidebar( array( 'name' => __('Meta widget', 'arwebstudio'), 'id' => 'sidebar-1', 'description' => __('Appears on posts and pages except the optional Front Page template, which has its own widgets', 'arwebstudio'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' ) ); register_sidebar( array( 'name' => __('Tag Cloud widget', 'arwebstudio'), 'id' => 'sidebar-2', 'description' => __('Appears when using the optional Front Page template with a page set as Static Front Page', 'arwebstudio'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' ) ); register_sidebar( array( 'name' => __('Various widgets', 'arwebstudio'), 'id' => 'sidebar-3', 'description' => __('Appears when using the optional Front Page template with a page set as Static Front Page', 'arwebstudio'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' ) ); register_sidebar( array( 'name' => __('Search Form Widget Area', 'arwebstudio'), 'id' => 'sidebar-4', 'description' => __('Search Form Widget Area', 'arwebstudio'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' ) ); register_sidebar( array( 'name' => __('First Widget area in the footer', 'arwebstudio'), 'id' => 'sidebar-5', 'description' => __('First Widget area in the footer', 'arwebstudio'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' ) ); register_sidebar( array( 'name' => __('Second Widget area in the footer', 'arwebstudio'), 'id' => 'sidebar-6', 'description' => __('Second Widget area in the footer', 'arwebstudio'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' ) ); register_sidebar( array( 'name' => __('Third Widget area in the footer', 'arwebstudio'), 'id' => 'sidebar-7', 'description' => __('Third Widget area in the footer', 'arwebstudio'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' ) ); } add_action('widgets_init', 'arwebstudio_widgets_init'); if ( ! function_exists('arwebstudio_content_nav')) : function arwebstudio_content_nav($nav_id) { global $wp_query; $html_id = esc_attr($nav_id); if ( $wp_query->max_num_pages > 1 ) : ?> comment_type) : case 'pingback' : case 'trackback' : ?>
  • id="comment-">

    ', ''); ?>

  • id="li-comment-">
    %1$s %2$s', get_comment_author_link(), ( $comment->user_id === $post->post_author) ? ' ' . __('Post author', 'arwebstudio') . '' : '' ); printf('', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time('c'), sprintf( __('%1$s at %2$s', 'arwebstudio'), get_comment_date(), get_comment_time() ) ); ?>
    comment_approved ) : ?>

    ', '

    '); ?>
    __('Reply', 'arwebstudio'), 'after' => ' ', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    ', esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date('c')), esc_html( get_the_date() ) ); $author = sprintf('', esc_url( get_author_posts_url( get_the_author_meta('ID')) ), esc_attr( sprintf( __('View all posts by %s', 'arwebstudio'), get_the_author() ) ), get_the_author() ); if ( $tag_list ) { $utility_text = __('

    Categories: %1$s

    Tags: %2$s

    %3$s

    Author %4$s

    ', 'arwebstudio'); } elseif ( $categories_list ) { $utility_text = __('

    Categories: %1$s

    %3$s

    Author: %4$s

    ', 'arwebstudio'); } else { $utility_text = __('%3$s

    Author: %4$s

    ', 'arwebstudio'); } printf( $utility_text, $categories_list, $tag_list, $date, $author ); } endif; function arwebstudio_body_class( $classes ) { $background_color = get_background_color(); if(!is_page_template('page-templates/full-width.php')) { foreach($classes as $key => $value) { if ($value == 'full-width') unset($classes[$key]); } } return $classes; if ( is_page_template('page-templates/front-page.php')) { $classes[] = 'template-front-page'; if ( has_post_thumbnail() ) $classes[] = 'has-post-thumbnail'; } if ( empty( $background_color ) ) $classes[] = 'custom-background-empty'; elseif ( in_array( $background_color, array('fff', 'a73511')) ) $classes[] = 'custom-background-white'; if ( wp_style_is('arwebstudio-fonts', 'queue')) $classes[] = 'custom-font-enabled'; if ( ! is_multi_author() ) $classes[] = 'single-author'; return $classes; } add_filter('body_class', 'arwebstudio_body_class'); function arwebstudio_content_width() { if ( is_page_template('page-templates/full-width.php') || is_attachment() || ! is_active_sidebar('sidebar-1')) { global $content_width; $content_width = 960; } } add_action('template_redirect', 'arwebstudio_content_width'); function arwebstudio_customize_register( $wp_customize ) { $wp_customize->get_setting('blogname')->transport = 'postMessage'; $wp_customize->get_setting('blogdescription')->transport = 'postMessage'; } add_action('customize_register', 'arwebstudio_customize_register'); function arwebstudio_customize_preview_js() { wp_enqueue_script('arwebstudio-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array('customize-preview'), '20120827', true ); } add_action('customize_preview_init', 'arwebstudio_customize_preview_js');