'; } } add_action( 'wp_head', 'airi_pingback_header' ); /** * Returns menu type and if the menu is contained or stretched */ function airi_menu_layout() { //Type $type = get_theme_mod( 'menu_type', 'menuStyle2' ); //Contained or stretched $contained = get_theme_mod( 'menu_container', 'menuNotContained' ); $layout = array( 'type' => $type, 'contained' => $contained, ); return $layout; } /** * Menu container */ function airi_menu_container() { $layout = airi_menu_layout(); if ( 'menuNotContained' === $layout['contained'] ) { $container = 'container-fluid'; } else { $container = 'container'; } return $container; } /** * Menu style 3 (Extended 1) options */ function airi_get_extended1_options() { $default_social = array( array( 'icon' => 'fa-facebook', 'link_url' => 'https://facebook.com/yourprofile', ), array( 'icon' => 'fa-twitter', 'link_url' => 'https://twitter.com/yourprofile', ), ); $options = array( 'cta_text' => get_theme_mod( 'x1_cta_text', __( 'Get a quote', 'airi' ) ), 'cta_url' => get_theme_mod( 'x1_cta_url', __( 'http://example.org/contact/', 'airi' ) ), 'header_social' => get_theme_mod( 'x1_header_social', $default_social ), 'email_address' => get_theme_mod( 'x1_email_address', 'office@example.org' ), 'phone_number' => get_theme_mod( 'x1_phone_number', '+333.222.111' ), ); return $options; } /** * Blog layout */ if ( !function_exists( 'airi_blog_layout' ) ) { function airi_blog_layout() { $layout = get_theme_mod( 'blog_layout', 'layout-default' ); //Blog archive columns if ( $layout == 'layout-grid' || $layout == 'layout-masonry' ) { $cols = 'col-md-12'; $sidebar = false; } elseif ( $layout == 'layout-list-2' || $layout == 'layout-two-columns' ) { $cols = 'col-lg-9'; $sidebar = true; } else { $cols = 'col-lg-8'; $sidebar = true; } //Inner columns for list layout if ( $layout == 'layout-list' ) { $item_inner_cols = 'col-md-6 col-sm-12'; } elseif ( $layout == 'layout-list-2' ) { $item_inner_cols = ''; } else { $item_inner_cols = 'col-md-12'; } $setup = array( 'type' => $layout, 'sidebar' => $sidebar, 'cols' => $cols, 'item_inner_cols' => $item_inner_cols ); return $setup; } } /** * Single post layout */ if ( !function_exists( 'airi_single_layout' ) ) { function airi_single_layout() { $layout = get_theme_mod( 'single_post_layout', 'layout-default' ); //Single post columns if ( $layout == 'layout-default' ) { $cols = 'col-lg-8'; $sidebar = true; } else { $cols = 'col-md-12'; $sidebar = false; } $setup = array( 'type' => $layout, 'sidebar' => $sidebar, 'cols' => $cols, ); return $setup; } } /** * Adds class for blog grid and masonry layouts */ function airi_blog_grid( $classes ) { $layout = airi_blog_layout(); if ( !is_singular() && ( $layout['type'] == 'layout-grid' || $layout['type'] == 'layout-masonry' ) ) { $classes[] = 'col-lg-4 col-md-6'; } return $classes; } add_filter( 'post_class', 'airi_blog_grid' ); /** * Masonry data */ function airi_masonry_data() { $layout = airi_blog_layout(); if ( $layout['type'] == 'layout-masonry' ) { return 'data-masonry=\'{ "itemSelector": ".hentry", "columnWidth": ".grid-sizer", "percentPosition": "true"}\''; } } /** * Single comment template */ function airi_comment_template($comment, $args, $depth) { ?>
%s', get_comment_author_link() ) ; ?>