Ejemplo n.º 1
0
 public function enqueue_scripts()
 {
     global $PhoenixData, $template;
     $show_sticky_menu = isset($PhoenixData['use_sticky']) ? $PhoenixData['use_sticky'] : true;
     if ($GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()) {
         // In Header
         wp_enqueue_script(THEME_SLUG . '-modernizr', THEME_URI . '/assets/js/modernizr.custom.js', array(), '1.0.0');
         // Enqueue scripts
         wp_enqueue_script('jquery');
         // Localize scripts
         wp_localize_script('jquery', THEME_TEAM, PhoenixTeam_Utils::javascript_globals());
         // In Footer
         if ($show_sticky_menu) {
             wp_enqueue_script(THEME_SLUG . '-sticky', THEME_URI . '/assets/js/sticky.js', array('jquery'), '1.0.0', true);
         }
         wp_enqueue_script(THEME_SLUG . '-bootstrap', THEME_URI . '/assets/js/bootstrap.min.js', array('jquery'), '1.0.0', true);
         wp_enqueue_script(THEME_SLUG . '-bxslider', THEME_URI . '/assets/js/jquery.bxslider.min.js', array('jquery'), '1.0.0', true);
         wp_enqueue_script(THEME_SLUG . '-retina', THEME_URI . '/assets/js/retina.min.js', array('jquery'), '1.0.0', true);
         wp_enqueue_script(THEME_SLUG . '-jquery-cycle', THEME_URI . '/assets/js/jquery.cycle.all.js', array('jquery'), '1.0.0', true);
         wp_enqueue_script(THEME_SLUG . '-likes', THEME_URI . '/assets/js/likes.js', array('jquery'), '1.0.0', true);
         wp_localize_script(THEME_SLUG . '-likes', 'ajax_var', array('url' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('ajax-nonce')));
         wp_enqueue_script(THEME_SLUG . '-jquery.cubeportfolio', THEME_URI . '/assets/js/jquery.cubeportfolio.min.js', array('jquery'), '1.0.0', true);
         wp_enqueue_script(THEME_SLUG . '-jcarousel-responsive', THEME_URI . '/assets/js/jcarousel.responsive.js', array('jquery'), '1.0.0', true);
         wp_enqueue_script(THEME_SLUG . '-jquery-jcarousel', THEME_URI . '/assets/js/jquery.jcarousel.min.js', array('jquery'), '1.0.0', true);
         wp_enqueue_script(THEME_SLUG . '-owl-carousel', THEME_URI . '/assets/js/owl.carousel.min.js', array('jquery'), '1.0.0', true);
         wp_enqueue_script(THEME_SLUG . '-magnific-popup', THEME_URI . '/assets/js/magnific.popup.min.js', array('jquery'), '1.0.0', true);
         wp_enqueue_script(THEME_SLUG . '-testimonialrotator', THEME_URI . '/assets/js/testimonialrotator.js', array('jquery'), '1.0.0', true);
         wp_enqueue_script(THEME_SLUG . '-contact-form', THEME_URI . '/assets/js/contacts.js', array('jquery'), '1.0.0', true);
         wp_enqueue_script(THEME_SLUG . '-main', THEME_URI . '/assets/js/main.js', array('jquery'), '1.0.0', true);
     }
 }
Ejemplo n.º 2
0
 private function is_active($dep)
 {
     if (PhoenixTeam_Utils::dep_exists($dep)) {
         return true;
     }
     return false;
 }
Ejemplo n.º 3
0
 public function create_custom_sidebars()
 {
     global $PhoenixData;
     $custom_sidebars = isset($PhoenixData['sidebars_list']) ? $PhoenixData['sidebars_list'] : null;
     if ($custom_sidebars && is_array($custom_sidebars)) {
         foreach ($custom_sidebars as $sidebar) {
             if ($sidebar) {
                 if (function_exists('register_sidebar')) {
                     register_sidebar(array('name' => $sidebar, 'description' => __('This is your custom sidebar.', 'grandway'), 'id' => PhoenixTeam_Utils::id_formatter(strtolower($sidebar)), 'before_widget' => '<div id="%1$s" class="%2$s widget">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
                 }
             }
         }
     }
 }
Ejemplo n.º 4
0
$PHT_gen_crumbs = isset($PhoenixData['breadcrumbs']) ? $PhoenixData['breadcrumbs'] : null;
?>
<div class="page-in">
  <div class="container">
    <div class="row">
      <div class="col-lg-6 pull-left">
        <div class="page-in-name">
<?php 
echo "404:";
echo " <span>" . __('Error', 'garndway') . "</span>\n";
?>
        </div>
      </div>
<?php 
if ($PHT_gen_crumbs) {
    PhoenixTeam_Utils::breadcrumbs();
} else {
    ?>
      <!-- Breadcrumbs turned off -->
<?php 
}
?>
    </div>
  </div>
</div>

<div class="container general-font-area marg75">
  <div class="col-lg-12">
    <div class="main_pad">
      <strong class="colored oops"><?php 
_e("Oops, 404 Error!", 'garndway');
Ejemplo n.º 5
0
    }
    rewind_posts();
    while (have_posts()) {
        the_post();
        $PHT_post_format = get_post_format();
        if (!$PHT_post_format) {
            echo '<div class="row ' . esc_html($PHT_layout) . '-blog post-standard">';
            get_template_part('format', 'standard');
        } else {
            echo '<div class="row ' . esc_html($PHT_layout) . '-blog post-' . $PHT_post_format . '">';
            get_template_part('format', get_post_format());
        }
        echo '</div>';
    }
    echo '<div class="row"><div class="col-lg-12">';
    PhoenixTeam_Utils::pagination('pride_pg');
    echo '</div></div>';
} else {
    ?>
                        <div class="container general-font-area marg50">
                            <h1 style="display: block; text-align: center;">
                              <?php 
    _e('Sorry, nothing to display.', 'grandway');
    ?>
                            </h1>
                        </div>
<?php 
}
?>
                </div>
Ejemplo n.º 6
0
 public static function breadcrumbs()
 {
     global $post, $pagename;
     /* ================ Settings ================ */
     $delimiter = ' / ';
     // separator
     $sign = null;
     // text before breadcrumbs
     $home = __('Home', 'grandway');
     // homepage name
     $showCurrent = 1;
     // 1 - show current page, 0 - don't show
     $before = null;
     // before crumb tag
     $after = null;
     // after crumb tag
     /* ============== Settings END ============== */
     $homeLink = home_url();
     $get_post_type = get_post_type();
     // WooCommerce
     $woo = PhoenixTeam_Utils::dep_exists('woocommerce');
     if ($woo) {
         if (function_exists('is_shop')) {
             $woo_shop = is_shop();
             ob_start();
             woocommerce_page_title();
             $woo_title = ob_get_clean();
         }
     }
     echo '<div class="col-lg-6 pull-right"><div class="page-in-bread">';
     echo wp_kses_post($sign) . '<a href="' . esc_url($homeLink) . '" title="' . __('Home Page', 'grandway') . '">' . esc_html($home) . '</a> ' . esc_html($delimiter) . ' ';
     $posts_page = self::check_posts_page();
     if ($posts_page && $pagename == $posts_page->post_name) {
         if (get_query_var('paged')) {
             $this_permalink = get_permalink($posts_page->ID);
             echo esc_html($before) . '<a href="' . esc_url($this_permalink) . '" title="' . esc_attr($posts_page->post_title) . '">' . esc_html($posts_page->post_title) . '</a>' . esc_html($after);
         } else {
             echo esc_html($before) . esc_html($posts_page->post_title) . esc_html($after);
         }
     }
     if (is_category()) {
         $thisCat = get_category(get_query_var('cat'), false);
         if ($thisCat->parent != 0) {
             echo '' . get_category_parents($thisCat->parent, TRUE, ' ' . esc_html($delimiter) . ' ') . '';
         }
         echo esc_html($before) . single_cat_title('', false) . esc_html($after);
     } elseif (is_search()) {
         echo esc_html($before) . __('Search for: ', 'grandway') . ' "' . get_search_query() . '"' . esc_html($after);
     } elseif (is_day()) {
         echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . esc_html($delimiter) . ' ';
         echo '<a href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . esc_html($delimiter) . ' ';
         echo esc_html($before) . get_the_time('d') . esc_html($after);
     } elseif (is_month()) {
         echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . esc_html($delimiter) . ' ';
         echo esc_html($before) . get_the_time('F') . esc_html($after);
     } elseif (is_year()) {
         echo esc_html($before) . get_the_time('Y') . esc_html($after);
     } elseif (is_single() && !is_attachment()) {
         if ($get_post_type != 'post') {
             $post_type = get_post_type_object($get_post_type);
             $slug = $post_type->rewrite;
             echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/" onclick="jQuery(function($){event.preventDefault(); window.history.back();});">' . $post_type->labels->name . '</a>';
             if ($showCurrent == 1) {
                 echo ' ' . esc_html($delimiter) . ' ' . esc_html($before) . esc_html(get_the_title()) . esc_html($after) . "\n";
             }
         } else {
             $cat = get_the_category();
             $cat = $cat[0];
             $cats = get_category_parents($cat, TRUE, ' ' . esc_html($delimiter) . ' ');
             if ($showCurrent == 0) {
                 $cats = preg_replace("#^(.+)\\sesc_html({$delimiter})\\s\$#", "\$1", $cats);
             }
             echo wp_kses_post($cats);
             if ($showCurrent == 1) {
                 echo esc_html($before) . esc_html(get_the_title()) . esc_html($after);
             }
         }
         // WooCommerce
     } elseif ($woo && $woo_shop) {
         echo esc_html($before) . esc_html($woo_title) . esc_html($after);
         // Othec CPTs
     } elseif (!is_single() && !is_page() && $get_post_type != 'post' && !is_404()) {
         $post_type = get_post_type_object($get_post_type);
         echo esc_html($before) . esc_html($post_type->labels->singular_name) . "/" . esc_html($after);
     } elseif (is_attachment()) {
         $parent = get_post($post->post_parent);
         $cat = get_the_category($parent->ID);
         if ($cat) {
             $cat = $cat[0];
             echo '' . get_category_parents($cat, TRUE, ' ' . esc_html($delimiter) . ' ') . '';
         }
         echo '<a href="' . esc_url(get_permalink($parent)) . '">' . esc_html($parent->post_title) . '</a>';
         if ($showCurrent == 1) {
             echo ' ' . esc_html($delimiter) . ' ' . esc_html($before) . esc_html(get_the_title()) . esc_html($after);
         }
     } elseif (is_page() && !$post->post_parent) {
         if (get_query_var('paged')) {
             if ($showCurrent == 1) {
                 echo esc_html($before) . '<a href="' . esc_url(get_permalink($post->ID)) . '">' . esc_html(get_the_title($post->ID)) . '</a>' . esc_html($after);
             }
         } else {
             if ($showCurrent == 1) {
                 echo esc_html($before) . esc_html(get_the_title()) . esc_html($after);
             }
         }
     } elseif (is_page() && $post->post_parent) {
         $parent_id = $post->post_parent;
         $breadcrumbs = array();
         while ($parent_id) {
             $page = get_page($parent_id);
             $breadcrumbs[] = '<a href="' . esc_url(get_permalink($page->ID)) . '">' . esc_html(get_the_title($page->ID)) . '</a>';
             $parent_id = $page->post_parent;
         }
         $breadcrumbs = array_reverse($breadcrumbs);
         for ($i = 0; $i < count($breadcrumbs); $i++) {
             echo wp_kses_post($breadcrumbs[$i]);
             if ($i != count($breadcrumbs) - 1) {
                 echo ' ' . esc_html($delimiter) . ' ';
             }
         }
         if ($showCurrent == 1) {
             echo esc_html($delimiter) . esc_html($before) . esc_html(get_the_title()) . esc_html($after);
         }
     } elseif (is_tag()) {
         echo esc_html($before) . single_tag_title('', false) . esc_html($after);
     } elseif (is_author()) {
         global $author;
         $userdata = get_userdata($author);
         echo esc_html($before) . ' ' . $userdata->display_name . esc_html($after);
     } elseif (is_404()) {
         echo esc_html($before) . __('404 page', 'grandway') . esc_html($after);
     }
     if (get_query_var('paged')) {
         if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()) {
             echo esc_html($delimiter) . __('Page ', 'grandway') . get_query_var('paged');
         }
     }
     echo '</div></div>';
 }
Ejemplo n.º 7
0
        wp_link_pages($PHT_link_pages_args);
        ?>
            </div>
          </div>

          <div class="row">
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                <div class="tags-blog-single">
                    <?php 
        the_tags('<ul class="tags-blog"><li>', '</li><li>', '</li></ul>');
        ?>
                </div>
              </div>
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                <?php 
        echo PhoenixTeam_Utils::single_socials();
        ?>
              </div>
          </div>

          <div class="author-bio">
            <div class="img-author"><?php 
        echo get_avatar(get_the_author_meta('ID'), 80);
        ?>
</div>
            <div class="name-author"><?php 
        _e('About author:', 'grandway');
        ?>
 <?php 
        the_author_posts_link();
        ?>
Ejemplo n.º 8
0
if ($PHT_query->have_posts()) {
    while ($PHT_query->have_posts()) {
        $PHT_query->the_post();
        $PHT_is_sticky = is_sticky() ? 'sticky-lou' : null;
        $PHT_post_format = get_post_format();
        if (!$PHT_post_format) {
            echo '<div class="' . implode(' ', get_post_class(array('row', esc_attr($PHT_layout) . '-blog', 'post-standard', $PHT_is_sticky))) . '">';
            get_template_part('format', 'standard');
        } else {
            echo '<div class="' . implode(' ', get_post_class(array('row', esc_attr($PHT_layout) . '-blog', 'post-' . $PHT_post_format, $PHT_is_sticky))) . '">';
            get_template_part('format', get_post_format());
        }
        echo '</div>';
    }
    echo '<div class="row"><div class="col-lg-12">';
    PhoenixTeam_Utils::pagination('pride_pg', $PHT_query);
    echo '</div></div>';
}
?>
            </div>

        <?php 
if ($PHT_sidebar_pos == 'right') {
    ?>
            <!-- sidebar -->
            <div class="col-lg-3">
                <?php 
    dynamic_sidebar($PHT_sidebar_area);
    ?>
            </div><!-- sidebar end-->
        <?php 
Ejemplo n.º 9
0
                                    <?php 
if (PhoenixTeam_Utils::dep_exists('megamenu')) {
    ?>

                                        <?php 
    PhoenixTeam_Utils::create_nav('header-menu');
    ?>

                                    <?php 
} else {
    ?>

                                        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"></button>
                                        <div class="navbar-collapse collapse">
                                            <?php 
    PhoenixTeam_Utils::create_nav('header-menu', 3, 'menu', null, new PhoenixTeam_Navmenu_Walker());
    ?>

                                        </div>
                                    <?php 
}
?>

                                </div>
                            </div>
                        </div>
                    </div>
                </nav>
            </div>
        </div>
Ejemplo n.º 10
0
<?php

global $PHT_layout;
$PHT_permalink = get_permalink();
$PHT_type = function_exists('rwmb_meta') ? rwmb_meta(THEME_SLUG . '_postformat_video_type') : false;
if ($PHT_type == 'url') {
    $PHT_video = function_exists('rwmb_meta') ? rwmb_meta(THEME_SLUG . '_postformat_video_url') : false;
    $PHT_video = PhoenixTeam_Utils::embed_url($PHT_video);
} elseif ($PHT_type == 'embed') {
    $PHT_video = function_exists('rwmb_meta') ? rwmb_meta(THEME_SLUG . '_postformat_video_embed') : false;
} else {
    $PHT_video = false;
}
?>

<?php 
if ($PHT_video) {
    ?>

    <?php 
    if ($PHT_layout == 'medium') {
        ?>
        <div class="col-lg-5">
    <?php 
    }
    ?>

        <div class="video-container">
            <?php 
    echo wp_kses($PHT_video, array('iframe' => array('src' => array(), 'frameborder' => array(), 'title' => array(), 'allowFullScreen' => array(), 'webkitAllowFullScreen' => array(), 'mozallowfullscreen' => array())), array('http', 'https'));
    ?>
Ejemplo n.º 11
0
<?php

global $PHT_layout;
$PHT_permalink = get_permalink();
$PHT_type = function_exists('rwmb_meta') ? rwmb_meta(THEME_SLUG . '_postformat_audio_type') : false;
$PHT_has_post_thumb = has_post_thumbnail();
if ($PHT_type == 'url') {
    $PHT_audio = function_exists('rwmb_meta') ? rwmb_meta(THEME_SLUG . '_postformat_audio_url') : false;
    $PHT_audio = PhoenixTeam_Utils::embed_url($PHT_audio);
} elseif ($PHT_type == 'file') {
    $PHT_audio = function_exists('rwmb_meta') ? rwmb_meta(THEME_SLUG . '_postformat_audio_file') : false;
    $PHT_audio = wp_get_attachment_url($PHT_audio);
} else {
    $PHT_audio = false;
}
?>

<?php 
if ($PHT_layout == 'medium') {
    ?>
    <div class="col-lg-5">
<?php 
}
?>

    <?php 
if ($PHT_audio && $PHT_type == 'url') {
    ?>
        <div class="video-container">
            <?php 
    echo wp_kses($PHT_audio, array('iframe' => array('src' => array(), 'frameborder' => array(), 'title' => array(), 'allowFullScreen' => array(), 'webkitAllowFullScreen' => array(), 'mozallowfullscreen' => array())), array('http', 'https'));
Ejemplo n.º 12
0
      <div class="footer-bottom">
        <div class="row">
          <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 pull-left">
            <div class="copyright">
              <?php 
if ($PHT_copyright) {
    echo wp_kses_post($PHT_copyright);
}
?>

            </div>
          </div>
          <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 pull-right">
            <div class="foot_menu" style="text-align:center">
                <?php 
PhoenixTeam_Utils::create_nav('footer-menu', 1, 'foot_menu');
?>

            </div>
          </div>
        </div>
      </div>
    </div>
</div>
</div>
<!-- /wrapper -->

<?php 
wp_footer();
?>
Ejemplo n.º 13
0
 public function portfolio_carousel($attrs, $content = null)
 {
     $return = null;
     $text = null;
     extract(shortcode_atts(array('qty' => 6, 'css' => null, 'title' => !isset($attrs['title']) ? __("Recent Projects", 'grandway') : $attrs['title']), $attrs));
     wp_enqueue_script(THEME_SLUG . '-portfolio');
     $vcCssClass = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css, ' '), $this->settings['base'], $attrs);
     $portfolio = array('post_type' => THEME_SLUG . '_portfolio', 'posts_per_page' => $qty, 'post_status' => 'publish');
     $portfolio = new WP_Query($portfolio);
     if ($portfolio->have_posts()) {
         $autoplay = true;
         $uID = null;
         $script = null;
         $return = '
         <div class="row">
           <div class="col-lg-12">
             <div class="promo-block">
               <div class="promo-text">' . esc_html($title) . '</div>
             </div>
           </div>
           <div class="col-lg-12">
           <div class="marg25 phoenixteam-portfolio-carousel' . esc_attr($vcCssClass) . '">
             <div class="portfolio-owl-carousel" id="phoenixteam-portfolio-owl-carousel-' . esc_attr($uID) . '">';
         while ($portfolio->have_posts()) {
             $portfolio->the_post();
             $ID = get_the_id();
             $the_cat = get_the_terms($ID, THEME_SLUG . '_portfolio_category');
             $categories = '';
             if (is_array($the_cat)) {
                 foreach ($the_cat as $cur_term) {
                     $categories .= $cur_term->slug . ' ';
                 }
             }
             $thumb_params = array('width' => 360, 'height' => 240, 'crop' => true);
             $thumb = null;
             $title = get_the_title();
             $text = function_exists('rwmb_meta') ? rwmb_meta(THEME_SLUG . '_portfolio_excerpt') : false;
             $text = PhoenixTeam_Utils::excerpt($text, 120);
             $link = get_permalink();
             if (has_post_thumbnail()) {
                 $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($ID), 'full', true);
                 $thumb = $thumb[0];
             } else {
                 $thumb = THEME_URI . "/assets/images/nopicture.png";
             }
             $return .= '<div class="cbp-item ' . esc_attr($categories) . '">
                   <div class="portfolio-phoenixteam">
                     <div class="portfolio-image">';
             if ($thumb) {
                 $return .= '<img data-no-retina="1" src="' . esc_url(bfi_thumb($thumb, $thumb_params)) . '" alt="' . esc_attr($title) . '" />
                       <figcaption class="detailholder">
                         <p class="icon-links">
                             <a href="' . esc_url($link) . '" class="cbp-singlePageInline"><i class="icon-attachment"></i></a>
                             <a href="' . esc_url($thumb) . '" class="cbp-lightbox" data-title="' . esc_attr($title) . '"><i class="icon-magnifying-glass"></i></a>
                         </p>
                       </figcaption>
                   </div>';
             }
             $return .= '
                     <div class="portfolio-name">' . esc_html($title) . '</div>
                     <div class="portfolio-text">' . esc_html($text) . '</div>
                   </div>
                 </div>';
         }
         $return .= '</div></div></div></div>';
         $return .= $script;
         wp_reset_postdata();
         return $return;
     } else {
         return '<div class="phoenixteam-clients-carousel"><p>' . __("You didn't select any image.", 'grandway') . '</p></div>';
     }
     return false;
 }