Ejemplo n.º 1
0
        // Title for testomonial archive
    } elseif (is_post_type_archive('testimonial')) {
        _e('Testimonials', 'checkout');
        // Title for download categories and tags
    } elseif (is_tax(array('download', 'download_category', 'download', 'download_tag'))) {
        single_term_title();
        // Title for vendor archive pages
    } elseif (get_query_var('vendor')) {
        $store_name = get_user_meta('name_of_store', $author->ID);
        if ($store_name) {
            echo $store_name;
        } else {
            echo fes_get_vendor()->display_name;
        }
        // Member since date
        printf(__('<p class="entry-subtitle">Member since %s</p>', 'checkout'), date("F Y", strtotime(fes_get_vendor()->user_registered)));
        // Title for customer dashboard
    } elseif (is_page_template('templates/template-customer-dashboard.php')) {
        if (is_user_logged_in()) {
            $current_user = wp_get_current_user();
            echo $current_user->display_name;
        } else {
            _e('Customer Login', 'checkout');
        }
    } else {
        single_post_title();
    }
    ?>
		</h2>

Ejemplo n.º 2
0
/**
 * Create the author contact form for vendors
 *
 * @since 1.0
 */
function checkout_fes_contact_form($author = '')
{
    // Get author data
    global $post;
    if (empty($author)) {
        if (function_exists('fes_get_vendor')) {
            $author = fes_get_vendor();
        } else {
            $author = get_user_by('slug', get_query_var('vendor'));
            if (!$author) {
                $author = get_current_user_id();
            }
        }
    }
    if (class_exists('EDD_Front_End_Submissions') && !empty($author)) {
        ?>
		<div class="download-aside">
			<?php 
        echo do_shortcode('[fes_vendor_contact_form id=" ' . absint($author->ID) . ' "]');
        ?>
		</div>
	<?php 
    }
}
Ejemplo n.º 3
0
<?php

/**
 * Template Name: Vendor
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package Marketify
 */
if (function_exists('fes_get_vendor')) {
    $author = fes_get_vendor();
} else {
    $author = get_query_var('vendor');
    $author = get_user_by('slug', $author);
    if (!$author) {
        $author = get_current_user_id();
    }
}
get_header();
?>

	<?php 
while (have_posts()) {
    the_post();
    ?>

	<header class="page-header">
		<h1 class="page-title"><?php 
    the_title();
    ?>
</h1>