function fast_monkey_search_content($content)
{
    $output = beans_open_markup('fast_monkey_search_content', 'p');
    $output .= beans_output('fast_monkey_search_post_content', substr(strip_tags($content), 0, 150) . ' ...');
    $output .= beans_close_markup('fast_monkey_search_content', 'p');
    return $output;
}
Example #2
0
/**
 * Add markup to embed.
 *
 * @since 1.0.0
 *
 * @param string $html The embed HTML.
 *
 * @return string The modified embed HTML.
 */
function beans_embed_oembed($html)
{
    $output = beans_open_markup('beans_embed_oembed', 'div', 'class=tm-oembed');
    $output .= $html;
    $output .= beans_close_markup('beans_embed_oembed', 'div');
    return $output;
}
Example #3
0
function kkthemes_post_content($content)
{
    $output = beans_open_markup('kkthemes_post_content', 'p');
    $output .= beans_output('kkthemes_post_content_summary', kkthemes_get_excerpt($content));
    $output .= beans_close_markup('kkthemes_post_content', 'p');
    $output .= '<p>' . beans_post_more_link() . '</p>';
    return $output;
}
function beans_child_add_hero()
{
    echo beans_open_markup('beans_child_hero_section', 'div', array('class' => 'uk-block uk-block-large uk-container-center uk-text-center bc-block'));
    $hero_content = '<h1 class="uk-heading-large">My Beans</h1>';
    $hero_content .= '<p class="uk-article-lead">A demo theme for SitePoint</p>';
    $hero_content .= '<p><a href="#" class="uk-button uk-button-large">Read Article <i class="uk-icon-external-link"></i></a></p>';
    echo $hero_content;
    echo beans_close_markup('beans_child_hero_section', 'div');
}
Example #5
0
/**
 * Modify the search form.
 *
 * @since 1.0.0
 *
 * @return string The form.
 */
function beans_search_form()
{
    $output = beans_open_markup('beans_search_form', 'form', array('class' => 'uk-form uk-form-icon uk-form-icon-flip uk-width-1-1', 'method' => 'get', 'action' => esc_url(home_url('/')), 'role' => 'search'));
    $output .= beans_selfclose_markup('beans_search_form_input', 'input', array('class' => 'uk-width-1-1', 'type' => 'search', 'placeholder' => __('Search', 'beans'), 'value' => esc_attr(get_search_query()), 'name' => 's'));
    $output .= beans_open_markup('beans_search_form_input_icon', 'i', 'class=uk-icon-search');
    $output .= beans_close_markup('beans_search_form_input_icon', 'i');
    $output .= beans_close_markup('beans_search_form', 'form');
    return $output;
}
Example #6
0
/**
 * Echo the footer content.
 *
 * @since 1.0.0
 */
function beans_footer_content()
{
    echo beans_open_markup('beans_footer_credit', 'div', array('class' => 'uk-clearfix uk-text-small uk-text-muted'));
    echo beans_open_markup('beans_footer_credit_left', 'span', array('class' => 'uk-align-medium-left uk-margin-small-bottom'));
    echo beans_output('beans_footer_credit_text', sprintf(__('&#x000A9; %1$s - %2$s. All rights reserved.', 'beans'), date("Y"), get_bloginfo('name')));
    echo beans_close_markup('beans_footer_credit_left', 'span');
    $framework_link = beans_open_markup('beans_footer_credit_framework_link', 'a', array('href' => esc_url('https://themebeans.com/beans'), 'rel' => 'designer'));
    $framework_link .= beans_output('beans_footer_credit_framework_link_text', 'Beans');
    $framework_link .= beans_close_markup('beans_footer_credit_framework_link', 'a');
    echo beans_open_markup('beans_footer_credit_right', 'span', array('class' => 'uk-align-medium-right uk-margin-bottom-remove'));
    echo beans_output('beans_footer_credit_right_text', sprintf(__('%1$s theme for WordPress.', 'beans'), $framework_link));
    echo beans_close_markup('beans_footer_credit_right', 'span');
    echo beans_close_markup('beans_footer_credit', 'div');
}
Example #7
0
function kkthemes_site_title_tag()
{
    // Stop here if there isn't a description.
    if (!($description = get_bloginfo('description'))) {
        return;
    }
    $tag_style = '';
    $header_image = get_header_image();
    if (!empty($header_image)) {
        $tag_style = 'background-image: url(' . esc_url($header_image) . ');';
    }
    echo beans_open_markup('kkthemes_site_title_tag', 'div', array('class' => 'tm-site-title-tag tm-branded-panel uk-block uk-margin-large-bottom', 'itemprop' => 'description', 'style' => $tag_style));
    echo beans_output('kkthemes_site_title_tag_text', $description);
    echo beans_close_markup('kkthemes_site_title_tag', 'div');
}
Example #8
0
/**
 * Echo field description.
 *
 * @since 1.0.0
 *
 * @param array $field {
 *      Array of data.
 *
 *      @type string $description The field description. The description can be truncated using <!--more-->
 *            					  as a delimiter. Default false.
 * }
 */
function beans_field_description($field)
{
    if (!($description = beans_get('description', $field))) {
        return;
    }
    echo beans_open_markup('beans_field_description', 'div', array('class' => 'bs-field-description'));
    if (preg_match('#<!--more-->#', $description, $matches)) {
        list($description, $extended) = explode($matches[0], $description, 2);
    }
    echo $description;
    if (isset($extended)) {
        echo '&nbsp;<a class="bs-read-more" href="#">' . __('More...', 'beans') . '</a>';
        echo '<div class="bs-extended-content">' . $extended . '</div>';
    }
    echo beans_close_markup('beans_field_description', 'div');
}
Example #9
0
/**
 * Modify wp_nav_menu arguments.
 *
 * This function converts the wp_nav_menu to UIKit format. It uses Beans custom walker and also makes
 * use of the Beans HTML API.
 *
 * @since 1.0.0
 *
 * @param array $args The wp_nav_menu arguments.
 *
 * @return array The modified wp_nav_menu arguments.
 */
function beans_modify_menu_args($args)
{
    // Get type.
    $type = beans_get('beans_type', $args);
    // Check if the menu is in a widget area and set the type accordingly if it is defined.
    if ($widget_area_type = beans_get_widget_area('beans_type')) {
        $type = $widget_area_type == 'stack' ? 'sidenav' : $widget_area_type;
    }
    // Stop if it isn't a beans menu.
    if (!$type) {
        return $args;
    }
    // Default item wrap attributes.
    $attr = array('id' => '%1$s', 'class' => array(beans_get('menu_class', $args)));
    // Add UIKit navbar item wrap attributes.
    if ($type == 'navbar') {
        $attr['class'][] = 'uk-navbar-nav';
    }
    // Add UIKit sidenav item wrap attributes.
    if ($type == 'sidenav') {
        $attr['class'][] = 'uk-nav uk-nav-parent-icon uk-nav-side';
        $attr['data-uk-nav'] = '{multiple:true}';
    }
    // Add UIKit offcanvas item wrap attributes.
    if ($type == 'offcanvas') {
        $attr['class'][] = 'uk-nav uk-nav-parent-icon uk-nav-offcanvas';
        $attr['data-uk-nav'] = '{multiple:true}';
    }
    // Implode to avoid empty spaces.
    $attr['class'] = implode(' ', array_filter($attr['class']));
    // Set to null if empty to avoid outputing empty class html attribute.
    if (!$attr['class']) {
        $attr['class'] = null;
    }
    $location_sub_filter = ($location = beans_get('theme_location', $args)) ? "[_{$location}]" : null;
    // Force beans menu arguments.
    $force = array('beans_type' => $type, 'items_wrap' => beans_open_markup("beans_menu[_{$type}]{$location_sub_filter}", 'ul', $attr, $args) . '%3$s' . beans_close_markup("beans_menu[_{$type}]{$location_sub_filter}", 'ul', $args));
    // Allow walker overwrite.
    if (!beans_get('walker', $args)) {
        $args['walker'] = new _Beans_Walker_Nav_Menu();
    }
    // Adapt level to walker depth.
    $force['beans_start_level'] = ($level = beans_get('beans_start_level', $args)) ? $level - 1 : 0;
    return array_merge($args, $force);
}
Example #10
0
/**
 * Echo post meta comments shortcode.
 *
 * @since 1.0.0
 */
function beans_post_meta_comments_shortcode()
{
    global $post;
    if (post_password_required() || !comments_open()) {
        return;
    }
    $comments_number = (int) get_comments_number($post->ID);
    if ($comments_number < 1) {
        $comment_text = beans_output('beans_post_meta_empty_comment_text', __('Leave a comment', 'beans'));
    } else {
        if ($comments_number === 1) {
            $comment_text = beans_output('beans_post_meta_comments_text_singular', __('1 comment', 'beans'));
        } else {
            $comment_text = beans_output('beans_post_meta_comments_text_plurial', __('%s comments', 'beans'));
        }
    }
    echo beans_open_markup('beans_post_meta_comments', 'a', array('href' => esc_url(get_comments_link())));
    printf($comment_text, (int) get_comments_number($post->ID));
    echo beans_close_markup('beans_post_meta_comments', 'a');
}
Example #11
0
/**
 * Echo header site title tag.
 *
 * @since 1.0.0
 */
function beans_site_title_tag()
{
    // Stop here if there isn't a description.
    if (!($description = get_bloginfo('description'))) {
        return;
    }
    echo beans_open_markup('beans_site_title_tag', 'span', array('class' => 'tm-site-title-tag uk-text-small uk-text-muted uk-display-block'));
    echo beans_output('beans_site_title_tag_text', $description);
    echo beans_close_markup('beans_site_title_tag', 'span');
}
        $selected = isset($_REQUEST['attribute_' . sanitize_title($attribute_name)]) ? wc_clean($_REQUEST['attribute_' . sanitize_title($attribute_name)]) : $product->get_variation_default_attribute($attribute_name);
        wc_dropdown_variation_attribute_options(array('options' => $options, 'attribute' => $attribute_name, 'product' => $product, 'selected' => $selected));
        echo end($attribute_keys) === $attribute_name ? beans_open_markup('woo_single_add_to_cart_remove_variation_link', 'a', array('class' => 'reset_variations', 'href' => '#')) . __('Clear selection', 'woocommerce') . beans_close_markup('woo_single_add_to_cart_remove_variation_link', 'a') : '';
        echo beans_close_markup('woo_single_add_to_cart_variable_value_cell', 'td');
        echo beans_close_markup('woo_single_add_to_cart_variable_tr', 'tr');
    }
    echo beans_close_markup('woo_single_add_to_cart_variable_tbody', 'tbody');
    echo beans_close_markup('woo_single_add_to_cart_variable_table', 'table');
    do_action('woocommerce_before_add_to_cart_button');
    echo beans_open_markup('woo_single_add_to_cart_single_variation_wrap', 'div', array('class' => 'single_variation_wrap', 'style' => 'display:none;'));
    /**
     * woocommerce_before_single_variation Hook
     */
    do_action('woocommerce_before_single_variation');
    /**
     * woocommerce_single_variation hook. Used to output the cart button and placeholder for variation data.
     * @since 2.4.0
     * @hooked woocommerce_single_variation - 10 Empty div for variation data.
     * @hooked woocommerce_single_variation_add_to_cart_button - 20 Qty and cart button.
     */
    do_action('woocommerce_single_variation');
    /**
     * woocommerce_after_single_variation Hook
     */
    do_action('woocommerce_after_single_variation');
    echo beans_close_markup('woo_single_add_to_cart_single_variation_wrap', 'div');
    do_action('woocommerce_after_add_to_cart_button');
}
do_action('woocommerce_after_variations_form');
echo beans_close_markup('woo_single_add_to_cart_variable_form', 'form');
do_action('woocommerce_after_add_to_cart_form');
Example #13
0
/**
 * Modify WP {@link https://codex.wordpress.org/Function_Reference/gallery_shortcode Gallery Shortcode} output.
 *
 * This implements the functionality of the Gallery Shortcode for displaying WordPress images in a post.
 *
 * @since 1.3.0
 *
 * @param string $output   The gallery output. Default empty.
 * @param array  $attr     Attributes of the {@link https://codex.wordpress.org/Function_Reference/gallery_shortcode gallery_shortcode()}.
 * @param int    $instance Unique numeric ID of this gallery shortcode instance.
 *
 * @return string HTML content to display gallery.
 */
function beans_post_gallery($output, $attr, $instance)
{
    $post = get_post();
    $html5 = current_theme_supports('html5', 'gallery');
    $defaults = array('order' => 'ASC', 'orderby' => 'menu_order ID', 'id' => $post ? $post->ID : 0, 'itemtag' => $html5 ? 'figure' : 'dl', 'icontag' => $html5 ? 'div' : 'dt', 'captiontag' => $html5 ? 'figcaption' : 'dd', 'columns' => 3, 'size' => 'thumbnail', 'include' => '', 'exclude' => '', 'link' => '');
    $atts = shortcode_atts($defaults, $attr, 'gallery');
    $id = intval($atts['id']);
    // Set attachements.
    if (!empty($atts['include'])) {
        $_attachments = get_posts(array('include' => $atts['include'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby']));
        $attachments = array();
        foreach ($_attachments as $key => $val) {
            $attachments[$val->ID] = $_attachments[$key];
        }
    } elseif (!empty($atts['exclude'])) {
        $attachments = get_children(array('post_parent' => $id, 'exclude' => $atts['exclude'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby']));
    } else {
        $attachments = get_children(array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby']));
    }
    // Stop here if no attachment.
    if (empty($attachments)) {
        return '';
    }
    if (is_feed()) {
        $output = "\n";
        foreach ($attachments as $att_id => $attachment) {
            $output .= wp_get_attachment_link($att_id, $atts['size'], true) . "\n";
        }
        return $output;
    }
    // Valid tags.
    $valid_tags = wp_kses_allowed_html('post');
    $validate = array('itemtag', 'captiontag', 'icontag');
    // Validate tags.
    foreach ($validate as $tag) {
        if (!isset($valid_tags[$atts[$tag]])) {
            $atts[$tag] = $defaults[$tag];
        }
    }
    // Set variables used in the output.
    $columns = intval($atts['columns']);
    $size_class = sanitize_html_class($atts['size']);
    // WP adds the opening div in the gallery_style filter (weird), so we follow it as don't want to break people's site.
    $gallery_div = beans_open_markup("beans_post_gallery[_{$id}]", 'div', array('class' => "uk-grid uk-grid-width-small-1-{$columns} gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}", 'data-uk-grid-margin' => false), $id, $columns);
    /**
     * Apply WP core filter. Filter the default gallery shortcode CSS styles.
     *
     * Documented in WordPress.
     *
     * @ignore
     */
    $output = apply_filters('gallery_style', $gallery_div);
    $i = 0;
    foreach ($attachments as $attachment_id => $attachment) {
        $attr = trim($attachment->post_excerpt) ? array('aria-describedby' => "gallery-{$instance}-{$id}") : '';
        $image_meta = wp_get_attachment_metadata($attachment_id);
        $orientation = '';
        if (isset($image_meta['height'], $image_meta['width'])) {
            $orientation = $image_meta['height'] > $image_meta['width'] ? 'portrait' : 'landscape';
        }
        // Set the image output.
        if ('none' === $atts['link']) {
            $image_output = wp_get_attachment_image($attachment_id, $atts['size'], false, $attr);
        } else {
            $image_output = wp_get_attachment_link($attachment_id, $atts['size'], 'file' !== $atts['link'], false, false, $attr);
        }
        $output .= beans_open_markup("beans_post_gallery_item[_{$attachment_id}]", $atts['itemtag'], array('class' => 'gallery-item'));
        $output .= beans_open_markup("beans_post_gallery_icon[_{$attachment_id}]", $atts['icontag'], array('class' => "gallery-icon {$orientation}"));
        // Automatically escaped.
        $output .= beans_output("beans_post_gallery_icon[_{$attachment_id}]", $image_output, $attachment_id, $atts);
        $output .= beans_close_markup("beans_post_gallery_icon[_{$attachment_id}]", $atts['icontag']);
        if ($atts['captiontag'] && trim($attachment->post_excerpt)) {
            $output .= beans_open_markup("beans_post_gallery_caption[_{$attachment_id}]", $atts['captiontag'], array('class' => 'wp-caption-text gallery-caption'));
            $output .= beans_output("beans_post_gallery_caption_text[_{$attachment_id}]", wptexturize($attachment->post_excerpt));
            $output .= beans_close_markup("beans_post_gallery_caption[_{$attachment_id}]", $atts['captiontag']);
        }
        $output .= beans_close_markup("beans_post_gallery_item[_{$attachment_id}]", $atts['itemtag']);
    }
    $output .= beans_close_markup("beans_post_gallery[_{$id}]", 'div');
    return $output;
}
Example #14
0
/**
 * Modify widget count.
 *
 * @since 1.0.0
 *
 * @param string $content The widget content.
 *
 * @return string The modified widget content.
 */
function beans_modify_widget_count($content)
{
    $count = beans_output('beans_widget_count', '$1');
    if (beans_get('dropdown', beans_get_widget('options')) == true) {
        $output = $count;
    } else {
        $output = beans_open_markup('beans_widget_count', 'span', 'class=tm-count');
        $output .= $count;
        $output .= beans_close_markup('beans_widget_count', 'span');
    }
    // Keep closing tag to avoid overwriting the inline JavaScript.
    return preg_replace('#>((\\s|&nbsp;)\\((.*)\\))#', '>' . $output, $content);
}
Example #15
0
        echo beans_open_markup('beans_comments_list', 'ol', array('class' => 'uk-comment-list'));
        wp_list_comments(array('avatar_size' => 50, 'callback' => 'beans_comment_callback'));
        echo beans_close_markup('beans_comments_list', 'ol');
    } else {
        /**
         * Fires if no comments exist.
         *
         * This hook only fires if comments are open.
         *
         * @since 1.0.0
         */
        do_action('beans_no_comment');
    }
    /**
     * Fires after the comments list.
     *
     * This hook only fires if comments are open.
     *
     * @since 1.0.0
     */
    do_action('beans_after_open_comments');
} else {
    /**
     * Fires if comments are closed.
     *
     * @since 1.0.0
     */
    do_action('beans_comments_closed');
}
echo beans_close_markup('beans_comments', 'div');
Example #16
0
 /**
  * Extend WordPress end menu elements.
  *
  * @ignore
  */
 function end_el(&$output, $item, $depth = 0, $args = array())
 {
     // Stop here if the depth is smaller than starting depth.
     if ($depth < $args->beans_start_level) {
         return;
     }
     $item_id = $item->ID;
     $output .= beans_close_markup("beans_menu_item[_{$item_id}]", 'li', $item, $depth, $args);
 }
<?php

/**
 * Single Product Price, including microdata for SEO
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     1.6.4
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $product;
echo beans_open_markup('woo_single_price_wrap', 'div', array('itemprop' => 'offers', 'itemscope' => '', 'itemtype' => 'http://schema.org/Offer'));
echo beans_open_markup('woo_single_price_p', 'p', array('class' => 'price'));
echo $product->get_price_html();
echo beans_close_markup('woo_single_price_p', 'p');
echo beans_selfclose_markup('woo_single_price_meta_price', 'meta', array('itemprop' => 'price', 'content' => esc_attr($product->get_price())));
echo beans_selfclose_markup('woo_single_price_meta_currency', 'meta', array('itemprop' => 'priceCurrency', 'content' => esc_attr(get_woocommerce_currency())));
echo beans_selfclose_markup('woo_single_price_meta_link', 'link', array('itemprop' => 'availability', 'href' => 'http://schema.org/' . $product->is_in_stock() ? 'InStock' : 'OutOfStock'));
echo beans_close_markup('woo_single_price_wrap', 'div');
    echo beans_open_markup('woo_single_add_to_cart_grouped_tbody_purchase', 'td', array('class', 'label'));
    echo beans_open_markup('woo_single_add_to_cart_grouped_tbody_label', 'label', array('for', 'product-' . $product_id));
    echo $product->is_visible() ? '<a href="' . esc_url(apply_filters('woocommerce_grouped_product_list_link', get_permalink(), $product_id)) . '">' . esc_html(get_the_title()) . '</a>' : esc_html(get_the_title());
    echo beans_close_markup('woo_single_add_to_cart_grouped_tbody_purchase', 'label');
    echo beans_close_markup('woo_single_add_to_cart_grouped_tbody_label', 'td');
    do_action('woocommerce_grouped_product_list_before_price', $product);
    echo beans_open_markup('woo_single_add_to_cart_grouped_tbody_price', 'td', array('class', 'price'));
    echo $product->get_price_html();
    if ($availability = $product->get_availability()) {
        $availability_html = empty($availability['availability']) ? '' : beans_open_markup('woo_single_add_to_cart_grouped_availability', 'p', array('class', 'stock ' . esc_attr($availability['class']))) . esc_html($availability['availability']) . beans_close_markup('woo_single_add_to_cart_grouped_availability', 'p');
        echo apply_filters('woocommerce_stock_html', $availability_html, $availability['availability'], $product);
    }
    echo beans_open_markup('woo_single_add_to_cart_grouped_tbody_price', 'td');
    echo beans_close_markup('woo_single_add_to_cart_grouped_tbody_row', 'tr');
}
// Reset to parent grouped product
$post = $parent_product_post;
$product = wc_get_product($parent_product_post->ID);
setup_postdata($parent_product_post);
echo beans_close_markup('woo_single_add_to_cart_grouped_tbody', 'tbody');
echo beans_close_markup('woo_single_add_to_cart_grouped_table', 'table');
echo beans_selfclose_markup('woo_single_add_to_cart_grouped_input_hidden', 'input', array('type' => 'hidden', 'name' => 'add-to-cart', 'value' => esc_attr($product->id)));
if ($quantites_required) {
    do_action('woocommerce_before_add_to_cart_button');
    echo beans_open_markup('woo_single_add_to_cart_grouped_tbody_submit_button', 'button', array('type' => 'submit', 'class' => 'single_add_to_cart_button button alt'));
    echo $product->single_add_to_cart_text();
    echo beans_close_markup('woo_single_add_to_cart_grouped_tbody_submit_button', 'button');
    do_action('woocommerce_after_add_to_cart_button');
}
echo beans_close_markup('woo_single_add_to_cart_grouped', 'form');
do_action('woocommerce_after_add_to_cart_form');
Example #19
0
/**
 * Modify password protected form.
 *
 * @since 1.0.0
 *
 * @return string The form.
 */
function beans_post_password_form()
{
    global $post;
    $label = 'pwbox-' . (empty($post->ID) ? rand() : $post->ID);
    // Notice.
    $output = beans_open_markup('beans_password_form_notice', 'p', array('class' => 'uk-alert uk-alert-warning'));
    $output .= beans_output('beans_password_form_notice_text', __('This post is protected. To view it, enter the password below!', 'beans'));
    $output .= beans_close_markup('beans_password_form_notice', 'p');
    // Form.
    $output .= beans_open_markup('beans_password_form', 'form', array('class' => 'uk-form uk-margin-bottom', 'method' => 'post', 'action' => esc_url(site_url('wp-login.php?action=postpass', 'login_post'))));
    $output .= beans_selfclose_markup('beans_password_form_input', 'input', array('class' => 'uk-margin-small-top uk-margin-small-right', 'type' => 'password', 'placeholder' => esc_attr(apply_filters('beans_password_form_input_placeholder', __('Password', 'beans'))), 'name' => 'post_password'));
    $output .= beans_selfclose_markup('beans_password_form_submit', 'input', array('class' => 'uk-button uk-margin-small-top', 'type' => 'submit', 'name' => 'submit', 'value' => esc_attr(apply_filters('beans_password_form_submit_text', __('Submit', 'beans')))));
    $output .= beans_close_markup('beans_password_form', 'form');
    return $output;
}
Example #20
0
/**
 * Echo no menu notice.
 *
 * @since 1.0.0
 */
function beans_no_menu_notice()
{
    echo beans_open_markup('beans_no_menu_notice', 'p', array('class' => 'uk-alert uk-alert-warning'));
    echo beans_output('beans_no_menu_notice_text', __('Whoops, your site does not have a menu!', 'beans'));
    echo beans_close_markup('beans_no_menu_notice', 'p');
}
 *
 * @hooked woocommerce_show_product_sale_flash - 10
 * @hooked woocommerce_show_product_images - 20
 */
do_action('woocommerce_before_single_product_summary');
echo beans_open_markup('woo_product_single_summary', 'div', array('class' => 'summary entry-summary'));
/**
 * woocommerce_single_product_summary hook
 *
 * @hooked woocommerce_template_single_title - 5
 * @hooked woocommerce_template_single_rating - 10
 * @hooked woocommerce_template_single_price - 10
 * @hooked woocommerce_template_single_excerpt - 20
 * @hooked woocommerce_template_single_add_to_cart - 30
 * @hooked woocommerce_template_single_meta - 40
 * @hooked woocommerce_template_single_sharing - 50
 */
do_action('woocommerce_single_product_summary');
echo beans_close_markup('woo_product_single_summary', 'div');
/**
 * woocommerce_after_single_product_summary hook
 *
 * @hooked woocommerce_output_product_data_tabs - 10
 * @hooked woocommerce_upsell_display - 15
 * @hooked woocommerce_output_related_products - 20
 */
do_action('woocommerce_after_single_product_summary');
echo beans_selfclose_markup('woo_product_single_meta_url', 'meta', array('itemprop' => 'url', 'content' => get_the_permalink()));
echo beans_close_markup('woo_product_single_wrap', 'div');
echo '<!-- #product-the_ID(); ?> -->';
do_action('woocommerce_after_single_product');
Example #22
0
        do_action('beans_widget');
        echo beans_close_markup('beans_widget_panel' . _beans_widget_subfilters(), 'div');
        if (beans_get_widget_area('beans_type') == 'grid') {
            echo beans_close_markup('beans_widget_grid' . _beans_widget_subfilters(), 'div');
        }
    }
    /**
     * Fires after the widgets loop.
     *
     * This hook only fires if widgets exist.
     *
     * @since 1.0.0
     */
    do_action('beans_after_widgets_loop');
} else {
    /**
     * Fires if no widgets exist.
     *
     * @since 1.0.0
     */
    do_action('beans_no_widget');
}
if (beans_get_widget_area('beans_type') == 'offcanvas') {
    echo beans_close_markup('beans_widget_area_offcanvas_bar' . _beans_widget_area_subfilters(), 'div');
    echo beans_close_markup('beans_widget_area_offcanvas_wrap' . _beans_widget_area_subfilters(), 'div');
}
if (beans_get_widget_area('beans_type') == 'grid') {
    echo beans_close_markup('beans_widget_area_grid' . _beans_widget_area_subfilters(), 'div');
}
// This includes everything added to wp hooks after the widgets.
echo beans_get_widget_area('after_widgets');
<?php

/**
 * Auth footer
 *
 * @author  WooThemes
 * @package WooCommerce/Templates/Auth
 * @version 2.4.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
echo beans_close_markup('woo_auth_content', 'div');
echo beans_close_markup('woo_auth_body', 'body');
echo '</html>';
            $no_gateways_message = __('Please fill in your details above to see available payment methods.', 'woocommerce');
        } else {
            $no_gateways_message = __('Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce');
        }
        echo beans_open_markup('woo_checkout_no_available_payment_methods_message', 'li');
        echo apply_filters('woocommerce_no_available_payment_methods_message', $no_gateways_message);
        echo beans_close_markup('woo_checkout_no_available_payment_methods_message', 'li');
    }
    echo beans_close_markup('woo_checkout_payment_method_wrap_list', 'ul');
}
echo beans_open_markup('woo_checkout_place_order_wrap', 'div', array('class' => 'form-row place-order'));
echo '<noscript>';
_e('Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'woocommerce');
echo '<br/><input type="submit" class="button alt" name="woocommerce_checkout_update_totals" value="' . __('Update totals', 'woocommerce') . '" /></noscript>';
wp_nonce_field('woocommerce-process_checkout');
do_action('woocommerce_review_order_before_submit');
echo apply_filters('woocommerce_order_button_html', beans_selfclose_markup('woo_order_button_html', 'input', array('type' => 'submit', 'class' => 'button alt', 'name' => 'woocommerce_checkout_place_order', 'id' => 'place_order', 'value' => esc_attr($order_button_text), 'data-value' => esc_attr($order_button_text))));
if (wc_get_page_id('terms') > 0 && apply_filters('woocommerce_checkout_show_terms', true)) {
    echo beans_open_markup('woo_checkout_order_terms', 'p', array('class' => 'form-row terms'));
    echo beans_open_markup('woo_checkout_order_terms_label', 'label', array('for' => 'terms', 'class' => 'checkbox'));
    printf(__('I&rsquo;ve read and accept the ' . beans_open_markup('woo_checkout_terms_link', 'a', array('href' => '%s', 'target' => '_blank')) . 'terms &amp; conditions', 'woocommerce') . beans_close_markup('woo_checkout_terms_link', 'a'), esc_url(wc_get_page_permalink('terms')));
    echo beans_close_markup('woo_checkout_order_terms_label', 'label');
    echo beans_selfclose_markup('woo_checkout_order_terms_input', 'input', array('type' => 'checkbox', 'class' => 'input-checkbox', 'name' => 'terms', 'checked' => checked(apply_filters('woocommerce_terms_is_checked_default', isset($_POST['terms'])), true), 'id' => 'terms'));
    echo beans_close_markup('woo_checkout_order_terms', 'p');
}
do_action('woocommerce_review_order_after_submit');
echo beans_close_markup('woo_checkout_place_order_wrap', 'div');
echo beans_close_markup('woo_checkout_payment_method_wrap', 'div');
if (!is_ajax()) {
    do_action('woocommerce_review_order_after_payment');
}
Example #25
0
<?php

/**
 * Echo the structural markup for each comment. It also calls the comment action hooks.
 *
 * @package Beans\Structure\Comment
 */
echo beans_open_markup('beans_comment', 'article', array('id' => 'div-comment-' . get_comment_ID(), 'class' => 'uk-comment'));
echo beans_open_markup('beans_comment_header', 'header', array('class' => 'uk-comment-header'));
/**
 * Fires in the comment header.
 *
 * @since 1.0.0
 */
do_action('beans_comment_header');
echo beans_close_markup('beans_comment_header', 'header');
echo beans_open_markup('beans_comment_body', 'div', array('class' => 'uk-comment-body'));
/**
 * Fires in the comment body.
 *
 * @since 1.0.0
 */
do_action('beans_comment_content');
echo beans_close_markup('beans_comment_body', 'div');
echo beans_close_markup('beans_comment', 'article');
Example #26
0
 */
echo beans_output('beans_doctype', '<!DOCTYPE html>');
echo beans_open_markup('beans_html', 'html', str_replace(' ', '&', str_replace('"', '', beans_render_function('language_attributes'))));
echo beans_open_markup('beans_head', 'head');
/**
 * Fires in the head.
 *
 * This hook fires in the head HTML section, not in wp_header().
 *
 * @since 1.0.0
 */
do_action('beans_head');
// Keep if for plugins.
wp_head();
echo beans_close_markup('beans_head', 'head');
echo beans_open_markup('beans_body', 'body', array('class' => implode(' ', get_body_class('uk-form no-js'))));
echo beans_open_markup('beans_site', 'div', array('class' => 'tm-site'));
echo beans_open_markup('beans_header', 'header', array('class' => 'tm-header uk-block', 'role' => 'banner'));
echo beans_open_markup('beans_fixed_wrap[_header]', 'div', 'class=uk-container uk-container-center');
/**
 * Fires in the header.
 *
 * @since 1.0.0
 */
do_action('beans_header');
echo beans_close_markup('beans_fixed_wrap[_header]', 'div');
echo beans_close_markup('beans_header', 'header');
echo beans_open_markup('beans_main', 'main', array('class' => 'tm-main uk-block'));
echo beans_open_markup('beans_fixed_wrap[_main]', 'div', 'class=uk-container uk-container-center');
echo beans_open_markup('beans_main_grid', 'div', array('class' => 'uk-grid', 'data-uk-grid-margin' => ''));
echo beans_open_markup('beans_primary', 'div', array('class' => 'tm-primary ' . beans_get_layout_class('content')));
/**
 * Single Product Meta
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     1.6.4
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $post, $product;
$cat_count = sizeof(get_the_terms($post->ID, 'product_cat'));
$tag_count = sizeof(get_the_terms($post->ID, 'product_tag'));
echo beans_open_markup('woo_single_meta_wrap', 'div', array('class' => 'product_meta'));
do_action('woocommerce_product_meta_start');
if (wc_product_sku_enabled() && ($product->get_sku() || $product->is_type('variable'))) {
    echo beans_open_markup('woo_single_meta_sku_wrap', 'span', array('class' => 'sku_wrapper'));
    _e('SKU: ', 'woocommerce');
    echo beans_open_markup('woo_single_meta_sku', 'span', array('class' => 'sku', 'itemprop' => 'sku'));
    echo ($sku = $product->get_sku()) ? $sku : __('N/A', 'woocommerce') . ' ';
    echo beans_close_markup('woo_single_meta_sku', 'span');
    echo beans_close_markup('woo_single_meta_sku_wrap', 'span');
}
echo $product->get_categories(', ', beans_open_markup('woo_single_meta_category', 'span', array('class' => 'posted_in')) . _n('Category:', 'Categories:', $cat_count, 'woocommerce') . ' ', beans_close_markup('woo_single_meta_category', 'span'));
echo ' ';
echo $product->get_tags(', ', beans_open_markup('woo_single_meta_tags', 'span', array('class' => 'tagged_as')) . _n('Tag:', 'Tags:', $tag_count, 'woocommerce') . ' ', beans_close_markup('woo_single_meta_tags', 'span'));
do_action('woocommerce_product_meta_end');
echo beans_close_markup('woo_single_meta_wrap', 'div');
Example #28
0
/**
 * Echo comment fields closing wraps.
 *
 * This function must be attached to the WordPress 'comment_form_after_fields' action which is only called if
 * the user is not logged in.
 *
 * @since 1.0.0
 */
function beans_comment_form_after_fields()
{
    echo beans_close_markup('beans_comment_fields_inner_wrap', 'div');
    echo beans_close_markup('beans_comment_fields_wrap', 'div');
}
<?php

/**
 * Single Product Sale Flash
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     1.6.4
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $post, $product;
if ($product->is_on_sale()) {
    echo apply_filters('woocommerce_sale_flash', beans_open_markup('woo_sale_flash_badge', 'span', array('class' => 'onsale')) . __('Sale!', 'woocommerce') . beans_close_markup('woo_sale_flash_badge', 'span'), $post, $product);
}
    $order_status_text .= ' ' . __('and was completed', 'woocommerce') . ' ' . human_time_diff(strtotime($order->completed_date), current_time('timestamp')) . __(' ago', 'woocommerce');
}
$order_status_text .= '.';
echo wpautop(esc_attr(apply_filters('woocommerce_order_tracking_status', $order_status_text, $order)));
$notes = $order->get_customer_order_notes();
if ($notes) {
    echo beans_open_markup('woo_order_tracking_title', 'h2');
    _e('Order Updates', 'woocommerce');
    echo beans_close_markup('woo_order_tracking_title', 'h2');
    echo beans_open_markup('woo_order_tracking_list', 'ol', array('class' => 'commentlist notes'));
    foreach ($notes as $note) {
        echo beans_open_markup('woo_order_tracking_list_item', 'li', array('class' => 'comment note'));
        echo beans_open_markup('woo_order_tracking_comment_container', 'div', array('class' => 'comment_container'));
        echo beans_open_markup('woo_order_tracking_comment_text', 'div', array('class' => 'comment-text'));
        echo beans_open_markup('woo_order_tracking_comment_meta', 'p', array('class' => 'meta'));
        echo date_i18n(__('l jS \\o\\f F Y, h:ia', 'woocommerce'), strtotime($note->comment_date));
        echo beans_close_markup('woo_order_tracking_comment_meta', 'p');
        echo beans_open_markup('woo_order_tracking_comment_description', 'div', array('class' => 'description'));
        echo wpautop(wptexturize(wp_kses_post($note->comment_content)));
        echo beans_close_markup('woo_order_tracking_comment_description', 'div');
        echo beans_open_markup('woo_order_tracking_clear', 'div', array('class' => 'clear'));
        echo beans_close_markup('woo_order_tracking_clear', 'div');
        echo beans_open_markup('woo_order_tracking_comment_text', 'div', array('class' => 'comment-text'));
        echo beans_open_markup('woo_order_tracking_clear', 'div', array('class' => 'clear'));
        echo beans_close_markup('woo_order_tracking_clear', 'div');
        echo beans_open_markup('woo_order_tracking_comment_container', 'div', array('class' => 'comment_container'));
        echo beans_open_markup('woo_order_tracking_comment_list_item', 'li', array('class' => 'comment note'));
    }
    echo beans_close_markup('woo_order_tracking_comment_list', 'ol');
}
do_action('woocommerce_view_order', $order->id);