当前位置: 首页>>代码示例>>PHP>>正文


PHP get_cupp_meta函数代码示例

本文整理汇总了PHP中get_cupp_meta函数的典型用法代码示例。如果您正苦于以下问题:PHP get_cupp_meta函数的具体用法?PHP get_cupp_meta怎么用?PHP get_cupp_meta使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_cupp_meta函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: while

if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
				<li>
				  <a href="<?php 
        echo get_permalink();
        ?>
" class="post-list-thumb-wrap">
                    <?php 
        $src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), array(5600, 1000), false, '');
        //Returns All Term Items for "my_taxonomy"
        $category = wp_get_post_terms($post->ID, 'article_cat', array("fields" => "names"));
        $countries = wp_get_post_terms($post->ID, 'article_country_cat', array("fields" => "names"));
        $authorID = get_the_author_meta($post->ID);
        $curator_profile = get_cupp_meta($authorID, 'thumbnail');
        $custom_image_link = get_post_meta($post->ID, '_custom_image_link', true);
        ?>
                    <div class="postimg" style="background: url(<?php 
        echo $custom_image_link != '' ? $custom_image_link : $src[0];
        ?>
)"></div>
	                </a>
	                <div class="labels">

                      	<?php 
        if ($countries) {
            ?>
                      		<?php 
            foreach ($countries as $country) {
                ?>
开发者ID:pwsclau,项目名称:kurastar_dev,代码行数:31,代码来源:page-home.php

示例2: cupp_avatar

function cupp_avatar($avatar, $id_or_email, $size, $default, $alt)
{
    $user = false;
    $id = false;
    if (is_numeric($id_or_email)) {
        $id = (int) $id_or_email;
        $user = get_user_by('id', $id);
    } elseif (is_object($id_or_email)) {
        if (!empty($id_or_email->user_id)) {
            $id = (int) $id_or_email->user_id;
            $user = get_user_by('id', $id);
        }
    } else {
        // $id = (int) $id_or_email;
        $user = get_user_by('email', $id_or_email);
    }
    if ($user && is_object($user)) {
        $custom_avatar = get_cupp_meta($id, 'thumbnail');
        if (isset($custom_avatar) && !empty($custom_avatar)) {
            $avatar = "<img alt='{$alt}' src='{$custom_avatar}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' />";
        }
    }
    return $avatar;
}
开发者ID:pwsclau,项目名称:kurastar_dev,代码行数:24,代码来源:3five_cupp.php

示例3: get_header

<?php

/*
Template Name: Order History
*/
get_header();
// Retrieve The Post's Author ID
$author_id = $GLOBALS['current_user']->ID;
// Set the image size. Accepts all registered images sizes and array(int, int)
$size = 'thumbnail';
// Get the image URL using the author ID and image size params
$imgURL = get_cupp_meta($author_id, $size);
$GLOBALS['bgimg'] = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail');
do_action('woocommerce_before_my_account');
?>
<div class="contentWeb">
			
			<div class="my-account-content" style="background-image:url(<?php 
echo $GLOBALS['bgimg'][0];
?>
);">
				<div class="wrapper wrap">
					<div class="bread">Home / My Account</div>
					<div class="dash">
						<div class="top">
							<?php 
get_template_part('content', 'menuresponsive-myaccount');
?>
							<h1>Order History</h1>
							<!-- <div class="search">
								<input type="text" placeholder="TITLE, DEPARTMENT, RECIPIENT">
开发者ID:sergioblanco86,项目名称:git-gitlab.com-kinivo-kinivo.com,代码行数:31,代码来源:order-history.php

示例4: get_users



            <!-- Tab panes -->
            <ul class="post-list-thumb curator-list-thumb">
              	<?php 
#$users = get_users( 'orderby=nicename&role=subscriber&post_per_page=2' );
$users = get_users('orderby=nicename&post_per_page=2');
// Start the Loop.
foreach ($users as $user) {
    $fb_user_access_token = get_user_meta($user->ID, 'fb_user_access_token', true);
    $fb_profile_picture = get_user_meta($user->ID, 'fb_profile_picture', true);
    if ($fb_user_access_token != '') {
        $profile = get_user_meta($user->ID, 'fb_profile_picture', true);
    } else {
        if (get_cupp_meta($user->ID, 'thumbnail')) {
            $profile = get_cupp_meta($user->ID, 'thumbnail');
        } else {
            $profile = get_template_directory_uri() . "/images/default-image.jpg";
        }
    }
    //	$curator_profile = get_cupp_meta($user->ID, 'thumbnail');
    $post_count = count_user_posts($user->ID, 'acme_article');
    ?>
                <li>
                  <a href="<?php 
    echo site_url();
    ?>
/curator-detail/?id=<?php 
    echo $user->ID;
    ?>
" class="post-list-thumb-wrap curator-list">
开发者ID:pwsclau,项目名称:kurastar_dev,代码行数:29,代码来源:page-curators.php

示例5: while

				<div class="wrapper wrap">
					<h1>Recent Post</h1>
					
					<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>

						<?php 
        // Retrieve The Post's Author ID
        $user_id = get_the_author_meta('ID');
        // Set the image size. Accepts all registered images sizes and array(int, int)
        $size = 'thumbnail';
        // Get the image URL using the author ID and image size params
        $imgURL = get_cupp_meta($user_id, $size);
        ?>

						<div class="blog-post-row">
							<div class="left">
								<span class="profile-picture" style="background-image: url('<?php 
        echo $imgURL;
        ?>
');"></span>
							</div>
							<div class="right">
								<h2>John Done</h2>
								<h1>LOREM IPSUM SOME TITLE HERE FOR THE POST</h1>
								<span class="date">April 24 - 2014</span>
								<p>Lorem ipsum dolor sit amet, usu alterum ceteros at. Nobis reprehendunt nam ei, an dico quot inciderint vim. Ut noster nusquam definitiones vim, his ne assueverit cotidieque. Eu aeterno vocibus vim, splendide forensibus constituam ea cum, ut perfecto molestiae sed. Usu postea mollis epicuri no, est ea perfecto patrioque, ex unum nostro vix..</p>
							</div>
开发者ID:sergioblanco86,项目名称:git-gitlab.com-kinivo-kinivo.com,代码行数:31,代码来源:blog.php

示例6: default_ajax_request

function default_ajax_request()
{
    global $wp_query;
    $params = array('post_type' => $_POST['post_type'], 'posts_per_page' => $_POST['posts_per_page'], 'paged' => $_POST['paged'], 'post_status' => $_POST['status'], 'orderby' => $_POST['orderby'], 'order' => $_POST['order']);
    $ctr = 0;
    $wp_query = new WP_Query($params);
    $html = "";
    if ($wp_query->have_posts()) {
        while ($wp_query->have_posts()) {
            $wp_query->the_post();
            $category = wp_get_post_terms($post->ID, 'article_cat', array("fields" => "names"));
            $countries = wp_get_post_terms($post->ID, 'article_country_cat', array("fields" => "names"));
            $authorID = get_the_author_meta($post->ID);
            $curator_profile = get_cupp_meta($authorID, 'thumbnail');
            $custom_image_link = get_post_meta($post->ID, '_custom_image_link', true);
            $html .= '<li>';
            $html .= '<a href="' . get_permalink() . '" class="post-list-thumb-wrap">';
            $html .= '<div class="postimg" style="background: url(' . getArticleImage($post->ID) . ')"></div>';
            $html .= '</a>';
            $html .= '<div class="labels">';
            if ($countries) {
                foreach ($countries as $country) {
                    $html .= '<a href="/search-results/?country=' . $country . '&category=select+category&post_type=post+type+curators-cat" class="countrylabel">';
                    $html .= '<i class="fa fa-map-marker"></i>';
                    $html .= $country;
                    $html .= '</a>';
                }
            }
            if ($category) {
                foreach ($category as $country) {
                    $html .= '<a href="/search-results/?country=select&category=' . $category . '+category&post_type=post+type+curators-cat" class="countrylabel">';
                    $html .= '<i class="fa fa-map-marker"></i>';
                    $html .= $category;
                    $html .= '</a>';
                }
            }
            $html .= '</div>';
            $html .= '</li>';
            $ctr++;
        }
    }
    echo json_encode(array('post' => $_POST, 'paged' => $_POST['paged'], 'post_status' => $_POST['status'], 'result' => $html, 'count' => $ctr, 'max' => $wp_query->max_num_pages));
    die;
}
开发者ID:pws-edz,项目名称:kurastar,代码行数:44,代码来源:functions.php

示例7: esc_url

<div class="author-info">
	<div class="author-avatar">
	<?php 
if (function_exists('get_cupp_meta')) {
    ?>
		<a href="<?php 
    echo esc_url(get_author_posts_url(get_the_author_meta('ID')));
    ?>
">
			<img src="<?php 
    echo get_cupp_meta(get_the_author_meta('ID'), 'thumbnail');
    ?>
" alt=""/>
		</a>
	<?php 
} else {
    ?>
		<a href="<?php 
    echo esc_url(get_author_posts_url(get_the_author_meta('ID')));
    ?>
">
			<?php 
    echo get_avatar(get_the_author_meta('ID'), apply_filters('wheels_author_bio_avatar_size', 120));
    ?>
		</a>
	<?php 
}
?>
	</div>
	<div class="author-description">
		<h2 class="author-title"><?php 
开发者ID:selinaross,项目名称:spring-ridge,代码行数:31,代码来源:author-bio.php

示例8: render

    public function render($atts, $content = null)
    {
        extract(shortcode_atts(array('user_id' => '', 'image_size' => 'thumbnail', 'el_class' => ''), $atts));
        // $content = wpb_js_remove_wpautop($content); // fix unclosed/unwanted paragraph tags in $content
        ob_start();
        $user = get_user_by('id', (int) $user_id);
        if (!$user) {
            return '';
        }
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'dntp-teacher ' . $el_class, $this->namespace, $atts);
        ?>

			<div class="<?php 
        echo $css_class;
        ?>
">
				<?php 
        if (function_exists('get_cupp_meta')) {
            ?>
					<a href="<?php 
            echo esc_url(get_author_posts_url($user->ID));
            ?>
">
						<img src="<?php 
            echo get_cupp_meta($user->ID, $image_size);
            ?>
" alt=""/>
					</a>
				<?php 
        } else {
            ?>
					<a href="<?php 
            echo esc_url(get_author_posts_url($user->ID));
            ?>
">
						<?php 
            echo get_avatar($user->ID, apply_filters('wheels_author_bio_avatar_size', 120));
            ?>
					</a>
				<?php 
        }
        ?>

			</div>

			<?php 
        echo $user->user_nicename;
        ?>
		<?php 
        $content = ob_get_clean();
        return $content;
    }
开发者ID:selinaross,项目名称:spring-ridge,代码行数:52,代码来源:courses-teachers.php


注:本文中的get_cupp_meta函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。