Example #1
0
function x_shortcodes_enqueue_site_styles()
{
    if (!function_exists('x_get_stack')) {
        //
        // X not active.
        //
        wp_enqueue_style('x-shortcodes', X_SHORTCODES_URL . '/css/site/style.css', NULL, X_SHORTCODES_VERSION, 'all');
    } else {
        //
        // Legacy styles.
        //
        if (defined('X_VERSION') && version_compare(X_VERSION, '3.2.2', '<')) {
            $stack = x_get_option('x_stack') ? x_get_option('x_stack') : 'integrity';
            $design = x_get_option('x_integrity_design') ? x_get_option('x_integrity_design') : 'light';
            if ($stack == 'integrity' && $design == 'light') {
                $ext = '-light';
            } elseif ($stack == 'integrity' && $design == 'dark') {
                $ext = '-dark';
            } else {
                $ext = '';
            }
            wp_enqueue_style('x-shortcodes', X_SHORTCODES_URL . '/css/' . $stack . $ext . '.css', NULL, X_SHORTCODES_VERSION, 'all');
        }
    }
}
function x_portfolio_init()
{
    $slug = sanitize_title(x_get_option('x_custom_portfolio_slug'));
    $menu_icon = floatval(get_bloginfo('version')) >= '3.8' ? 'dashicons-format-gallery' : NULL;
    //
    // Enable the custom post type.
    //
    $labels = array('name' => __('Portfolio', '__x__'), 'singular_name' => __('Portfolio Item', '__x__'), 'add_new' => __('Add New Item', '__x__'), 'add_new_item' => __('Add New Portfolio Item', '__x__'), 'edit_item' => __('Edit Portfolio Item', '__x__'), 'new_item' => __('Add New Portfolio Item', '__x__'), 'view_item' => __('View Item', '__x__'), 'search_items' => __('Search Portfolio', '__x__'), 'not_found' => __('No portfolio items found', '__x__'), 'not_found_in_trash' => __('No portfolio items found in trash', '__x__'));
    $args = array('labels' => $labels, 'public' => true, 'show_ui' => true, 'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'comments', 'author', 'custom-fields', 'revisions'), 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('slug' => $slug, 'with_front' => false), 'menu_position' => 5, 'menu_icon' => $menu_icon, 'has_archive' => true);
    $args = apply_filters('portfolioposttype_args', $args);
    register_post_type('x-portfolio', $args);
    //
    // Portfolio tags taxonomy.
    //
    $taxonomy_portfolio_tag_labels = array('name' => __('Portfolio Tags', '__x__'), 'singular_name' => __('Portfolio Tag', '__x__'), 'search_items' => __('Search Portfolio Tags', '__x__'), 'popular_items' => __('Popular Portfolio Tags', '__x__'), 'all_items' => __('All Portfolio Tags', '__x__'), 'parent_item' => __('Parent Portfolio Tag', '__x__'), 'parent_item_colon' => __('Parent Portfolio Tag:', '__x__'), 'edit_item' => __('Edit Portfolio Tag', '__x__'), 'update_item' => __('Update Portfolio Tag', '__x__'), 'add_new_item' => __('Add New Portfolio Tag', '__x__'), 'new_item_name' => __('New Portfolio Tag Name', '__x__'), 'separate_items_with_commas' => __('Separate portfolio tags with commas', '__x__'), 'add_or_remove_items' => __('Add or remove portfolio tags', '__x__'), 'choose_from_most_used' => __('Choose from the most used portfolio tags', '__x__'), 'menu_name' => __('Portfolio Tags', '__x__'));
    $taxonomy_portfolio_tag_args = array('labels' => $taxonomy_portfolio_tag_labels, 'public' => true, 'show_in_nav_menus' => true, 'show_ui' => true, 'show_tagcloud' => true, 'hierarchical' => false, 'rewrite' => array('slug' => $slug . '-tag', 'with_front' => false), 'show_admin_column' => true, 'query_var' => true);
    register_taxonomy('portfolio-tag', array('x-portfolio'), $taxonomy_portfolio_tag_args);
    //
    // Portfolio categories taxonomy.
    //
    $taxonomy_portfolio_category_labels = array('name' => __('Portfolio Categories', '__x__'), 'singular_name' => __('Portfolio Category', '__x__'), 'search_items' => __('Search Portfolio Categories', '__x__'), 'popular_items' => __('Popular Portfolio Categories', '__x__'), 'all_items' => __('All Portfolio Categories', '__x__'), 'parent_item' => __('Parent Portfolio Category', '__x__'), 'parent_item_colon' => __('Parent Portfolio Category:', '__x__'), 'edit_item' => __('Edit Portfolio Category', '__x__'), 'update_item' => __('Update Portfolio Category', '__x__'), 'add_new_item' => __('Add New Portfolio Category', '__x__'), 'new_item_name' => __('New Portfolio Category Name', '__x__'), 'separate_items_with_commas' => __('Separate portfolio categories with commas', '__x__'), 'add_or_remove_items' => __('Add or remove portfolio categories', '__x__'), 'choose_from_most_used' => __('Choose from the most used portfolio categories', '__x__'), 'menu_name' => __('Portfolio Categories', '__x__'));
    $taxonomy_portfolio_category_args = array('labels' => $taxonomy_portfolio_category_labels, 'public' => true, 'show_in_nav_menus' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_tagcloud' => true, 'hierarchical' => true, 'rewrite' => array('slug' => $slug . '-category', 'with_front' => false), 'query_var' => true);
    register_taxonomy('portfolio-category', array('x-portfolio'), $taxonomy_portfolio_category_args);
    //
    // Flush rewrite rules if portfolio slug is updated.
    //
    if (get_transient('x_portfolio_slug_before') != get_transient('x_portfolio_slug_after')) {
        flush_rewrite_rules(false);
        delete_transient('x_portfolio_slug_before');
        delete_transient('x_portfolio_slug_after');
    }
}
function vint_portfolio_item_featured_content()
{
    if (x_get_option('x_portfolio_enable_cropped_thumbs', '') == '1') {
        vint_featured_portfolio('cropped');
    } else {
        vint_featured_portfolio();
    }
}
 function x_get_content_layout()
 {
     $content_layout = x_get_option('x_layout_content', 'content-sidebar');
     if ($content_layout != 'full-width') {
         if (is_home()) {
             $opt = x_get_option('x_blog_layout', 'sidebar');
             $layout = $opt == 'sidebar' ? $content_layout : $opt;
         } elseif (is_singular('post')) {
             $meta = get_post_meta(get_the_ID(), '_x_post_layout', true);
             $layout = $meta == 'on' ? 'full-width' : $content_layout;
         } elseif (x_is_portfolio_item()) {
             $layout = 'full-width';
         } elseif (x_is_portfolio()) {
             $meta = get_post_meta(get_the_ID(), '_x_portfolio_layout', true);
             $layout = $meta == 'sidebar' ? $content_layout : $meta;
         } elseif (is_page_template('template-layout-content-sidebar.php')) {
             $layout = 'content-sidebar';
         } elseif (is_page_template('template-layout-sidebar-content.php')) {
             $layout = 'sidebar-content';
         } elseif (is_page_template('template-layout-full-width.php')) {
             $layout = 'full-width';
         } elseif (is_archive()) {
             if (x_is_shop() || x_is_product_category() || x_is_product_tag()) {
                 $opt = x_get_option('x_woocommerce_shop_layout_content', 'sidebar');
                 $layout = $opt == 'sidebar' ? $content_layout : $opt;
             } else {
                 $opt = x_get_option('x_archive_layout', 'sidebar');
                 $layout = $opt == 'sidebar' ? $content_layout : $opt;
             }
         } elseif (x_is_product()) {
             $layout = 'full-width';
         } elseif (x_is_bbpress()) {
             $opt = x_get_option('x_bbpress_layout_content', 'sidebar');
             $layout = $opt == 'sidebar' ? $content_layout : $opt;
         } elseif (x_is_buddypress()) {
             $opt = x_get_option('x_buddypress_layout_content', 'sidebar');
             $layout = $opt == 'sidebar' ? $content_layout : $opt;
         } elseif (is_404()) {
             $layout = 'full-width';
         } else {
             $layout = $content_layout;
         }
     } else {
         $layout = $content_layout;
     }
     return $layout;
 }
Example #5
0
 function x_site_icons()
 {
     $icon_favicon = x_get_option('x_icon_favicon');
     $icon_touch = x_get_option('x_icon_touch');
     $icon_tile = x_get_option('x_icon_tile');
     $icon_tile_bg_color = x_get_option('x_icon_tile_bg_color');
     if ($icon_favicon != '') {
         echo '<link rel="shortcut icon" href="' . x_make_protocol_relative($icon_favicon) . '">';
     }
     if ($icon_touch != '') {
         echo '<link rel="apple-touch-icon-precomposed" href="' . x_make_protocol_relative($icon_touch) . '">';
     }
     if ($icon_tile != '') {
         echo '<meta name="msapplication-TileColor" content="' . $icon_tile_bg_color . '">';
         echo '<meta name="msapplication-TileImage" content="' . x_make_protocol_relative($icon_tile) . '">';
     }
 }
Example #6
0
 function x_icon_comment_number()
 {
     if (comments_open()) {
         $title = apply_filters('x_entry_meta_comments_title', get_the_title());
         $link = apply_filters('x_entry_meta_comments_link', get_comments_link());
         $number = apply_filters('x_entry_meta_comments_number', get_comments_number());
         if ($number == 0) {
             $comments = '';
         } else {
             $comments = sprintf('<a href="%1$s" title="%2$s" class="meta-comments">%3$s</a>', esc_url($link), esc_attr(sprintf(__('Leave a comment on: &ldquo;%s&rdquo;', '__x__'), $title)), number_format_i18n($number));
         }
     } else {
         $comments = '';
     }
     $post_type = get_post_type();
     $post_type_post = $post_type == 'post';
     $no_post_meta = x_get_option('x_blog_enable_post_meta') == '';
     if ($post_type_post && $no_post_meta) {
         return;
     } else {
         echo $comments;
     }
 }
Example #7
0
<?php

// =============================================================================
// VIEWS/GLOBAL/_BRAND.PHP
// -----------------------------------------------------------------------------
// Outputs the brand.
// =============================================================================
$site_name = get_bloginfo('name');
$site_description = get_bloginfo('description');
$logo = x_make_protocol_relative(x_get_option('x_logo'));
$site_logo = '<img src="' . $logo . '" alt="' . $site_description . '">';
?>

<?php 
echo is_front_page() ? '<h1 class="visually-hidden">' . $site_name . '</h1>' : '';
?>

<a href="<?php 
echo home_url('/');
?>
" class="<?php 
x_brand_class();
?>
" title="<?php 
echo $site_description;
?>
">
  <?php 
echo $logo == '' ? $site_name : $site_logo;
?>
</a>
Example #8
0
// -----------------------------------------------------------------------------
// @version 1.6.4
// =============================================================================
if (!defined('ABSPATH')) {
    exit;
    // Exit if accessed directly
}
global $product, $woocommerce, $woocommerce_loop;
$crosssells = WC()->cart->get_cross_sells();
if (sizeof($crosssells) == 0) {
    return;
}
$meta_query = WC()->query->get_meta_query();
$enable = x_get_option('x_woocommerce_cart_cross_sells_enable');
$count = x_get_option('x_woocommerce_cart_cross_sells_count');
$columns = x_get_option('x_woocommerce_cart_cross_sells_columns');
$args = array('post_type' => 'product', 'ignore_sticky_posts' => 1, 'no_found_rows' => 1, 'posts_per_page' => apply_filters('woocommerce_cross_sells_total', $count), 'orderby' => $orderby, 'post__in' => $crosssells, 'meta_query' => $meta_query);
$products = new WP_Query($args);
$woocommerce_loop['columns'] = apply_filters('woocommerce_cross_sells_columns', $columns);
if ($products->have_posts() && $enable == '1') {
    ?>

  <div class="cross-sells cols-<?php 
    echo $columns;
    ?>
">
    <h2><?php 
    _e('You May Be Interested In&hellip;', '__x__');
    ?>
</h2>
Example #9
0
<?php

// =============================================================================
// VIEWS/INTEGRITY/_BREADCRUMBS.PHP
// -----------------------------------------------------------------------------
// Breadcrumb output for Integrity.
// =============================================================================
?>

<?php 
if (!is_front_page()) {
    ?>
  <?php 
    if (x_get_option('x_breadcrumb_display') == '1') {
        ?>

    <div class="x-breadcrumb-wrap">
      <div class="x-container max width">

        <?php 
        x_breadcrumbs();
        ?>

        <?php 
        if (is_single() || x_is_portfolio_item()) {
            ?>
          <?php 
            x_entry_navigation();
            ?>
        <?php 
        }
Example #10
0
 function x_bbpress_navbar_menu($items, $args)
 {
     if (X_BBPRESS_IS_ACTIVE && x_get_option('x_bbpress_header_menu_enable', '') == '1') {
         $submenu_items = '';
         $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_search_url() . '" class="cf"><i class="x-icon-search" data-x-icon="&#xf002;"></i> <span>' . __('Forums Search', '__x__') . '</span></a></li>';
         if (is_user_logged_in()) {
             $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_favorites_permalink(get_current_user_id()) . '" class="cf"><i class="x-icon-star" data-x-icon="&#xf005;"></i> <span>' . __('Favorites', '__x__') . '</span></a></li>';
             $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_subscriptions_permalink(get_current_user_id()) . '" class="cf"><i class="x-icon-bookmark" data-x-icon="&#xf02e;"></i> <span>' . __('Subscriptions', '__x__') . '</span></a></li>';
         }
         if (!X_BUDDYPRESS_IS_ACTIVE || X_BUDDYPRESS_IS_ACTIVE && x_get_option('x_buddypress_header_menu_enable', '') == '') {
             if (!is_user_logged_in()) {
                 $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . wp_login_url() . '" class="cf"><i class="x-icon-sign-in" data-x-icon="&#xf090;"></i> <span>' . __('Log in', '__x__') . '</span></a></li>';
             } else {
                 $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_user_profile_url(get_current_user_id()) . '" class="cf"><i class="x-icon-cog" data-x-icon="&#xf013;"></i> <span>' . __('Profile', '__x__') . '</span></a></li>';
             }
         }
         if ($args->theme_location == 'primary') {
             $items .= '<li class="menu-item current-menu-parent menu-item-has-children x-menu-item x-menu-item-bbpress">' . '<a href="' . get_post_type_archive_link(bbp_get_forum_post_type()) . '" class="x-btn-navbar-bbpress">' . '<span><i class="x-icon-comment" data-x-icon="&#xf075;"></i><span class="x-hidden-desktop"> ' . __('Forums', '__x__') . '</span></span>' . '</a>' . '<ul class="sub-menu">' . $submenu_items . '</ul>' . '</li>';
         }
     }
     return $items;
 }
    ?>
;
<?php 
}
?>
font-weight: <?php 
echo $x_headings_font_weight;
?>
;
<?php 
if (x_is_font_italic($x_headings_font_weight_and_style)) {
    ?>
  font-style: italic;
<?php 
}
if (x_get_option('x_headings_uppercase_enable', '') == 1) {
    ?>
  text-transform: uppercase;
<?php 
}
?>
}

<?php 
if ($x_custom_fonts == '1') {
    ?>

  .p-landmark-sub,
  .p-meta,
  input,
  button,
// =============================================================================
// VIEWS/GLOBAL/_TOPBAR.PHP
// -----------------------------------------------------------------------------
// Includes topbar output.
// =============================================================================
?>

<?php 
if (x_get_option('x_topbar_display', '') == '1') {
    ?>

  <div class="x-topbar">
    <div class="x-topbar-inner x-container max width">
      <?php 
    if (x_get_option('x_topbar_content') != '') {
        ?>
      <p class="p-info"><?php 
        echo x_get_option('x_topbar_content');
        ?>
</p>
      <?php 
    }
    ?>
      <?php 
    x_social_global();
    ?>
    </div>
  </div>

<?php 
}
Example #13
0
 function x_social_global()
 {
     $facebook = x_get_option('x_social_facebook');
     $twitter = x_get_option('x_social_twitter');
     $google_plus = x_get_option('x_social_googleplus');
     $linkedin = x_get_option('x_social_linkedin');
     $xing = x_get_option('x_social_xing');
     $foursquare = x_get_option('x_social_foursquare');
     $youtube = x_get_option('x_social_youtube');
     $vimeo = x_get_option('x_social_vimeo');
     $instagram = x_get_option('x_social_instagram');
     $pinterest = x_get_option('x_social_pinterest');
     $dribbble = x_get_option('x_social_dribbble');
     $flickr = x_get_option('x_social_flickr');
     $github = x_get_option('x_social_github');
     $behance = x_get_option('x_social_behance');
     $tumblr = x_get_option('x_social_tumblr');
     $whatsapp = x_get_option('x_social_whatsapp');
     $soundcloud = x_get_option('x_social_soundcloud');
     $rss = x_get_option('x_social_rss');
     $output = '<div class="x-social-global">';
     if ($facebook) {
         $output .= '<a href="' . $facebook . '" class="facebook" title="Facebook" target="_blank"><i class="x-icon-facebook-square" data-x-icon="&#xf082;" aria-hidden="true"></i></a>';
     }
     if ($twitter) {
         $output .= '<a href="' . $twitter . '" class="twitter" title="Twitter" target="_blank"><i class="x-icon-twitter-square" data-x-icon="&#xf081;" aria-hidden="true"></i></a>';
     }
     if ($google_plus) {
         $output .= '<a href="' . $google_plus . '" class="google-plus" title="Google+" target="_blank"><i class="x-icon-google-plus-square" data-x-icon="&#xf0d4;" aria-hidden="true"></i></a>';
     }
     if ($linkedin) {
         $output .= '<a href="' . $linkedin . '" class="linkedin" title="LinkedIn" target="_blank"><i class="x-icon-linkedin-square" data-x-icon="&#xf08c;" aria-hidden="true"></i></a>';
     }
     if ($xing) {
         $output .= '<a href="' . $xing . '" class="xing" title="XING" target="_blank"><i class="x-icon-xing-square" data-x-icon="&#xf169;" aria-hidden="true"></i></a>';
     }
     if ($foursquare) {
         $output .= '<a href="' . $foursquare . '" class="foursquare" title="Foursquare" target="_blank"><i class="x-icon-foursquare" data-x-icon="&#xf180;" aria-hidden="true"></i></a>';
     }
     if ($youtube) {
         $output .= '<a href="' . $youtube . '" class="youtube" title="YouTube" target="_blank"><i class="x-icon-youtube-square" data-x-icon="&#xf166;" aria-hidden="true"></i></a>';
     }
     if ($vimeo) {
         $output .= '<a href="' . $vimeo . '" class="vimeo" title="Vimeo" target="_blank"><i class="x-icon-vimeo-square" data-x-icon="&#xf194;" aria-hidden="true"></i></a>';
     }
     if ($instagram) {
         $output .= '<a href="' . $instagram . '" class="instagram" title="Instagram" target="_blank"><i class="x-icon-instagram" data-x-icon="&#xf16d;" aria-hidden="true"></i></a>';
     }
     if ($pinterest) {
         $output .= '<a href="' . $pinterest . '" class="pinterest" title="Pinterest" target="_blank"><i class="x-icon-pinterest-square" data-x-icon="&#xf0d3;" aria-hidden="true"></i></a>';
     }
     if ($dribbble) {
         $output .= '<a href="' . $dribbble . '" class="dribbble" title="Dribbble" target="_blank"><i class="x-icon-dribbble" data-x-icon="&#xf17d;" aria-hidden="true"></i></a>';
     }
     if ($flickr) {
         $output .= '<a href="' . $flickr . '" class="flickr" title="Flickr" target="_blank"><i class="x-icon-flickr" data-x-icon="&#xf16e;" aria-hidden="true"></i></a>';
     }
     if ($github) {
         $output .= '<a href="' . $github . '" class="github" title="GitHub" target="_blank"><i class="x-icon-github-square" data-x-icon="&#xf092;" aria-hidden="true"></i></a>';
     }
     if ($behance) {
         $output .= '<a href="' . $behance . '" class="behance" title="Behance" target="_blank"><i class="x-icon-behance-square" data-x-icon="&#xf1b5;" aria-hidden="true"></i></a>';
     }
     if ($tumblr) {
         $output .= '<a href="' . $tumblr . '" class="tumblr" title="Tumblr" target="_blank"><i class="x-icon-tumblr-square" data-x-icon="&#xf174;" aria-hidden="true"></i></a>';
     }
     if ($whatsapp) {
         $output .= '<a href="' . $whatsapp . '" class="tumblr" title="Whatsapp" target="_blank"><i class="x-icon-whatsapp" data-x-icon="&#xf232;" aria-hidden="true"></i></a>';
     }
     if ($soundcloud) {
         $output .= '<a href="' . $soundcloud . '" class="soundcloud" title="SoundCloud" target="_blank"><i class="x-icon-soundcloud" data-x-icon="&#xf1be;" aria-hidden="true"></i></a>';
     }
     if ($rss) {
         $output .= '<a href="' . $rss . '" class="rss" title="RSS" target="_blank"><i class="x-icon-rss-square" data-x-icon="&#xf143;" aria-hidden="true"></i></a>';
     }
     $output .= '</div>';
     echo $output;
 }
<?php

// =============================================================================
// VIEWS/INTEGRITY/CONTENT-PORTFOLIO.PHP
// -----------------------------------------------------------------------------
// Portfolio post output for Integrity.
// =============================================================================
$archive_share = x_get_option('x_integrity_portfolio_archive_post_sharing_enable');
?>

<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
  <div class="entry-featured">
    <?php 
x_portfolio_item_featured_content();
?>
  </div>
  <div class="entry-wrap cf">

    <?php 
if (x_is_portfolio_item()) {
    ?>

      <div class="entry-info">
        <header class="entry-header">
          <h1 class="entry-title entry-title-portfolio"><?php 
function x_portfolio_page_template_precedence($request)
{
    if (array_key_exists('post_type', $request) && 'x-portfolio' == $request['post_type']) {
        $page_slug = basename($_SERVER['REQUEST_URI']);
        if (get_page_by_path($page_slug) && x_get_option('x_custom_portfolio_slug') == $page_slug) {
            unset($request['post_type']);
            $request['pagename'] = $page_slug;
        }
    }
    return $request;
}
Example #16
0
//   03. Navbar
//   04. Navbar - Positioning
//   05. Navbar - Dropdowns
//   06. Design Options
//   07. Post Slider
//   08. Custom Fonts - Colors
//   09. Responsive Styling
//   10. Adminbar Styling
// =============================================================================
$x_ethos_navbar_desktop_link_side_padding = x_get_option('x_ethos_navbar_desktop_link_side_padding');
$x_ethos_topbar_background = x_get_option('x_ethos_topbar_background');
$x_ethos_navbar_background = x_get_option('x_ethos_navbar_background');
$x_ethos_sidebar_widget_headings_color = x_get_option('x_ethos_sidebar_widget_headings_color');
$x_ethos_sidebar_color = x_get_option('x_ethos_sidebar_color');
$x_ethos_post_slider_blog_height = x_get_option('x_ethos_post_slider_blog_height');
$x_ethos_post_slider_archive_height = x_get_option('x_ethos_post_slider_archive_height');
$x_ethos_navbar_outer_border_width = '2';
?>

/* Site Link Color Accents
// ========================================================================== */

/*
// Color.
*/

a,
h1 a:hover,
h2 a:hover,
h3 a:hover,
h4 a:hover,
Example #17
0
?>
;
  font-style: <?php 
echo $x_navbar_font_is_italic ? 'italic' : 'normal';
?>
;
  font-weight: <?php 
echo $x_navbar_font_weight;
?>
;
  letter-spacing: <?php 
echo $x_navbar_letter_spacing . 'em';
?>
;
  <?php 
if (x_get_option('x_navbar_uppercase_enable') == '1') {
    ?>
    text-transform: uppercase;
  <?php 
}
?>
}

.x-navbar .desktop .x-nav > li > a {
  font-size: <?php 
echo $x_navbar_font_size . 'px';
?>
;
}

<?php 
Example #18
0
            ?>
            <?php 
            if (x_is_portfolio_item()) {
                ?>

              <h1 class="h-landmark"><span><?php 
                echo x_get_parent_portfolio_title();
                ?>
</span></h1>

            <?php 
            } else {
                ?>

              <h1 class="h-landmark"><span><?php 
                echo x_get_option('x_renew_blog_title');
                ?>
</span></h1>

            <?php 
            }
            ?>
          <?php 
        } elseif (is_search()) {
            ?>

            <h1 class="h-landmark"><span><?php 
            _e('Search Results', '__x__');
            ?>
</span></h1>
Example #19
0
//   01. Site Link Color Accents
//   02. Layout Sizing
//   03. Masthead
//   04. Navbar
//   05. Navbar - Positioning
//   06. Navbar - Dropdowns
//   07. Footer
//   08. Custom Fonts
//   09. Custom Fonts - Colors
//   10. Responsive Styling
//   11. Adminbar Styling
// =============================================================================
$x_integrity_design = x_get_option('x_integrity_design');
$x_integrity_topbar_transparency_enable = x_get_option('x_integrity_topbar_transparency_enable');
$x_integrity_navbar_transparency_enable = x_get_option('x_integrity_navbar_transparency_enable');
$x_integrity_footer_transparency_enable = x_get_option('x_integrity_footer_transparency_enable');
?>

/* Site Link Color Accents
// ========================================================================== */

/*
// Color.
*/

a,
h1 a:hover,
h2 a:hover,
h3 a:hover,
h4 a:hover,
h5 a:hover,
 function x_enqueue_site_styles()
 {
     //
     // Stack data.
     //
     $stack = x_get_stack();
     $design = x_get_option('x_integrity_design', 'light');
     if ($stack == 'integrity' && $design == 'light') {
         $ext = '-light';
     } elseif ($stack == 'integrity' && $design == 'dark') {
         $ext = '-dark';
     } else {
         $ext = '';
     }
     //
     // Font data.
     //
     $body_font_family_query = x_get_font_family_query(x_get_option('x_body_font_family', 'Lato'));
     $body_font_weight_and_style = x_get_option('x_body_font_weight', '400');
     $body_font_weight = x_get_font_weight($body_font_weight_and_style);
     $headings_font_family_query = x_get_font_family_query(x_get_option('x_headings_font_family', 'Lato'));
     $headings_font_weight_and_style = x_get_option('x_headings_font_weight', '400');
     $headings_font_weight = x_get_font_weight($headings_font_weight_and_style);
     $logo_font_family_query = x_get_font_family_query(x_get_option('x_logo_font_family', 'Lato'));
     $logo_font_weight_and_style = x_get_option('x_logo_font_weight', '400');
     $logo_font_weight = x_get_font_weight($logo_font_weight_and_style);
     $navbar_font_family_query = x_get_font_family_query(x_get_option('x_navbar_font_family', 'Lato'));
     $navbar_font_weight_and_style = x_get_option('x_navbar_font_weight', '400');
     $navbar_font_weight = x_get_font_weight($navbar_font_weight_and_style);
     $subsets = 'latin,latin-ext';
     if (x_get_option('x_custom_font_subsets', '') == '1') {
         if (x_get_option('x_custom_font_subset_cyrillic', '') == '1') {
             $subsets .= ',cyrillic,cyrillic-ext';
         }
         if (x_get_option('x_custom_font_subset_greek', '') == '1') {
             $subsets .= ',greek,greek-ext';
         }
         if (x_get_option('x_custom_font_subset_vietnamese', '') == '1') {
             $subsets .= ',vietnamese';
         }
     }
     $custom_font_args = array('family' => $body_font_family_query . ':' . $body_font_weight . ',' . $body_font_weight . 'italic,700,700italic|' . $navbar_font_family_query . ':' . $navbar_font_weight_and_style . '|' . $headings_font_family_query . ':' . $headings_font_weight_and_style . '|' . $logo_font_family_query . ':' . $logo_font_weight_and_style, 'subset' => $subsets);
     $standard_font_args = array('family' => 'Lato:' . $body_font_weight . ',' . $body_font_weight . 'italic,' . $navbar_font_weight_and_style . ',' . $headings_font_weight_and_style . ',' . $logo_font_weight_and_style . ',700,700italic', 'subset' => $subsets);
     $get_custom_font_family = add_query_arg($custom_font_args, '//fonts.googleapis.com/css');
     $get_standard_font_family = add_query_arg($standard_font_args, '//fonts.googleapis.com/css');
     //
     // Register styles.
     //
     wp_register_style('x-stack', X_TEMPLATE_URL . '/framework/css/site/stacks/' . $stack . $ext . '.css', NULL, X_VERSION, 'all');
     //
     // Enqueue styles.
     //
     if (is_child_theme()) {
         $dep = apply_filters('x_enqueue_parent_stylesheet', false) ? array('x-stack') : NULL;
         wp_enqueue_style('x-child', get_stylesheet_directory_uri() . '/style.css', $dep, X_VERSION, 'all');
     } else {
         wp_enqueue_style('x-stack');
     }
     if (is_rtl()) {
         wp_enqueue_style('x-rtl', X_TEMPLATE_URL . '/framework/css/site/rtl/' . $stack . '.css', NULL, X_VERSION, 'all');
     }
     if (X_BBPRESS_IS_ACTIVE) {
         if (x_is_bbpress()) {
             wp_deregister_style('buttons');
         }
         wp_deregister_style('bbp-default');
         wp_enqueue_style('x-bbpress', X_TEMPLATE_URL . '/framework/css/site/bbpress/' . $stack . $ext . '.css', NULL, X_VERSION, 'all');
     }
     if (X_BUDDYPRESS_IS_ACTIVE) {
         wp_deregister_style('bp-legacy-css');
         wp_deregister_style('bp-admin-bar');
         wp_enqueue_style('x-buddypress', X_TEMPLATE_URL . '/framework/css/site/buddypress/' . $stack . $ext . '.css', NULL, X_VERSION, 'all');
     }
     if (X_WOOCOMMERCE_IS_ACTIVE) {
         wp_deregister_style('woocommerce-layout');
         wp_deregister_style('woocommerce-general');
         wp_deregister_style('woocommerce-smallscreen');
         wp_enqueue_style('x-woocommerce', X_TEMPLATE_URL . '/framework/css/site/woocommerce/' . $stack . $ext . '.css', NULL, X_VERSION, 'all');
     }
     if (X_GRAVITY_FORMS_IS_ACTIVE) {
         wp_enqueue_style('x-gravity-forms', X_TEMPLATE_URL . '/framework/css/site/gravity_forms/' . $stack . $ext . '.css', NULL, X_VERSION, 'all');
     }
     if (X_CONTACT_FORM_7_IS_ACTIVE) {
         wp_deregister_style('contact-form-7');
     }
     if (x_get_option('x_custom_fonts', '') == '1') {
         wp_enqueue_style('x-font-custom', $get_custom_font_family, NULL, X_VERSION, 'all');
     } else {
         wp_enqueue_style('x-font-standard', $get_standard_font_family, NULL, X_VERSION, 'all');
     }
 }
// VIEWS/ETHOS/_POST-SLIDER.PHP
// -----------------------------------------------------------------------------
// Outputs the post slider that appears at the top of the blog.
// =============================================================================
$is_blog = is_home();
$is_archive = is_category() || is_tag();
if ($is_blog || $is_archive) {
    if ($is_blog) {
        $info = array('blog', NULL, NULL, '_x_ethos_post_slider_blog_display');
    } elseif ($is_archive) {
        $type = is_category() ? 'cat' : 'tag_id';
        $info = array('archive', $type, get_queried_object_id(), '_x_ethos_post_slider_archives_display');
    }
    $slider_enabled = x_get_option('x_ethos_post_slider_' . $info[0] . '_enable', '') == '1';
    $count = x_get_option('x_ethos_post_slider_' . $info[0] . '_count');
    $display = x_get_option('x_ethos_post_slider_' . $info[0] . '_display');
    $blog_slider_is_enabled = $slider_enabled && $is_blog;
    $archive_slider_is_enabled = $slider_enabled && $is_archive;
    $is_enabled = $blog_slider_is_enabled || $archive_slider_is_enabled;
    switch ($display) {
        case 'most-commented':
            $args = array('post_type' => 'post', 'posts_per_page' => $count, 'orderby' => 'comment_count', 'order' => 'DESC', $info[1] => $info[2]);
            break;
        case 'random':
            $args = array('post_type' => 'post', 'posts_per_page' => $count, 'orderby' => 'rand', $info[1] => $info[2]);
            break;
        case 'featured':
            $args = array('post_type' => 'post', 'posts_per_page' => $count, 'orderby' => 'date', 'meta_key' => $info[3], 'meta_value' => 'on');
            break;
    }
    ?>
Example #22
0
 function x_output_generated_styles()
 {
     ob_start();
     echo '<style id="x-generated-css" type="text/css">';
     echo x_customizer_get_css();
     do_action('x_head_css');
     echo x_get_option('x_custom_styles');
     echo '</style>';
     $css = ob_get_clean();
     echo $css;
 }
Example #23
0
?>



/* Post Colors - Link
// ========================================================================== */

<?php 
if ($x_icon_post_link_colors_enable == '1') {
    ?>

  <?php 
    $link_text_color = x_get_option('x_icon_post_link_color');
    ?>
  <?php 
    $link_background_color = x_get_option('x_icon_post_link_background');
    ?>

  .format-link .entry-wrap {
    color: <?php 
    echo $link_text_color;
    ?>
 !important;
    background-color: <?php 
    echo $link_background_color;
    ?>
 !important;
  }

  .format-link a:not(.x-btn):not(.meta-comments),
  .format-link h1,
 function x_buddypress_get_the_subtitle()
 {
     if (x_is_buddypress_component('activity')) {
         $output = x_get_option('x_buddypress_activity_subtitle', __('Meet new people, get involved, and stay connected.', '__x__'));
     } else {
         if (x_is_buddypress_component('groups')) {
             $output = x_get_option('x_buddypress_groups_subtitle', __('Find others with similar interests and get plugged in.', '__x__'));
         } else {
             if (x_is_buddypress_component('members')) {
                 $output = x_get_option('x_buddypress_members_subtitle', __('See what others are writing about. Learn something new and exciting today!', '__x__'));
             } else {
                 if (x_is_buddypress_component('blogs')) {
                     $output = x_get_option('x_buddypress_blogs_subtitle', __('Meet your new online community. Kick up your feet and stay awhile.', '__x__'));
                 } else {
                     if (x_is_buddypress_component('register')) {
                         $output = x_get_option('x_buddypress_register_subtitle', __('Just fill in the fields below and we\'ll get a new account set up for you in no time!', '__x__'));
                     } else {
                         if (x_is_buddypress_component('activate')) {
                             $output = x_get_option('x_buddypress_activate_subtitle', __('You\'re almost there! Simply enter your activation code below and we\'ll take care of the rest.', '__x__'));
                         } else {
                             $output = '';
                         }
                     }
                 }
             }
         }
     }
     return $output;
 }
Example #25
0
        <?php 
    }
    ?>

        <?php 
    if (x_get_option('x_footer_menu_display', '1') == '1') {
        ?>
          <?php 
        x_get_view('global', '_nav', 'footer');
        ?>
        <?php 
    }
    ?>

        <?php 
    if (x_get_option('x_footer_social_display', '1') == '1') {
        ?>
          <?php 
        x_social_global();
        ?>
        <?php 
    }
    ?>

      </div>
    </footer>

  <?php 
}
?>
Example #26
0
        <?php 
    if (x_get_option('x_footer_menu_display', '1') == '1') {
        ?>
          <?php 
        x_get_view('global', '_nav', 'footer');
        ?>
        <?php 
    }
    ?>

        <?php 
    if (x_get_option('x_footer_content_display', '1') == '1') {
        ?>
          <div class="x-colophon-content">
            <?php 
        echo do_shortcode(x_get_option('x_footer_content'));
        ?>
          </div>
        <?php 
    }
    ?>

      </div>
    </footer>

  <?php 
}
?>

<?php 
x_get_view('global', '_footer');
Example #27
0
<?php

// =============================================================================
// VIEWS/ETHOS/WP-INDEX.PHP
// -----------------------------------------------------------------------------
// Index page output for Ethos.
// =============================================================================
$is_filterable_index = is_home() && x_get_option('x_ethos_filterable_index_enable') == '1';
?>

<?php 
get_header();
?>

  <div class="x-container max width main">

    <?php 
x_get_view('ethos', '_post', 'slider');
?>

    <div class="offset cf">
      <div class="<?php 
x_main_content_class();
?>
" role="main">

        <?php 
if ($is_filterable_index) {
    ?>
          <?php 
    x_get_view('ethos', '_index');
Example #28
0
function x_customizer_user_javascript_output()
{
    $x_custom_scripts = x_get_option('x_custom_scripts');
    $entry_id = get_the_ID();
    $x_entry_bg_image_full = get_post_meta($entry_id, '_x_entry_bg_image_full', true);
    $x_entry_bg_image_full_fade = get_post_meta($entry_id, '_x_entry_bg_image_full_fade', true);
    $x_entry_bg_image_full_duration = get_post_meta($entry_id, '_x_entry_bg_image_full_duration', true);
    $x_design_bg_image_full = x_get_option('x_design_bg_image_full', '');
    $x_design_bg_image_full_fade = x_get_option('x_design_bg_image_full_fade', '750');
    ?>


  <?php 
    if ($x_custom_scripts) {
        ?>

    <script id="x-customizer-js-custom">
      <?php 
        echo $x_custom_scripts;
        ?>
    </script>

  <?php 
    }
    ?>


  <?php 
    if ($x_entry_bg_image_full && is_singular()) {
        ?>

    <?php 
        $page_bg_images_output = '';
        $page_bg_images = explode(',', $x_entry_bg_image_full);
        foreach ($page_bg_images as $page_bg_image) {
            $page_bg_images_output .= '"' . $page_bg_image . '", ';
        }
        $page_bg_images_output = trim($page_bg_images_output, ', ');
        ?>

    <script>jQuery.backstretch([<?php 
        echo $page_bg_images_output;
        ?>
], {duration: <?php 
        echo $x_entry_bg_image_full_duration;
        ?>
, fade: <?php 
        echo $x_entry_bg_image_full_fade;
        ?>
});</script>

  <?php 
    } elseif ($x_design_bg_image_full) {
        ?>

    <script>jQuery.backstretch(['<?php 
        echo x_make_protocol_relative($x_design_bg_image_full);
        ?>
'], {fade: <?php 
        echo $x_design_bg_image_full_fade;
        ?>
});</script>

  <?php 
    }
}
Example #29
0
}



/* Responsive Styling
// ========================================================================== */

@media (max-width: 979px) {



}


<?php 
if (is_home() && $x_renew_entry_icon_position == 'creative' && x_get_option('x_blog_style') == 'standard') {
    ?>

  @media (min-width: 980px) {
    .x-full-width-active .entry-title:before,
    .x-content-sidebar-active .entry-title:before {
      position: absolute;
      width: 70px;
      height: 70px;
      margin-top: -<?php 
    echo $x_renew_entry_icon_position_vertical . 'px';
    ?>
;
      margin-left: -<?php 
    echo $x_renew_entry_icon_position_horizontal . '%';
    ?>
// @version 1.6.4
// =============================================================================
if (!defined('ABSPATH')) {
    exit;
    // Exit if accessed directly
}
global $product, $woocommerce_loop;
$related = $product->get_related($posts_per_page);
if (sizeof($related) == 0) {
    return;
}
$args = apply_filters('woocommerce_related_products_args', array('post_type' => 'product', 'ignore_sticky_posts' => 1, 'no_found_rows' => 1, 'posts_per_page' => $posts_per_page, 'orderby' => $orderby, 'post__in' => $related, 'post__not_in' => array($product->id)));
$products = new WP_Query($args);
$woocommerce_loop['columns'] = $columns;
$enable = x_get_option('x_woocommerce_product_related_enable', '1');
$columns = x_get_option('x_woocommerce_product_related_columns', '4');
if ($products->have_posts() && $enable == '1') {
    ?>

  <div class="related products cols-<?php 
    echo $columns;
    ?>
">

    <h2><?php 
    _e('Related Products', '__x__');
    ?>
</h2>

    <?php 
    woocommerce_product_loop_start();