本文整理汇总了PHP中x_is_portfolio_item函数的典型用法代码示例。如果您正苦于以下问题:PHP x_is_portfolio_item函数的具体用法?PHP x_is_portfolio_item怎么用?PHP x_is_portfolio_item使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了x_is_portfolio_item函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: x_get_content_layout
function x_get_content_layout()
{
$content_layout = x_get_option('x_layout_content', 'content-sidebar');
if ($content_layout != 'full-width') {
if (is_home()) {
$opt = x_get_option('x_blog_layout', 'sidebar');
$layout = $opt == 'sidebar' ? $content_layout : $opt;
} elseif (is_singular('post')) {
$meta = get_post_meta(get_the_ID(), '_x_post_layout', true);
$layout = $meta == 'on' ? 'full-width' : $content_layout;
} elseif (x_is_portfolio_item()) {
$layout = 'full-width';
} elseif (x_is_portfolio()) {
$meta = get_post_meta(get_the_ID(), '_x_portfolio_layout', true);
$layout = $meta == 'sidebar' ? $content_layout : $meta;
} elseif (is_page_template('template-layout-content-sidebar.php')) {
$layout = 'content-sidebar';
} elseif (is_page_template('template-layout-sidebar-content.php')) {
$layout = 'sidebar-content';
} elseif (is_page_template('template-layout-full-width.php')) {
$layout = 'full-width';
} elseif (is_archive()) {
if (x_is_shop() || x_is_product_category() || x_is_product_tag()) {
$opt = x_get_option('x_woocommerce_shop_layout_content', 'sidebar');
$layout = $opt == 'sidebar' ? $content_layout : $opt;
} else {
$opt = x_get_option('x_archive_layout', 'sidebar');
$layout = $opt == 'sidebar' ? $content_layout : $opt;
}
} elseif (x_is_product()) {
$layout = 'full-width';
} elseif (x_is_bbpress()) {
$opt = x_get_option('x_bbpress_layout_content', 'sidebar');
$layout = $opt == 'sidebar' ? $content_layout : $opt;
} elseif (x_is_buddypress()) {
$opt = x_get_option('x_buddypress_layout_content', 'sidebar');
$layout = $opt == 'sidebar' ? $content_layout : $opt;
} elseif (is_404()) {
$layout = 'full-width';
} else {
$layout = $content_layout;
}
} else {
$layout = $content_layout;
}
return $layout;
}
示例2: x_get_content_layout
function x_get_content_layout()
{
$stack = x_get_stack();
$mod = get_theme_mod('x_' . $stack . '_layout_content');
$content_layout = $mod == '' ? 'content-sidebar' : $mod;
if ($content_layout != 'full-width') {
if (is_home()) {
$mod = get_theme_mod('x_blog_layout');
$layout = $mod == 'sidebar' ? $content_layout : $mod;
} elseif (is_singular('post')) {
$meta = get_post_meta(get_the_ID(), '_x_post_layout', true);
$layout = $meta == 'on' ? 'full-width' : $content_layout;
} elseif (x_is_portfolio_item()) {
$layout = 'full-width';
} elseif (x_is_product()) {
$layout = 'full-width';
} elseif (x_is_portfolio()) {
$meta = get_post_meta(get_the_ID(), '_x_portfolio_layout', true);
$layout = $meta == 'sidebar' ? $content_layout : $meta;
} elseif (is_page_template('template-layout-content-sidebar.php')) {
$layout = 'content-sidebar';
} elseif (is_page_template('template-layout-sidebar-content.php')) {
$layout = 'sidebar-content';
} elseif (is_page_template('template-layout-full-width.php')) {
$layout = 'full-width';
} elseif (is_archive()) {
if (x_is_shop()) {
$mod = get_theme_mod('x_woocommerce_shop_layout_content');
$layout = $mod == 'sidebar' ? $content_layout : $mod;
} else {
$mod = get_theme_mod('x_archive_layout');
$layout = $mod == 'sidebar' ? $content_layout : $mod;
}
} elseif (x_is_product()) {
$layout = 'full-width';
} elseif (is_404()) {
$layout = 'full-width';
} else {
$layout = $content_layout;
}
} else {
$layout = $content_layout;
}
return $layout;
}
示例3: the_ID
<article id="post-<?php
the_ID();
?>
" <?php
post_class();
?>
>
<div class="entry-featured">
<?php
x_portfolio_item_featured_content();
?>
</div>
<div class="entry-wrap cf">
<?php
if (x_is_portfolio_item()) {
?>
<div class="entry-info">
<header class="entry-header">
<h1 class="entry-title entry-title-portfolio"><?php
the_title();
?>
</h1>
<?php
x_integrity_entry_meta();
?>
</header>
<?php
x_get_view('global', '_content', 'the-content');
?>
示例4: x_breadcrumbs
<?php
if (!is_front_page()) {
?>
<?php
if (x_get_option('x_breadcrumb_display') == '1') {
?>
<div class="x-breadcrumb-wrap">
<div class="x-container max width">
<?php
x_breadcrumbs();
?>
<?php
if (is_single() || x_is_portfolio_item()) {
?>
<?php
x_entry_navigation();
?>
<?php
}
?>
</div>
</div>
<?php
}
}
示例5: x_breadcrumbs
function x_breadcrumbs()
{
if (x_get_option('x_breadcrumb_display')) {
global $post;
$is_ltr = !is_rtl();
$stack = x_get_stack();
$delimiter = x_get_breadcrumb_delimiter();
$home_text = x_get_breadcrumb_home_text();
$home_link = home_url();
$current_before = x_get_breadcrumb_current_before();
$current_after = x_get_breadcrumb_current_after();
$page_title = get_the_title();
$blog_title = get_the_title(get_option('page_for_posts', true));
if (!is_404()) {
$post_parent = $post->post_parent;
} else {
$post_parent = '';
}
if (X_WOOCOMMERCE_IS_ACTIVE) {
$shop_url = x_get_shop_link();
$shop_title = x_get_option('x_' . $stack . '_shop_title');
$shop_link = '<a href="' . $shop_url . '">' . $shop_title . '</a>';
}
echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter;
if (is_home()) {
echo $current_before . $blog_title . $current_after;
} elseif (is_category()) {
$the_cat = get_category(get_query_var('cat'), false);
if ($the_cat->parent != 0) {
echo get_category_parents($the_cat->parent, TRUE, $delimiter);
}
echo $current_before . single_cat_title('', false) . $current_after;
} elseif (x_is_product_category()) {
if ($is_ltr) {
echo $shop_link . $delimiter . $current_before . single_cat_title('', false) . $current_after;
} else {
echo $current_before . single_cat_title('', false) . $current_after . $delimiter . $shop_link;
}
} elseif (x_is_product_tag()) {
if ($is_ltr) {
echo $shop_link . $delimiter . $current_before . single_tag_title('', false) . $current_after;
} else {
echo $current_before . single_tag_title('', false) . $current_after . $delimiter . $shop_link;
}
} elseif (is_search()) {
echo $current_before . __('Search Results for ', '__x__') . '“' . get_search_query() . '”' . $current_after;
} elseif (is_singular('post')) {
if (get_option('page_for_posts') == is_front_page()) {
echo $current_before . $page_title . $current_after;
} else {
if ($is_ltr) {
echo '<a href="' . get_permalink(get_option('page_for_posts')) . '">' . $blog_title . '</a>' . $delimiter . $current_before . $page_title . $current_after;
} else {
echo $current_before . $page_title . $current_after . $delimiter . '<a href="' . get_permalink(get_option('page_for_posts')) . '">' . $blog_title . '</a>';
}
}
} elseif (x_is_portfolio()) {
echo $current_before . get_the_title() . $current_after;
} elseif (x_is_portfolio_item()) {
$link = x_get_parent_portfolio_link();
$title = x_get_parent_portfolio_title();
if ($is_ltr) {
echo '<a href="' . $link . '">' . $title . '</a>' . $delimiter . $current_before . $page_title . $current_after;
} else {
echo $current_before . $page_title . $current_after . $delimiter . '<a href="' . $link . '">' . $title . '</a>';
}
} elseif (x_is_product()) {
if ($is_ltr) {
echo $shop_link . $delimiter . $current_before . $page_title . $current_after;
} else {
echo $current_before . $page_title . $current_after . $delimiter . $shop_link;
}
} elseif (x_is_buddypress()) {
if (bp_is_group()) {
echo '<a href="' . bp_get_groups_directory_permalink() . '">' . x_get_option('x_buddypress_groups_title') . '</a>' . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after;
} elseif (bp_is_user()) {
echo '<a href="' . bp_get_members_directory_permalink() . '">' . x_get_option('x_buddypress_members_title') . '</a>' . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after;
} else {
echo $current_before . x_buddypress_get_the_title() . $current_after;
}
} elseif (x_is_bbpress()) {
remove_filter('bbp_no_breadcrumb', '__return_true');
if (bbp_is_forum_archive()) {
echo $current_before . bbp_get_forum_archive_title() . $current_after;
} else {
echo bbp_get_breadcrumb();
}
add_filter('bbp_no_breadcrumb', '__return_true');
} elseif (is_page() && !$post_parent) {
echo $current_before . $page_title . $current_after;
} elseif (is_page() && $post_parent) {
$parent_id = $post_parent;
$breadcrumbs = array();
if (is_rtl()) {
echo $current_before . $page_title . $current_after . $delimiter;
}
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
$parent_id = $page->post_parent;
//.........这里部分代码省略.........
示例6: x_breadcrumbs
function x_breadcrumbs()
{
if (get_theme_mod('x_breadcrumb_display')) {
global $post;
$is_ltr = !is_rtl();
$stack = x_get_stack();
$delimiter = ' <span class="delimiter"><i class="x-icon-angle-' . ($is_ltr ? 'right' : 'left') . '"></i></span> ';
$home_text = '<span class="home"><i class="x-icon-home"></i></span>';
$home_link = home_url();
$current_before = '<span class="current">';
$current_after = '</span>';
$page_title = get_the_title();
$blog_title = get_the_title(get_option('page_for_posts', true));
$post_parent = $post->post_parent;
if (function_exists('woocommerce_get_page_id')) {
$shop_url = x_get_shop_link();
$shop_title = get_theme_mod('x_' . $stack . '_shop_title');
$shop_link = '<a href="' . $shop_url . '">' . $shop_title . '</a>';
}
echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter;
if (is_home()) {
echo $current_before . $blog_title . $current_after;
} elseif (is_category()) {
$the_cat = get_category(get_query_var('cat'), false);
if ($the_cat->parent != 0) {
echo get_category_parents($the_cat->parent, TRUE, $delimiter);
}
echo $current_before . single_cat_title('', false) . $current_after;
} elseif (x_is_product_category()) {
if ($is_ltr) {
echo $shop_link . $delimiter . $current_before . single_cat_title('', false) . $current_after;
} else {
echo $current_before . single_cat_title('', false) . $current_after . $delimiter . $shop_link;
}
} elseif (x_is_product_tag()) {
if ($is_ltr) {
echo $shop_link . $delimiter . $current_before . single_tag_title('', false) . $current_after;
} else {
echo $current_before . single_tag_title('', false) . $current_after . $delimiter . $shop_link;
}
} elseif (is_search()) {
echo $current_before . __('Search Results for ', '__x__') . '“' . get_search_query() . '”' . $current_after;
} elseif (is_singular('post')) {
if (get_option('page_for_posts') == is_front_page()) {
echo $current_before . $page_title . $current_after;
} else {
if ($is_ltr) {
echo '<a href="' . get_permalink(get_option('page_for_posts')) . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $blog_title . '</a>' . $delimiter . $current_before . $page_title . $current_after;
} else {
echo $current_before . $page_title . $current_after . $delimiter . '<a href="' . get_permalink(get_option('page_for_posts')) . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $blog_title . '</a>';
}
}
} elseif (x_is_portfolio()) {
echo $current_before . get_the_title() . $current_after;
} elseif (x_is_portfolio_item()) {
$link = x_get_parent_portfolio_link();
$title = x_get_parent_portfolio_title();
if ($is_ltr) {
echo '<a href="' . $link . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $title . '</a>' . $delimiter . $current_before . $page_title . $current_after;
} else {
echo $current_before . $page_title . $current_after . $delimiter . '<a href="' . $link . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $title . '</a>';
}
} elseif (x_is_product()) {
if ($is_ltr) {
echo $shop_link . $delimiter . $current_before . $page_title . $current_after;
} else {
echo $current_before . $page_title . $current_after . $delimiter . $shop_link;
}
} elseif (is_page() && !$post_parent) {
echo $current_before . $page_title . $current_after;
} elseif (is_page() && $post_parent) {
$parent_id = $post_parent;
$breadcrumbs = array();
if (is_rtl()) {
echo $current_before . $page_title . $current_after . $delimiter;
}
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
$parent_id = $page->post_parent;
}
if ($is_ltr) {
$breadcrumbs = array_reverse($breadcrumbs);
}
for ($i = 0; $i < count($breadcrumbs); $i++) {
echo $breadcrumbs[$i];
if ($i != count($breadcrumbs) - 1) {
echo $delimiter;
}
}
if ($is_ltr) {
echo $delimiter . $current_before . $page_title . $current_after;
}
} elseif (is_tag()) {
echo $current_before . single_tag_title('', false) . $current_after;
} elseif (is_author()) {
global $author;
$userdata = get_userdata($author);
echo $current_before . __('Posts by ', '__x__') . '“' . $userdata->display_name . $current_after . '”';
} elseif (is_404()) {
//.........这里部分代码省略.........
示例7: x_ethos_entry_top_navigation
function x_ethos_entry_top_navigation()
{
if (x_is_portfolio_item()) {
$link = x_get_parent_portfolio_link();
} elseif (x_is_product()) {
$link = x_get_shop_link();
}
$title = esc_attr(__('See All Posts', '__x__'));
?>
<div class="entry-top-navigation">
<a href="<?php
echo $link;
?>
" class="entry-parent" title="<?php
$title;
?>
"><i class="x-icon-th"></i></a>
<?php
x_entry_navigation();
?>
</div>
<?php
}
示例8: x_breadcrumbs
/**
* breadcrumbs.
*
* @since 1.0.0
* @package GeoDirectory
*/
function x_breadcrumbs()
{
if (x_get_option('x_breadcrumb_display', '1')) {
//
// 1. Delimiter between crumbs.
// 2. Output text for the "Home" link.
// 3. Link to the home page.
// 4. Tag before the current crumb.
// 5. Tag after the current crumb.
// 6. Get page title.
// 7. Get blog title.
// 8. Get shop title.
//
global $post, $wp;
if (geodir_is_page('detail') || geodir_is_page('listing') || isset($wp->query_vars['page_id']) && $wp->query_vars['page_id'] == geodir_location_page_id()) {
geodir_breadcrumb();
} else {
$stack = x_get_stack();
$delimiter = ' <span class="delimiter"><i class="x-icon-angle-right"></i></span> ';
// 1
$home_text = '<span class="home"><i class="x-icon-home"></i></span>';
// 2
$home_link = home_url();
// 3
$current_before = '<span class="current">';
// 4
$current_after = '</span>';
// 5
$page_title = get_the_title();
// 6
$blog_title = get_the_title(get_option('page_for_posts', true));
// 7
$shop_title = get_theme_mod('x_' . $stack . '_shop_title');
// 8
if (function_exists('woocommerce_get_page_id')) {
$shop_url = x_get_shop_link();
$shop_link = '<a href="' . $shop_url . '">' . $shop_title . '</a>';
}
if (is_front_page()) {
echo '<div class="x-breadcrumbs">' . $current_before . $home_text . $current_after . '</div>';
} elseif (is_home()) {
echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter . $current_before . $blog_title . $current_after . '</div>';
} else {
echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter;
if (is_category()) {
$the_cat = get_category(get_query_var('cat'), false);
if ($the_cat->parent != 0) {
echo get_category_parents($the_cat->parent, TRUE, $delimiter);
}
echo $current_before . single_cat_title('', false) . $current_after;
} elseif (x_is_product_category()) {
echo $shop_link . $delimiter . $current_before . single_cat_title('', false) . $current_after;
} elseif (x_is_product_tag()) {
echo $shop_link . $delimiter . $current_before . single_tag_title('', false) . $current_after;
} elseif (is_search()) {
echo $current_before . __('Search Results for ', '__x__') . '“' . get_search_query() . '”' . $current_after;
} elseif (is_singular('post')) {
if (get_option('page_for_posts') == is_front_page()) {
echo $current_before . $page_title . $current_after;
} else {
echo '<a href="' . get_permalink(get_option('page_for_posts')) . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $blog_title . '</a>' . $delimiter . $current_before . $page_title . $current_after;
}
} elseif (x_is_portfolio()) {
echo $current_before . get_the_title() . $current_after;
} elseif (x_is_portfolio_item()) {
$link = x_get_parent_portfolio_link();
$title = x_get_parent_portfolio_title();
echo '<a href="' . $link . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $title . '</a>' . $delimiter . $current_before . $page_title . $current_after;
} elseif (x_is_product()) {
echo $shop_link . $delimiter . $current_before . $page_title . $current_after;
} elseif (is_page() && !$post->post_parent) {
echo $current_before . $page_title . $current_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="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
$parent_id = $page->post_parent;
}
$breadcrumbs = array_reverse($breadcrumbs);
for ($i = 0; $i < count($breadcrumbs); $i++) {
echo $breadcrumbs[$i];
if ($i != count($breadcrumbs) - 1) {
echo $delimiter;
}
}
echo $delimiter . $current_before . $page_title . $current_after;
} elseif (is_tag()) {
echo $current_before . single_tag_title('', false) . $current_after;
} elseif (is_author()) {
global $author;
$userdata = get_userdata($author);
echo $current_before . __('Posts by ', '__x__') . '“' . $userdata->display_name . $current_after . '”';
//.........这里部分代码省略.........