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


PHP wpgrade::lang_page_id方法代码示例

本文整理汇总了PHP中wpgrade::lang_page_id方法的典型用法代码示例。如果您正苦于以下问题:PHP wpgrade::lang_page_id方法的具体用法?PHP wpgrade::lang_page_id怎么用?PHP wpgrade::lang_page_id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wpgrade的用法示例。


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

示例1: rosa_post_classes

function rosa_post_classes($classes)
{
    //only add this class for regular pages
    if (get_page_template_slug(get_the_ID()) == '') {
        $subtitle = trim(get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_cover_subtitle', true));
        $title = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_cover_title', true);
        $description = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_cover_description', true);
        if (!(has_post_thumbnail() || !empty($subtitle) || $title !== ' ' || !empty($description))) {
            $classes[] = 'no-page-header';
        }
    }
    return $classes;
}
开发者ID:qhuit,项目名称:Tournesol,代码行数:13,代码来源:unsorted.php

示例2: get_post

            $post = get_post($shop_page_id);
            setup_postdata($post);
            $make_transparent_menu_bar = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'header_transparent_menu_bar', true);
            if ($make_transparent_menu_bar == 'on') {
                $class_name .= '  header--transparent';
            }
        }
    }
}
//make the header menu bar transparent
//only for static pages
if (is_page()) {
    if (get_page_template_slug(get_the_ID()) == 'page-templates/contact.php') {
        $make_transparent_menu_bar = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'header_transparent_menu_bar_contact', true);
    } else {
        $make_transparent_menu_bar = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'header_transparent_menu_bar', true);
    }
    if ($make_transparent_menu_bar == 'on') {
        $class_name .= '  header--transparent';
    }
}
$schema_org = '';
if (is_single()) {
    $schema_org .= 'itemscope itemtype="http://schema.org/Article"';
} else {
    $schema_org .= 'itemscope itemtype="http://schema.org/WebPage"';
}
?>

<body <?php 
body_class($class_name);
开发者ID:andreilupu,项目名称:jassyro-rosa-child-theme,代码行数:31,代码来源:header.php

示例3: get_post_meta

    if (empty($pin_type)) {
        $pin_type = 'single';
    }
} else {
    $pin_type = '';
}
/*  for PRO users! -  FIRST TEST FOR CONTACT PAGE TEMPLATE */
if ($pin_type == 'single') {
    //get the Google Maps URL to test if empty
    $gmap_url = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'gmap_url', true);
    if (!empty($gmap_url)) {
        //set the global so everybody knows that we are in dire need of the Google Maps API
        $is_gmap = true;
        $gmap_custom_style = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'gmap_custom_style', true);
        $gmap_marker_content = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'gmap_marker_content', true);
        $gmap_height = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_gmap_height', true);
        if (empty($gmap_height)) {
            $gmap_height = 'half-height';
            //the default
        }
        // remove classes coming from default template's header height option
        $classes = str_replace(array('half-height', 'two-thirds-height', 'full-height'), '', $classes);
        $classes .= ' ' . $gmap_height;
        ?>
		<header id="post-<?php 
        the_ID();
        ?>
-title" class="<?php 
        echo esc_attr($classes);
        ?>
">
开发者ID:qhuit,项目名称:Tournesol,代码行数:31,代码来源:header.php

示例4: get_post_meta

if (get_page_template_slug(get_the_ID()) == 'page-templates/contact.php') {
    if (empty($pin_type)) {
        $pin_type = 'single';
    }
} else {
    $pin_type = '';
}
/* FIRST TEST FOR CONTACT PAGE TEMPLATE */
if ($pin_type == 'single') {
    //get the Google Maps URL to test if empty
    $gmap_url = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'gmap_url', true);
    if (!empty($gmap_url)) {
        //set the global so everybody knows that we are in dire need of the Google Maps API
        $is_gmap = true;
        $gmap_custom_style = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'gmap_custom_style', true);
        $gmap_marker_content = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'gmap_marker_content', true);
        $classes .= ' ' . $gmap_height;
        ?>
		<header id="post-<?php 
        the_ID();
        ?>
-title" class="article__header  article__header--page two-thirds-height">
			<div id="gmap-<?php 
        the_ID();
        ?>
" class="gmap"
				data-url="<?php 
        esc_attr_e($gmap_url);
        ?>
" <?php 
        echo $gmap_custom_style == 'on' ? 'data-customstyle' : '';
开发者ID:andreilupu,项目名称:jassyro-rosa-child-theme,代码行数:31,代码来源:header.php

示例5: get_header

 * Description: This is the template that is used for pages that have a header section with a slideshow instead of a featured image
 * It is a page with additional controls for the slideshow
 */
global $post;
//some global variables that we use in our page sections
$is_gmap = false;
$footer_needs_big_waves = false;
$page_section_idx = 0;
get_header();
while (have_posts()) {
    the_post();
    ?>
	<?php 
    get_template_part('templates/page/header');
    $classes = "article--page  article--main";
    $border_style = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_border_style', true);
    if (!empty($border_style)) {
        $classes .= ' border-' . $border_style;
    }
    if (!empty($post->post_content)) {
        ?>
		<article id="post-<?php 
        the_ID();
        ?>
" <?php 
        post_class($classes);
        ?>
>

			<section class="article__content">
				<div class="container">
开发者ID:qhuit,项目名称:Tournesol,代码行数:31,代码来源:slideshow.php


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