Esempio n. 1
0
function oxy_create_logo_css()
{
    // check if we using a logo
    $css = '';
    $header_height = oxy_get_option('header_height');
    switch (oxy_get_option('logo_type')) {
        case 'image':
            $img_id = oxy_get_option('logo_image');
            $img = wp_get_attachment_image_src($img_id, 'full');
            $logo_width = $img[1];
            $logo_height = $img[2];
            $retina = '';
            // check for retina logo
            if ('on' == oxy_get_option('logo_retina')) {
                // set brand logo to be half width & height
                $retina .= 'width:' . $logo_width / 2 . 'px;height:' . $logo_height / 2 . 'px;';
                // use half logo height to calculate header size
                $logo_height = $logo_height / 2;
            }
            $css = oxy_create_header_css($header_height, $logo_height . 'px', $logo_width . 'px', $retina);
            break;
        case 'text':
            $css = oxy_create_header_css($header_height, 36, 'auto');
            break;
    }
    update_option(THEME_SHORT . '-header-css', $css);
}
 public function current_screen($current_screen)
 {
     if ('nav-menus' === $current_screen->base) {
         wp_enqueue_style('oxy-mega-menu', OXY_MEGA_MENU_URI . 'assets/css/oxy-mega-menu.css');
         if ('on' === oxy_get_option('ajax_menu_save')) {
             wp_enqueue_script('oxy-ajax-save-menu', OXY_MEGA_MENU_URI . 'assets/js/ajax-save-menu.js', array('jquery'));
         }
         // Make sure Mega Menu is installed
         $menus = get_posts(array('post_type' => 'oxy_mega_menu'));
         if (count($menus) === 0) {
             // Create post object
             $my_post = array('post_title' => 'Mega Menu', 'post_content' => '', 'post_status' => 'publish', 'post_type' => 'oxy_mega_menu');
             // Insert the post into the database
             wp_insert_post($my_post);
         }
         $menus = get_posts(array('post_type' => 'oxy_mega_columns'));
         if (count($menus) === 0) {
             $columns = array('col-md-3' => __('One Quarter Column (1/4)', 'lambda-admin-td'), 'col-md-4' => __('One Third Column (1/3)', 'lambda-admin-td'));
             foreach ($columns as $content => $title) {
                 // Create post object
                 $column_post = array('post_title' => $title, 'post_content' => $content, 'post_status' => 'publish', 'post_type' => 'oxy_mega_columns');
                 // Insert the post into the database
                 wp_insert_post($column_post);
             }
         }
     }
 }
Esempio n. 3
0
function oxy_sign_up()
{
    if (isset($_POST['nonce'])) {
        if (wp_verify_nonce($_POST['nonce'], 'oxygenna-sign-me-up-nonce')) {
            header('Content-Type: application/json');
            $resp = new stdClass();
            $user_email = $_POST['email'];
            $resp->email = $user_email;
            if (filter_var($user_email, FILTER_VALIDATE_EMAIL) !== false) {
                //create the API from the stored key
                $api = new MCAPI(oxy_get_option('api_key'));
                // The list the user will subscribe to
                $list_id = oxy_get_option('list_id');
                $api->listSubscribe($list_id, $user_email);
                if ($api->errorCode) {
                    $resp->status = 'error';
                    $resp->message = __('Error registering', THEME_FRONT_TD);
                } else {
                    $resp->status = 'ok';
                    $resp->message = __('Registered', THEME_FRONT_TD);
                }
            } else {
                $resp->status = 'error';
                $resp->message = __('Invalid email', THEME_FRONT_TD);
            }
            echo json_encode($resp);
            die;
        }
    }
}
 public function current_screen($current_screen)
 {
     if ('nav-menus' === $current_screen->base) {
         wp_enqueue_style('oxy-mega-menu', OXY_MEGA_MENU_URI . 'assets/css/oxy-mega-menu.css');
         if ('on' === oxy_get_option('ajax_menu_save')) {
             wp_enqueue_script('oxy-ajax-save-menu', OXY_MEGA_MENU_URI . 'assets/js/ajax-save-menu.js', array('jquery'));
         }
     }
 }
Esempio n. 5
0
 function load_select_data($database)
 {
     // get data
     $data = array();
     switch ($database) {
         case 'taxonomy':
             if (isset($this->_field['taxonomy'])) {
                 if (isset($this->_field['blank_label'])) {
                     $this->_field['blank'] = $this->_field['blank_label'];
                 }
                 $data = get_categories(array('orderby' => 'name', 'hide_empty' => '0', 'taxonomy' => $this->_field['taxonomy']));
             }
             break;
         case 'slideshow':
             $this->_field['blank'] = __('Select a Slideshow', THEME_ADMIN_TD);
             $data = get_categories(array('orderby' => 'name', 'hide_empty' => '0', 'taxonomy' => 'oxy_slideshow_categories'));
             break;
         case 'get_option':
             $options = get_option(THEME_SHORT . '-options');
             if (isset($options['unregistered'][$this->_field['option']])) {
                 $data = oxy_get_option($this->_field['option']);
                 $unregistered = oxy_get_option('unregistered');
                 $data = $options['unregistered'][$this->_field['option']];
             } else {
                 $data = null;
             }
             break;
         case 'staff_featured':
             $this->_field['blank'] = __('Select a Staff member', THEME_ADMIN_TD);
             $posts = get_posts("showposts=-1&post_type=oxy_staff");
             foreach ($posts as $staff) {
                 $data[$staff->post_title] = $staff->ID;
             }
             break;
         case 'social_icons':
             $data = (include OPTIONS_DIR . 'icons/social.php');
             break;
         case 'categories':
             $this->_field['blank'] = __('all categories', THEME_ADMIN_TD);
             $data = get_categories(array('orderby' => 'name', 'hide_empty' => '0'));
             break;
         case 'portfolios':
             $this->_field['blank'] = __('Select a Portfolio', THEME_ADMIN_TD);
             $data = get_categories(array('orderby' => 'name', 'hide_empty' => '0', 'taxonomy' => 'oxy_portfolio_categories'));
             break;
         default:
             $data = array();
             break;
     }
     return $data;
 }
<?php

/**
 * Displays the archive for oxy_portfolio_image custom post type
 *
 * @package Lambda
 * @subpackage Frontend
 * @since 0.1
 *
 * @copyright (c) 2015 Oxygenna.com
 * @license http://wiki.envato.com/support/legal-terms/licensing-terms/
 * @version 1.17.0
 */
get_header();
$page = oxy_get_option('portfolio_archive_page');
if (!empty($page)) {
    global $post;
    $post = get_post($page);
    setup_postdata($post);
    oxy_page_header($post->ID);
    get_template_part('partials/content', 'page');
    wp_reset_postdata();
}
get_footer();
Esempio n. 7
0
<?php

/**
 * Adds navigation for single post
 *
 * @package Omega
 * @subpackage Admin
 * @since 0.1
 *
 * @copyright (c) 2014 Oxygenna.com
 * @license **LICENSE**
 * @version 1.7.3
 */
$extra_post_class = oxy_get_option('blog_post_icons') == 'on' ? 'post-showinfo' : '';
?>
<nav id="nav-below" class="post-navigation <?php 
echo $extra_post_class;
?>
">
    <ul class="pager">
        <?php 
if (get_previous_post()) {
    ?>
            <li class="previous">
                <a class="btn btn-primary btn-icon btn-icon-left" rel="prev" href="<?php 
    echo get_permalink(get_adjacent_post(false, '', true));
    ?>
">
                    <i class="fa fa-angle-left"></i>
                    <?php 
    _e('Previous', 'omega-td');
Esempio n. 8
0
 * @license http://wiki.envato.com/support/legal-terms/licensing-terms/
 * @version 1.2.2
 */
?>
<small class="post-extras">

    <i class="icon-user"></i>
    <?php 
the_author();
?>
    <i class="icon-calendar"></i>
    <?php 
the_time(get_option('date_format'));
?>
    <?php 
if (has_tag() && oxy_get_option('blog_tags') == 'on') {
    ?>
    <i class="icon-tags"></i>
    <?php 
    the_tags($before = null, $sep = ', ', $after = '');
    ?>
    <?php 
}
?>
    <?php 
if (has_category()) {
    ?>
    <i class="icon-bookmark"></i>
    <?php 
    the_category(', ');
    ?>
}
$allow_comments = oxy_get_option('site_comments');
?>

<?php 
if (oxy_get_option('related_portfolio_items') === 'on') {
    ?>
    <?php 
    get_template_part('partials/portfolio/portfolio-related');
}
?>


<?php 
if ($allow_comments === 'portfolio' || $allow_comments === 'all') {
    ?>
<section class="section <?php 
    echo oxy_get_option('portfolio_comments_swatch');
    ?>
">
    <div class="container">
        <div class="row element-normal-top element-normal-bottom">
            <?php 
    comments_template('', true);
    ?>
        </div>
    </div>
</section>
<?php 
}
get_footer();
<?php

$margin_top = oxy_get_option('template_margin');
?>

<section class="section">
    <div class="container">
        <div class="row element-top-<?php 
echo $margin_top;
?>
">
            <div class="col-md-8 col-md-offset-2">

Esempio n. 11
0
 * Displays the main body of the theme
 *
 * @package Omega
 * @subpackage Frontend
 * @since 0.1
 *
 * @copyright (c) 2014 Oxygenna.com
 * @license http://wiki.envato.com/support/legal-terms/licensing-terms/
 * @version 1.7.3
 */
// get the author name
if (get_query_var('author_name')) {
    $author = get_user_by('slug', get_query_var('author_name'));
} else {
    $author = get_userdata(get_query_var('author'));
}
get_header();
oxy_blog_header(get_the_author_meta('display_name', $author->ID), null);
// if masonry option set then use masonry option for name otherwise use blog style
$name = oxy_get_option('blog_masonry') === 'no-masonry' ? oxy_get_option('blog_style') : oxy_get_option('blog_masonry');
?>
<section class="section <?php 
echo oxy_get_option('blog_swatch');
?>
">
    <?php 
get_template_part('partials/blog/list', $name);
?>
</section>
<?php 
get_footer();
Esempio n. 12
0
function oxy_read_more_link($more_link, $more_link_text)
{
    // remove #more
    $more_link = preg_replace('|#more-[0-9]+|', '', $more_link);
    return str_replace($more_link_text, oxy_get_option('blog_readmore'), $more_link);
}
Esempio n. 13
0
    echo oxy_get_option('product_directionnav');
    ?>
" data-flex-directions-type="<?php 
    echo oxy_get_option('product_directionnavtype');
    ?>
" data-flex-speed="<?php 
    echo oxy_get_option('product_speed');
    ?>
" data-flex-controls="<?php 
    echo oxy_get_option('product_showcontrols');
    ?>
" data-flex-slideshow="<?php 
    echo oxy_get_option('product_autostart');
    ?>
" data-flex-duration="<?php 
    echo oxy_get_option('product_duration');
    ?>
">
        <ul class="slides product-gallery">
            <?php 
    foreach ($image_ids as $image_id) {
        $thumb = wp_get_attachment_image_src($image_id, 'shop_thumbnail');
        $single = wp_get_attachment_image_src($image_id, 'shop_single');
        $full = wp_get_attachment_image_src($image_id, 'full');
        ?>
                <li data-thumb="<?php 
        echo $thumb[0];
        ?>
">
                    <figure>
                        <img src="<?php 
Esempio n. 14
0
 * @copyright (c) 2015 Oxygenna.com
 * @license **LICENSE**
 * @version 1.17.0
 */
global $post;
$image = get_post_meta($post->ID, THEME_SHORT . '_masonry_image', true);
if (empty($image)) {
    $image_attachment = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
    if (isset($image_attachment[0])) {
        $image = $image_attachment[0];
    }
}
$width = get_post_meta($post->ID, THEME_SHORT . '_masonry_width', true);
$item_style = oxy_get_option('blog_masonry_style');
$text_align = oxy_get_option('blog_masonry_text_align');
$title_tag = oxy_get_option('blog_masonry_title_tag');
$format = get_post_format();
if ($format !== 'quote' && $format !== 'link') {
    $format = 'standard';
}
?>
<div class="post-masonry masonry-item masonry-<?php 
echo esc_attr($width);
?>
" data-menu-order="<?php 
echo esc_attr($masonry_count);
?>
">
    <div class="post-masonry-inner <?php 
echo esc_attr(implode(' ', $classes));
?>
                    <a href="<?php 
    echo get_permalink($prev->ID);
    ?>
">
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
                            <g>
                                <polyline fill="none" stroke-width="3" stroke-miterlimit="10" points="68.692,16.091 33.146,50 68.692,83.906   "/>
                            </g>
                        </svg>
                    </a>
                </li>
            <?php 
}
?>
            <?php 
$page = oxy_get_option('portfolio_page');
?>
            <?php 
if (!empty($page)) {
    ?>
                <li>
                    <a href="<?php 
    echo get_permalink($page);
    ?>
">
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
                                <g>
                                    <rect x="15.958" y="15" fill="none" stroke-width="3" stroke-miterlimit="10" width="70" height="70"/>
                                    <line fill="none" stroke-width="3" stroke-miterlimit="10" x1="15.958" y1="61.655" x2="85.958" y2="61.655"/>
                                    <line fill="none" stroke-width="3" stroke-miterlimit="10" x1="15.958" y1="38.345" x2="85.958" y2="38.345"/>
                                    <line fill="none" stroke-width="3" stroke-miterlimit="10" x1="62.632" y1="15" x2="62.632" y2="85"/>
Esempio n. 16
0
        <?php 
if (!is_search()) {
    if ($video_shortcode !== null) {
        echo $wp_embed->run_shortcode($video_shortcode[0]);
    } else {
        if (has_post_thumbnail()) {
            get_template_part('partials/blog/posts/normal/featured-image');
        }
    }
}
?>
    </div>

    <?php 
get_template_part('partials/blog/posts/normal/post', 'header');
?>

    <div class="post-body">
        <?php 
echo apply_filters('the_content', $content);
if (!is_single() && oxy_get_option('blog_show_readmore') == 'on') {
    // show up to readmore tag and conditionally render the readmore
    oxy_read_more_link();
}
?>
    </div>

    <?php 
get_template_part('partials/blog/posts/normal/post', 'footer');
?>
</article>
Esempio n. 17
0
    ?>
        </h2>
    <?php 
} else {
    ?>
        <h1 class="post-title">
            <?php 
    the_title();
    ?>
        </h1>
    <?php 
}
?>

    <?php 
if (oxy_get_option('blog_post_header') === 'details') {
    ?>
        <?php 
    get_template_part('partials/blog/posts/normal/post', 'details');
    ?>
    <?php 
} else {
    ?>
        <?php 
    if (!empty($subtitle)) {
        ?>
            <p class="lead"><?php 
        echo $subtitle;
        ?>
</p>
        <?php 
Esempio n. 18
0
<?php

/**
 * Displays the main body of the theme
 *
 * @package Omega
 * @subpackage Frontend
 * @since 0.1
 *
 * @copyright (c) 2014 Oxygenna.com
 * @license http://wiki.envato.com/support/legal-terms/licensing-terms/
 * @version 1.7.3
 */
get_header();
oxy_blog_header();
?>
<section class="section <?php 
echo oxy_get_option('blog_swatch');
?>
">
    <?php 
get_template_part('partials/blog/list', oxy_get_option('blog_style'));
?>
</section>
<?php 
get_footer();
Esempio n. 19
0
{
    remove_meta_box('postimagediv', 'oxy_slideshow_image', 'side');
    add_meta_box('postimagediv', __('Slideshow Image', THEME_ADMIN_TD), 'post_thumbnail_meta_box', 'oxy_slideshow_image', 'advanced', 'low');
}
add_action('do_meta_boxes', 'oxy_move_slideshow_meta_box');
/**
 * Logo Custom Post
 */
$labels = array('name' => _x('Sections', THEME_ADMIN_TD), 'singular_name' => _x('Section', THEME_ADMIN_TD), 'add_new' => _x('Add New', THEME_ADMIN_TD), 'add_new_item' => __('Add New Section', THEME_ADMIN_TD), 'edit_item' => __('Edit Section', THEME_ADMIN_TD), 'new_item' => __('New Section', THEME_ADMIN_TD), 'view_item' => __('View Section', THEME_ADMIN_TD), 'search_items' => __('Search Sections', THEME_ADMIN_TD), 'not_found' => __('No sections found', THEME_ADMIN_TD), 'not_found_in_trash' => __('No sections found in Trash', THEME_ADMIN_TD), 'menu_name' => __('Sections', THEME_ADMIN_TD));
$args = array('labels' => $labels, 'public' => true, 'show_ui' => true, 'query_var' => false, 'rewrite' => false, 'supports' => array('title', 'editor', 'thumbnail'));
// create custom post
register_post_type('oxy_section', $args);
$labels = array('name' => __('Features', THEME_ADMIN_TD), 'singular_name' => __('Feature', THEME_ADMIN_TD), 'add_new' => __('Add New', THEME_ADMIN_TD), 'add_new_item' => __('Add New Feature', THEME_ADMIN_TD), 'edit_item' => __('Edit Feature', THEME_ADMIN_TD), 'new_item' => __('New Feature', THEME_ADMIN_TD), 'all_items' => __('All Features', THEME_ADMIN_TD), 'view_item' => __('View Feature', THEME_ADMIN_TD), 'search_items' => __('Search Features', THEME_ADMIN_TD), 'not_found' => __('No Features found', THEME_ADMIN_TD), 'not_found_in_trash' => __('No Features found in Trash', THEME_ADMIN_TD), 'menu_name' => __('Features', THEME_ADMIN_TD));
$args = array('labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'editor'));
register_post_type('oxy_feature', $args);
/* ------------------ TESTIMONIALS -----------------------*/
$labels = array('name' => __('Testimonial', THEME_ADMIN_TD), 'singular_name' => __('Testimonial', THEME_ADMIN_TD), 'add_new' => __('Add New', THEME_ADMIN_TD), 'add_new_item' => __('Add New Testimonial', THEME_ADMIN_TD), 'edit_item' => __('Edit Testimonial', THEME_ADMIN_TD), 'new_item' => __('New Testimonial', THEME_ADMIN_TD), 'all_items' => __('All Testimonial', THEME_ADMIN_TD), 'view_item' => __('View Testimonial', THEME_ADMIN_TD), 'search_items' => __('Search Testimonial', THEME_ADMIN_TD), 'not_found' => __('No Testimonial found', THEME_ADMIN_TD), 'not_found_in_trash' => __('No Testimonial found in Trash', THEME_ADMIN_TD), 'menu_name' => __('Testimonials', THEME_ADMIN_TD));
$args = array('labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'menu_icon' => ADMIN_ASSETS_URI . 'images/testimonials.png', 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes'));
register_post_type('oxy_testimonial', $args);
$labels = array('name' => _x('Gallery Items', THEME_ADMIN_TD), 'singular_name' => _x('Gallery Item', THEME_ADMIN_TD), 'add_new' => _x('Add New', THEME_ADMIN_TD), 'add_new_item' => __('Add New Gallery Item', THEME_ADMIN_TD), 'edit_item' => __('Edit Gallery Item', THEME_ADMIN_TD), 'new_item' => __('New Gallery Item', THEME_ADMIN_TD), 'view_item' => __('View Gallery Item', THEME_ADMIN_TD), 'search_items' => __('Search Gallery Items', THEME_ADMIN_TD), 'not_found' => __('No Gallery Items found', THEME_ADMIN_TD), 'not_found_in_trash' => __('No Gallery Items found in Trash', THEME_ADMIN_TD), 'parent_item_colon' => '', 'menu_name' => __('Gallery Items', THEME_ADMIN_TD));
// fetch portfolio slug
$permalink_slug = trim(oxy_get_option('portfolio_slug'));
if (empty($permalink_slug)) {
    $permalink_slug = 'gallery';
}
$args = array('labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'menu_icon' => ADMIN_ASSETS_URI . 'images/portfolio.png', 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes', 'post-formats'), 'rewrite' => array('slug' => $permalink_slug, 'with_front' => true, 'pages' => true, 'feeds' => false));
// create custom post
register_post_type('oxy_gallery_item', $args);
// Register portfolio taxonomy
$labels = array('name' => __('Galleries', THEME_ADMIN_TD), 'singular_name' => __('Gallery', THEME_ADMIN_TD), 'search_items' => __('Search Galleries', THEME_ADMIN_TD), 'all_items' => __('All Galleries', THEME_ADMIN_TD), 'edit_item' => __('Edit Gallery', THEME_ADMIN_TD), 'update_item' => __('Update Gallery', THEME_ADMIN_TD), 'add_new_item' => __('Add New Gallery', THEME_ADMIN_TD), 'new_item_name' => __('New Gallery Name', THEME_ADMIN_TD));
register_taxonomy('oxy_gallery_categories', 'oxy_gallery_item', array('hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'query_var' => true));
 * Shows related posts
 *
 * @package Lambda
 * @subpackage Frontend
 * @since 1.3
 *
 * @copyright (c) 2015 Oxygenna.com
 * @license **LICENSE**
 * @version 1.17.0
 */
// get related posts excluding this one.
$cats = wp_get_post_terms($post->ID, 'oxy_portfolio_categories');
$related_text = oxy_get_option('related_portfolio_text');
if (!empty($cats)) {
    $args = array('post_type' => 'oxy_portfolio_image', 'numberposts' => oxy_get_option('related_portfolio_count'), 'post__not_in' => array($post->ID), 'orderby' => 'rand', 'tax_query' => array(array('taxonomy' => 'oxy_portfolio_categories', 'field' => 'slug', 'terms' => $cats[0]->slug)));
    $columns = intval(oxy_get_option('related_portfolio_columns'));
    $span_width = $columns > 0 ? floor(12 / $columns) : 12;
    $posts = get_posts($args);
}
?>

<?php 
if ($posts) {
    ?>
    <section class="section portfolio-related">
        <div class="container">
            <div class="row element-bottom-80 text-center">
                <?php 
    if (!empty($related_text)) {
        ?>
                    <h3 class="element-top-30 element-bottom-30">
 * @license http://wiki.envato.com/support/legal-terms/licensing-terms/
 * @version 1.17.0
 */
get_header();
global $post;
oxy_page_header($post->ID, array('heading_type' => 'portfolio'));
while (have_posts()) {
    the_post();
    get_template_part('partials/content', 'page');
}
$allow_comments = oxy_get_option('site_comments');
$template_margin = oxy_get_option('template_margin');
?>

<?php 
if (oxy_get_option('related_portfolio_items') === 'on') {
    ?>
    <?php 
    get_template_part('partials/portfolio/portfolio-related');
}
?>


<?php 
if ($allow_comments === 'portfolio' || $allow_comments === 'all') {
    ?>
<section class="section">
    <div class="container">
        <div class="row element-top-<?php 
    echo esc_attr($template_margin);
    ?>
Esempio n. 22
0
<?php

/**
 * Shows a posts featured image
 *
 * @package Omega
 * @subpackage Admin
 * @since 0.1
 *
 * @copyright (c) 2014 Oxygenna.com
 * @license **LICENSE**
 * @version 1.7.3
 */
global $post;
$image_link = is_single() ? '' : get_permalink($post->ID);
$image_link_type = is_single() && oxy_get_option('blog_fancybox') === 'on' ? 'magnific' : 'item';
$image_overlay_icon = is_single() ? 'plus' : 'link';
$image_overlay = oxy_get_option('blog_fancybox') === 'on' ? 'icon' : 'none';
echo oxy_section_vc_single_image(array('image' => get_post_thumbnail_id($post->ID), 'size' => 'full', 'link' => $image_link, 'item_link_type' => $image_link_type, 'overlay_icon' => $image_overlay_icon, 'margin_top' => 'no-top', 'margin_bottom' => 'no-bottom', 'overlay' => $image_overlay));
Esempio n. 23
0
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <?php 
wp_head();
?>
    </head>
    <body <?php 
body_class();
?>
 data-spy="scroll" data-target=".navbar">
        <!-- Page Header -->
        <header class="pull-center" id="masthead">
            <nav class="navbar navbar-fixed-top">
                <div class="navbar-inner" style="text-align:<?php 
echo oxy_get_option('menu_align');
?>
">
                    <div class="container">
                        <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </a>
                        <?php 
oxy_create_mobile_logo();
?>
                        <div class="nav-collapse">
                            <?php 
if (has_nav_menu('primary')) {
    wp_nav_menu(array('theme_location' => 'primary', 'menu_class' => 'nav', 'depth' => 2, 'walker' => new OxyNavWalker()));
Esempio n. 24
0
 function oxy_section_heading($options, $content = '')
 {
     extract(shortcode_atts(array('heading_type' => 'shortcode', 'header_type' => 'h1', 'text_color' => 'text-normal', 'header_size' => 'normal', 'header_weight' => 'regular', 'header_align' => 'left', 'heading_type' => 'shortcode', 'header_fade_out' => 'off', 'extra_classes' => '', 'extra_classes' => '', 'margin_top' => '20', 'margin_bottom' => '20', 'scroll_animation' => 'none', 'scroll_animation_delay' => '0', 'hidden_on_large' => 'off', 'hidden_on_medium' => 'off', 'hidden_on_small' => 'off', 'hidden_on_xsmall' => 'off'), $options));
     $headline_classes = array();
     $headline_classes[] = 'text-' . $header_align;
     $headline_classes[] = oxy_add_extra_shortcode_classes($options);
     $headline_classes[] = 'element-top-' . $margin_top;
     $headline_classes[] = 'element-bottom-' . $margin_bottom;
     $headline_classes[] = $text_color;
     if ($scroll_animation !== 'none') {
         $headline_classes[] = 'os-animation';
     }
     //Striping content to avoid <p></p> tags
     $content = strip_tags($content);
     $headline_classes[] = $header_size;
     $headline_classes[] = $header_weight;
     $parallax_data_attr = array();
     if ('on' === $header_fade_out) {
         $fade_y = 0;
         if ('navbar-sticky' === oxy_get_option('header_type')) {
             $fade_y = oxy_get_option('navbar_scrolled');
         }
         $parallax_data_attr[] = 'data-start="opacity:1"';
         $parallax_data_attr[] = 'data-center="opacity:1"';
         $parallax_data_attr[] = 'data-' . $fade_y . '-top-bottom="opacity:0"';
     }
     ob_start();
     include locate_template('partials/shortcodes/headings/heading-' . $heading_type . '.php');
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
Esempio n. 25
0
if (function_exists('is_woocommerce')) {
    if (is_woocommerce() || is_cart() || is_checkout()) {
        $add_section = false;
    }
}
if ($add_section) {
    $vc_status_meta = get_post_meta($post->ID, '_wpb_vc_js_status', true);
    if (!empty($vc_status_meta)) {
        $add_section = $vc_status_meta === 'false';
    }
}
$allow_comments = oxy_get_option('site_comments');
get_header();
global $post;
oxy_page_header($post->ID, array('heading_type' => 'page'));
$template_margin = oxy_get_option('template_margin');
if ($add_section === true) {
    ?>
<section class="section">
    <div class="container">
        <div class="row element-top-<?php 
    echo esc_attr($template_margin);
    ?>
 element-bottom-<?php 
    echo esc_attr($template_margin);
    ?>
">
            <div class="col-md-12">
<?php 
}
while (have_posts()) {
Esempio n. 26
0
function oxy_render_system_status_page()
{
    $status = new stdClass();
    // remove old default swatches
    $status->installed_swatches = get_posts(array('post_type' => 'oxy_swatch', 'meta_key' => THEME_SHORT . '_status', 'meta_value' => 'enabled', 'posts_per_page' => '-1'));
    $status->swatch_writable = is_writable(OXY_THEME_DIR . 'assets/css');
    $status->swatch_css_save = oxy_get_option('swatch_css_save');
    $status->swatches_files = get_option(THEME_SHORT . '-swatch-files', array());
    ob_start();
    include OXY_THEME_DIR . 'inc/system-status-page.php';
    $output = ob_get_contents();
    ob_end_clean();
    echo $output;
    die;
}
Esempio n. 27
0
    echo $extra_post_class;
    ?>
" id="comments">
    <div class="comments-head">
        <h3>
            <?php 
    printf(_n('1 comment', '%s comments', get_comments_number(), 'omega-td'), number_format_i18n(get_comments_number()));
    ?>
        </h3>
        <small>
            <?php 
    _e('Join the conversation', 'omega-td');
    ?>
        </small>
        <?php 
    if (oxy_get_option('blog_post_icons') == 'on') {
        ?>
            <div class="post-icon">
                <i class="fa fa-comments"></i>
            </div>
        <?php 
    }
    ?>
    </div>
    <ul class="comments-list comments-body media-list">
        <?php 
    wp_list_comments(array('walker' => new OxyCommentWalker()));
    ?>
    </ul>

    <?php 
                <?php 
}
?>
            </div>
            <div class="col-md-3 sidebar">
                <?php 
get_sidebar();
?>
            </div>
        </div>
    </div>
</section>
<?php 
if ($allow_comments === 'pages' || $allow_comments === 'all') {
    ?>
<section class="section <?php 
    echo oxy_get_option('page_comments_swatch');
    ?>
">
    <div class="container">
        <div class="row element-normal-top element-normal-bottom">
            <?php 
    comments_template('', true);
    ?>
        </div>
    </div>
</section>
<?php 
}
get_footer();
Esempio n. 29
0
        </div>
    </div>
    <?php 
    if (oxy_get_option('author_bio') === 'on') {
        ?>
        <?php 
        $author_id = get_the_author_meta('ID');
        $author_url = get_author_posts_url($author_id);
        $extra_post_class = oxy_get_option('blog_post_icons') == 'on' ? 'post-showinfo' : '';
        ?>
        <div class="author-info media small-screen-center <?php 
        echo $extra_post_class;
        ?>
">
            <div class="author-avatar pull-left"><?php 
        if (oxy_get_option('author_bio_avatar') == 'on') {
            echo get_avatar($author_id, 150);
        }
        ?>
            </div>
            <div class="media-body">
                <a href="<?php 
        echo $author_url;
        ?>
">
                    <h3 class="media-heading bordered bordered-small"><?php 
        the_author_meta('nickname');
        ?>
                    </h3>
                </a>
                <div class="media">
Esempio n. 30
0
 function oxy_woocommerce_shop_classes()
 {
     return oxy_get_option('woocom_general_swatch');
 }