本文整理汇总了PHP中penguin_get_post_meta_key函数的典型用法代码示例。如果您正苦于以下问题:PHP penguin_get_post_meta_key函数的具体用法?PHP penguin_get_post_meta_key怎么用?PHP penguin_get_post_meta_key使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了penguin_get_post_meta_key函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: esc_url
<?php
/**
* Portfolio Widget Recent Style 2
*
* @since roen 1.0
*/
global $portfolio_recent_post_content;
$output = '';
$thumbnail_size = 'thumbnail';
$output .= '<div class="sidebar-portfolio-recent thumbs-style">';
if (has_post_thumbnail(get_the_ID())) {
$output .= '<aside class="post-thumbs"><a href="' . esc_url(get_permalink()) . '"><div class="post-img">
' . get_the_post_thumbnail(get_the_ID(), $thumbnail_size, array('alt' => get_the_title(), 'title' => '')) . '
<div class="post-tip">
<div class="center-link"><i class="' . roen_get_post_type_icon(penguin_get_post_meta_key('portfolio-type'), 'portfolio') . '"></i></div>
</div>
</div></a></aside>';
}
$output .= '<div class="post-content">
<a href="' . esc_url(get_permalink()) . '">' . get_the_title() . '</a>
<div class="portfolio-categories">' . penguin_get_custom_post_categories_links(penguin_get_custom_post_categories(get_the_ID(), 'portfolio-cats', false), '<span class="seperator">/</span>') . '</div>
</div>
</div>';
$portfolio_recent_post_content = $output;
?>
示例2: get_query_var
* @since roen 1.0
*/
global $term, $portfolio_default_page_id, $paged, $thumbnail_size, $page_columns;
// get the taxonomy slug
$slug = get_query_var('term');
// get the current taxonomy_id
$term = get_term_by('slug', $slug, 'portfolio-cats');
get_header();
// get page layout
$layout = roen_get_page_layout($portfolio_default_page_id);
$layout_class = roen_get_page_layout_class($portfolio_default_page_id);
$sidebar_name = penguin_get_post_meta_key('sidebar-type', $portfolio_default_page_id);
$page_columns = intval(penguin_get_post_meta_key('page-posts-cols', $portfolio_default_page_id));
$page_item_style = intval(penguin_get_post_meta_key('portfolio-show-style', $portfolio_default_page_id)) + 1;
$page_image_no_crop = penguin_get_post_meta_key('page-posts-img-no-crop', $portfolio_default_page_id);
$page_items_no_space = penguin_get_post_meta_key('page-posts-img-no-space', $portfolio_default_page_id);
$page_columns_class = roen_get_element_columns(intval($page_columns));
$thumbnail_size = roen_get_thumbnail_size(intval($page_columns), $page_image_no_crop);
?>
<div id="main" class="container">
<div class="row">
<section class="<?php
echo $layout == 1 ? 'col-md-12 col-sm-12' : 'roen-col col-lg-9 col-md-8 col-sm-8 roen-' . $layout_class;
?>
">
<div class="portfolio-main-area">
<section class="portfolio-container <?php
echo $page_items_no_space == 'on' ? 'portfolio-no-space' : 'row';
?>
portfolio-isotope">
示例3: penguin_get_custom_post_categories_links
<div class="post-meta" itemprop="genre"><?php
echo penguin_get_custom_post_categories_links(penguin_get_custom_post_categories(get_the_ID(), 'member-cats', false), '<span class="seperator">/</span>', 'member-cats');
?>
</div>
</header><!-- .entry-header -->
<div class="short-content">
<?php
echo do_shortcode(penguin_get_post_meta_key('member-shortdesc'));
?>
</div>
</div>
</div>
<div class="custom-right-side col-md-4 col-sm-4">
<?php
echo do_shortcode(penguin_get_post_meta_key('member-custom-right'));
?>
</div>
</div>
<?php
edit_post_link('<i class="fa fa-edit"></i>' . __('Edit', 'ROEN'), '', '');
?>
<div class="entry-content" itemprop="articleBody">
<?php
the_content();
?>
<?php
wp_link_pages();
示例4: roen_get_page_sticky_logo
/**
* Get page sticky logo
*
* @since roen 1.0
*/
function roen_get_page_sticky_logo()
{
if (is_page() || is_single() || is_home() || is_front_page()) {
if (is_home() && !is_front_page() && intval(get_option('page_for_posts')) > 0) {
$post_id = get_option('page_for_posts');
} else {
$post_id = get_the_ID();
}
$sticky_type = penguin_get_post_meta_key('page-sticky-type', $post_id, 0);
if (intval($sticky_type) != 0) {
if (penguin_get_options_key('logo-light-image') != "") {
?>
<img class="logo-light-default" src="<?php
echo esc_url(penguin_get_options_key('logo-light-image'));
?>
" width="<?php
echo penguin_get_options_key('logo-image-width');
?>
" height="<?php
echo penguin_get_options_key('logo-image-height');
?>
" alt="">
<?php
}
if (penguin_get_options_key('logo-light-retina-image') != "") {
?>
<img class="logo-light-retina" src="<?php
echo esc_url(penguin_get_options_key('logo-light-retina-image'));
?>
" width="<?php
echo penguin_get_options_key('logo-image-width');
?>
" height="<?php
echo penguin_get_options_key('logo-image-height');
?>
" alt="">
<?php
}
}
}
}
示例5: wp_get_attachment_image_src
<div class="portfolio-tip">
<?php
$full_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
?>
<div class="btns">
<a href="<?php
echo get_permalink();
?>
" class="portfolio-link"><i class="fa fa-file-text"></i></a>
<?php
if (penguin_get_post_meta_key('portfolio-link') != "") {
?>
<a href="<?php
echo penguin_get_post_meta_key('portfolio-link');
?>
" target="_blank" class="portfolio-link"><i class="fa fa-link"></i></a>
<?php
}
?>
<a href="<?php
echo esc_url($full_image[0]);
?>
" class="fancyBox portfolio-link"><i class="fa fa-search-plus"></i></a>
</div>
<div class="portfolio-content">
<?php
if (intval($page_columns) == 2) {
?>
示例6: get_the_post_thumbnail
if (has_post_thumbnail(get_the_ID())) {
echo get_the_post_thumbnail(get_the_ID(), $thumbnail_size, array('alt' => get_the_title(), 'title' => ''));
} else {
echo '<div class="no-gravatar"></div>';
}
?>
<div class="post-mask-content">
<div class="centered">
<?php
$socials = roen_get_social_list(get_the_ID(), 'social-', 'post-meta');
if ($socials != '') {
echo '<ul class="inline roen-social member-social">' . $socials . '</ul>';
}
?>
</div>
</div>
</div>
<h4 class="entry-title" itemprop="author"><a href="<?php
echo get_permalink(get_the_ID());
?>
" itemprop="url"><?php
echo penguin_get_post_meta_key('member-nickname', '', get_the_title());
?>
</a></h4>
<div class="post-meta" itemprop="genre"><?php
echo penguin_get_custom_post_categories_links(penguin_get_custom_post_categories(get_the_ID(), 'member-cats', false), '<span class="seperator">/</span>', 'member-cats');
?>
</div>
</article>
示例7: get_header
/**
* Single Post Content
*
* @since roen 1.0
*/
get_header();
// get page layout
$layout = roen_get_page_layout();
$layout_class = roen_get_page_layout_class();
$sidebar_name = penguin_get_post_meta_key('sidebar-type');
// get blog default sidebar
if ($sidebar_name == '' || $sidebar_name == "Global Sidebar") {
$blog_page_id = get_option('page_for_posts');
if (intval($blog_page_id) != 0) {
$sidebar_name = penguin_get_post_meta_key('sidebar-type', $blog_page_id);
}
}
?>
<div id="main" class="container">
<div class="row">
<section class="<?php
echo $layout == 1 ? 'col-md-12 col-sm-12' : 'roen-col col-lg-9 col-md-8 col-sm-8 roen-' . $layout_class;
?>
">
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
get_template_part('template/blog/single/content');
示例8: get_header
/**
* The Template for displaying all single products.
*
* Override this template by copying it to yourtheme/woocommerce/single-product.php
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
if (!defined('ABSPATH')) {
exit;
}
// Exit if accessed directly
get_header('shop');
$layout = penguin_get_post_meta_key('layout-type');
if (intval($layout) == 0 || $layout == "") {
$layout = 1;
} else {
$layout = roen_get_page_layout();
$layout_class = roen_get_page_layout_class();
}
?>
<?php
/**
* woocommerce_before_main_content hook
*
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
* @hooked woocommerce_breadcrumb - 20
*/
示例9: roen_custom_option_posts_per_page
function roen_custom_option_posts_per_page($value)
{
if (is_search()) {
if (penguin_get_options_key('search-show-num') != '') {
return intval(penguin_get_options_key('search-show-num'));
}
} else {
if (is_tax("portfolio-cats")) {
$portfolio_default_page_id = roen_get_default_portfolio_page();
if (intval($portfolio_default_page_id) > 0) {
$portfolio_per_page_numbers = penguin_get_post_meta_key('page-posts-num', $portfolio_default_page_id);
if ($portfolio_per_page_numbers != '') {
return intval($portfolio_per_page_numbers);
}
}
}
}
return $value;
}
示例10: _e
* Portfolio Single Page Related Items
*
* @since roen 1.0
*/
if (penguin_get_options_key('portfolio-related-enable') == "on") {
?>
<div class="post-related wide-background">
<div class="roen-title">
<h3><?php
_e('You may also like', 'roen');
?>
</h3>
<div class="line"></div>
</div>
<?php
$cat_slugs = penguin_get_custom_post_categories(get_the_ID(), 'portfolio-cats', true, ",", 'slug');
$related_style = intval(penguin_get_post_meta_key('related-items-style'));
$show_number = intval(penguin_get_options_key('portfolio-related-num'));
if ($related_style == 0) {
$related_style = intval(penguin_get_options_key('portfolio-related-style')) + 1;
}
if ($show_number == 0) {
$show_number = 4;
}
echo do_shortcode('[portfolio_scroll_list columns="4" number="' . esc_attr($show_number) . '" style="' . esc_attr($related_style) . '" type="related" cat__in="' . esc_attr($cat_slugs) . '" post__not_in="' . get_the_ID() . '"]');
?>
</div>
<?php
}
示例11: get_header
<?php
/**
* Template Name: Member Template
*
* @since roen 1.0
*/
global $thumbnail_size;
get_header();
// get page layout
$page_nums = penguin_get_post_meta_key('page-posts-num');
$page_item_style = intval(penguin_get_post_meta_key('member-show-style')) + 1;
$page_show_filter = penguin_get_post_meta_key('member-show-filter');
$page_cats = penguin_get_post_meta_key('page-member-cat-slugs');
$page_columns = intval(penguin_get_post_meta_key('page-posts-cols'));
$page_columns_class = roen_get_element_columns(intval($page_columns));
$thumbnail_size = 'roen-square-thumbs';
?>
<div id="main" class="container">
<div class="row">
<section class="col-md-12 col-sm-12">
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
?>
<div class="post-content">
<?php
the_content();
示例12: get_permalink
echo '<div class="no-gravatar"></div>';
}
?>
</div>
</a>
<h4 class="entry-title" itemprop="author"><a href="<?php
echo get_permalink(get_the_ID());
?>
" itemprop="url"><?php
echo penguin_get_post_meta_key('member-nickname', '', get_the_title());
?>
</a></h4>
<div class="post-meta" itemprop="genre"><?php
echo penguin_get_custom_post_categories_links(penguin_get_custom_post_categories(get_the_ID(), 'member-cats', false), '<span class="seperator">/</span>', 'member-cats');
?>
</div>
<?php
$socials = roen_get_social_list(get_the_ID(), 'social-', 'post-meta');
if ($socials != '') {
echo '<ul class="inline roen-social member-social">' . $socials . '</ul>';
}
?>
<div class="entry-summary" itemprop="articleSection">
<?php
echo do_shortcode(penguin_get_post_meta_key('member-shortdesc'));
?>
</div><!-- .entry-summary -->
</article>
示例13: penguin_get_post_meta_key
<?php
/**
* Portfolio Ajax Main Content
*
* @since roen 1.0
*/
global $paged, $thumbnail_size, $page_columns;
$page_nums = penguin_get_post_meta_key('page-posts-num');
$page_columns = penguin_get_post_meta_key('page-posts-cols');
$page_cats = penguin_get_post_meta_key('page-posts-cat-slugs');
$page_item_style = intval(penguin_get_post_meta_key('portfolio-show-style')) + 1;
$page_auto_load = penguin_get_post_meta_key('page-posts-ajax-auto');
$page_image_no_crop = penguin_get_post_meta_key('page-posts-img-no-crop');
$page_items_no_space = penguin_get_post_meta_key('page-posts-img-no-space');
$page_show_filter = penguin_get_post_meta_key('portfolio-show-filter');
$page_columns_class = roen_get_element_columns(intval($page_columns));
$thumbnail_size = roen_get_thumbnail_size(intval($page_columns), $page_image_no_crop);
if (isset($_GET['cat']) && $_GET['cat'] != '*') {
$page_cats = $_GET['cat'];
}
if ($paged == 0) {
$paged = 1;
}
$tax_query = array();
$query_slugs = array();
// category
if ($page_cats != "") {
$slugs = explode(",", $page_cats);
foreach ($slugs as $slug) {
$slug_details = explode(":", $slug);
示例14: get_header
*
* @since roen 1.0
*/
global $paged, $thumbnail_size, $page_columns, $layout;
get_header();
// get page layout
$layout = roen_get_page_layout();
$layout_class = roen_get_page_layout_class();
$page_nums = penguin_get_post_meta_key('page-posts-num');
$page_columns = intval(penguin_get_post_meta_key('page-posts-cols'));
$page_item_style = intval(penguin_get_post_meta_key('portfolio-show-style')) + 1;
$page_show_filter = penguin_get_post_meta_key('portfolio-show-filter');
$page_auto_load = penguin_get_post_meta_key('page-posts-ajax-auto');
$page_image_no_crop = penguin_get_post_meta_key('page-posts-img-no-crop');
$page_items_no_space = penguin_get_post_meta_key('page-posts-img-no-space');
$page_cats = penguin_get_post_meta_key('page-posts-cat-slugs');
$page_columns_class = roen_get_element_columns(intval($page_columns));
$thumbnail_size = roen_get_thumbnail_size(intval($page_columns), $page_image_no_crop);
?>
<div id="main" class="container">
<div class="row">
<section class="<?php
echo $layout == 1 ? 'col-md-12 col-sm-12' : 'roen-col col-lg-9 col-md-8 col-sm-8 roen-' . $layout_class;
?>
">
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
?>
示例15: get_header
<?php
/**
* Template Name: Blog Template
*
* @since roen 1.0
*/
global $blog_post_style;
get_header();
// get page layout
$layout = roen_get_page_layout();
$layout_class = roen_get_page_layout_class();
$per_page_num = penguin_get_post_meta_key('page-posts-num');
$page_cats = penguin_get_post_meta_key('page-posts-cats');
$sidebar_name = penguin_get_post_meta_key('sidebar-type');
$blog_post_style = penguin_get_post_meta_key('blog-post-show-style');
?>
<div id="main" class="container">
<div class="row">
<section class="<?php
echo $layout == 1 ? 'col-md-12 col-sm-12' : 'roen-col col-lg-9 col-md-8 col-sm-8 roen-' . $layout_class;
?>
">
<?php
if ($paged == 0) {
$paged = 1;
}
$args = array('post_type' => 'post', 'post_status' => 'publish', 'paged' => $paged, 'posts_per_page' => $per_page_num);
if ($page_cats != "") {
$args['category_name'] = $page_cats;