• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP perch_get函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: perch_content_check_preview

function perch_content_check_preview()
{
    if (!defined('PERCH_PREVIEW_ARG')) {
        define('PERCH_PREVIEW_ARG', 'preview');
    }
    if (perch_get(PERCH_PREVIEW_ARG)) {
        $contentID = 'all';
        $rev = false;
        $var = perch_get(PERCH_PREVIEW_ARG);
        if ($var != 'all' && $var != 'preview') {
            $rev = $var;
            if (strpos($rev, 'r')) {
                $parts = explode('r', $rev);
                $contentID = (int) $parts[0];
                $rev = (int) $parts[1];
            }
        }
        $Users = new PerchUsers();
        $CurrentUser = $Users->get_current_user();
        if (is_object($CurrentUser) && $CurrentUser->logged_in()) {
            $Content = PerchContent::fetch();
            $Content->set_preview($contentID, $rev);
        }
    }
}
开发者ID:jaredmedley,项目名称:Perch-Core-Files,代码行数:25,代码来源:runtime.php


示例2: perch_blog_categories

			    </div>
			</div>
			
			<nav class="sidebar">
			    <h2>Filter archive</h2>
			    <!--  By category listing -->
			    <?php 
perch_blog_categories(array('section' => perch_get('s')));
?>
			    <!--  By tag -->
			    <?php 
perch_blog_tags(array('section' => perch_get('s')));
?>
			    <!--  By year -->
			    <?php 
perch_blog_date_archive_years(array('section' => perch_get('s')));
?>
	    	</nav>
		</div>
		<footer class="layout-footer">
			<div class="wrapper">
				<ul class="social-links">
					<li class="twitter"><a href="#" rel="me">Twitter</a></li>
					<li class="facebook"><a href="#" rel="me">Facebook</a></li>
					<li class="flickr"><a href="#" rel="me">Flickr</a></li>
					<li class="linkedin"><a href="#" rel="me">LinkedIn</a></li>
					<li class="rss"><a href="#">RSS</a></li>
				</ul>
				<small>Copyright &copy; <?php 
echo date('Y');
?>
开发者ID:scottbrabazon,项目名称:scottbrabazon.com,代码行数:31,代码来源:section.php


示例3: perch_layout



<body class="events">
	
	<div class="flex-container">
				
		<?php 
perch_layout('page-header');
?>

		<div class="house empty-top">

			<div class="reed">
				
			<?php 
perch_events_custom(array('filter' => 'eventSlug', 'match' => 'eq', 'value' => perch_get('s'), 'template' => 'listing/event-detail.html'));
?>
	
			</div>
			
			<div class="side">
				<h3>Event Categories</h3>				
				<?php 
perch_events_categories(array('sort-order' => 'desc', 'template' => 'listing/events-categories.html'));
?>
			</div>

		</div>		
		

		<?php 
开发者ID:jimcurran,项目名称:bdmusichub,代码行数:29,代码来源:event-alt.php


示例4: perch_blog_post_categories

		                <?php 
perch_blog_post_categories(perch_get('s'));
?>
		            </div>
		            <div class="tags">
		                <?php 
perch_blog_post_tags(perch_get('s'));
?>
		            </div>
		        </div>
				<div class="addthis_sharing_toolbox"></div>
		    	<?php 
perch_blog_post_comments(perch_get('s'));
?>
		    	<?php 
perch_blog_post_comment_form(perch_get('s'));
?>
		    </div> 
			<div class="blog-post-recent">
				<h2>Recent Blogs...</h2>	
				<?php 
perch_blog_custom(array('sort' => 'postDateTime', 'sort-order' => 'RAND', 'template' => 'blog/post_in_homepage.html', 'count' => '4'));
?>
	
			</div>	
			<div class="footer">		
				<footer>
					<ul>
						<li>	
							<a href="https://uk.linkedin.com/in/scottbrabazon" target="blank">
								<img src="../images/linkedin.png">
开发者ID:scottbrabazon,项目名称:scottbrabazon.com,代码行数:31,代码来源:post.php


示例5: perch_pages_navigation

			<?php 
perch_pages_navigation(array('levels' => 1));
?>
		</nav>
	</header>
	
	<!--  change cols2-nav-right to cols2-nav-left if you want the sidebar on the left -->
	<div class="wrapper cols2-nav-right">
	
		<div class="primary-content">
			<?php 
if (perch_get('s')) {
    // Output the large images
    perch_gallery_album_images(perch_get('s'), array('template' => 'd_list_image.html'));
    // Output the small images used for navigation
    perch_gallery_album_images(perch_get('s'), array('template' => 'd_nav_image.html'));
}
?>
    	</div>
    	<nav class="sidebar">
	    	<h2>Albums</h2>
		    <ul class="glist albums">
		    	<?php 
perch_gallery_albums();
?>
		    </ul>
		</nav>
	</div>

	<footer class="layout-footer">
		<div class="wrapper">
开发者ID:AlexTebbutt,项目名称:tcs,代码行数:31,代码来源:album.php


示例6: PerchAPI

<?php

use DrewM\MailChimp\Webhook as MailChimpWebhook;
include __DIR__ . '/../../env_runtime.php';
$API = new PerchAPI(1.0, 'perch_mailchimp');
$Settings = $API->get('Settings');
$secret = $Settings->get('perch_mailchimp_secret')->val();
if ($secret != perch_get('secret')) {
    die('Unauthorised.');
}
$Subscribers = new PerchMailChimp_Subscribers($API);
MailChimpWebhook::subscribe('subscribe', function ($data) use($API, $Subscribers) {
    $Subscriber = $Subscribers->get_one_by('subscriberMailChimpID', $data['id']);
    if (!$Subscriber) {
        $Subscriber = $Subscribers->lookup_and_create($data);
    }
    if ($Subscriber) {
        $Subscriber->update_subscription($data['list_id'], 'subscribe');
    }
    $Lists = new PerchMailChimp_Lists($API);
    $Lists->import();
});
MailChimpWebhook::subscribe('unsubscribe', function ($data) use($API, $Subscribers) {
    $Subscriber = $Subscribers->get_one_by('subscriberMailChimpID', $data['id']);
    if ($Subscriber) {
        $Subscriber->update_subscription($data['list_id'], 'unsubscribed');
    }
    $Lists = new PerchMailChimp_Lists($API);
    $Lists->import();
});
MailChimpWebhook::subscribe('cleaned', function ($data) use($API, $Subscribers) {
开发者ID:jimcurran,项目名称:bdmusichub,代码行数:31,代码来源:index.php


示例7: ini_set

<?php

ini_set('display_errors', 1);
include '../admin/runtime.php';
if (perch_get('s')) {
    // Detail mode
    $page_details = perch_content_custom('Projects', array('template' => 'project.html', 'filter' => 'slug', 'match' => 'eq', 'value' => perch_get('s'), 'count' => 1, 'skip-template' => true));
    perch_layout('header', array('title' => $page_details[0]['title'], 'desc' => $page_details[0]['info']));
} else {
    perch_layout('header');
}
if (perch_get('s')) {
    // Detail mode
    perch_content_custom('Projects', array('template' => 'project.html', 'filter' => 'slug', 'match' => 'eq', 'value' => perch_get('s'), 'count' => 1));
} else {
    ?>

		<div class="wrapper">
			<div class="home-photography">
				<div class="head-photo" style="background-image: url(/images/work-banner.jpg);"></div>
				<div class="title-holder">
					<?php 
    perch_content('Page Title Banner');
    ?>
				</div>
			</div>
			<div class="portfolio portfolio-v2">
				<div class="container">
					<div class="filters">
						<ul id="filters">
							<li class="active" data-filter="*">All</li>
开发者ID:TodayIShould,项目名称:todayishould_website,代码行数:31,代码来源:index.php


示例8: perch_blog_post_meta

<!DOCTYPE html>
<html>
<head>
<?php 
if (perch_layout_has('blog-post')) {
    perch_blog_post_meta(perch_get('s'));
    echo PHP_EOL;
    echo '<meta name="description" content="';
    echo perch_blog_post_field(perch_get('s'), 'postTitle') . '" />';
} else {
    echo '<title>';
    echo perch_content('title-tag') . '</title>';
    echo '<meta name="description" content="';
    echo perch_content('meta-desc') . '" />';
}
?>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192"  href="/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
开发者ID:jimcurran,项目名称:bdmusichub,代码行数:31,代码来源:global-header.php


示例9: perch_blog_post

  </div>
</div>
<!-- /LOCATION -->
<!-- MAIN --> 
<div id="main" class="blog"> 
  <div class="top_main"></div> 
  <div class="middle_main"> 
	<!-- Main content --> 
	<!-- Fullwidth --> 
		  <div class="left_content_590"> 
			 <div class="post">
			<?php 
perch_blog_post($_GET['s']);
?>
			<?php 
perch_blog_post_tags(perch_get('s'));
?>
			</div>
			    <div id="disqus_thread"></div>
			    <script type="text/javascript">
			        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
			        var disqus_shortname = '4hair'; // required: replace example with your forum shortname

			        /* * * DON'T EDIT BELOW THIS LINE * * */
			        (function() {
			            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
			            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
			            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
			        })();
			    </script>
			    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
开发者ID:pete-naish,项目名称:4hair,代码行数:31,代码来源:post.php


示例10: root_locator_get_custom

                            locations.forEach(function(address) {
                                var marker = new google.maps.Marker({
                                    position: new google.maps.LatLng(address.addressLatitude, address.addressLongitude),
                                    map: map,
                                    title: address.locationTitle
                                });

                                bounds.extend(marker.getPosition());
                            });
                        }

                        // Zoom to map to fit the markers on display
                        map.fitBounds(bounds);
                    }
                </script>

                <!-- This is *not* the key you use in the Perch settings area. You will need a Browser key -->
                <script src="https://maps.googleapis.com/maps/api/js?callback=initMap&key=XXXXXXXXXX" async defer></script>

                <?php 
    root_locator_get_custom(array('address' => perch_get('address'), 'range' => 50));
    ?>
            <?php 
}
?>
        </div>
    </body>
</html>

<?php 
PerchUtil::output_debug();
开发者ID:RootStudio,项目名称:Perch-Locator,代码行数:31,代码来源:index.php


示例11: intval

    $title_date_format = '%Y';
    // Month and Year?
    if (perch_get('month')) {
        $month = intval(perch_get('month'));
        $date_from = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-01 00:00:00';
        $date_to = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-31 23:59:59';
        $title_date_format = '%B, %Y';
    }
    echo '<h2 class="page-title">Archive of: ' . strftime($title_date_format, strtotime($date_from)) . '</h2>';
    perch_blog_custom(array('filter' => 'postDateTime', 'match' => 'eqbetween', 'value' => $date_from . ',' . $date_to, 'template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order, 'paginate' => true, 'page-links' => true, 'page-link-style' => 'all'));
    $posts_displayed = true;
}
/* --------------------------- POSTS BY AUTHOR --------------------------- */
if (perch_get('author')) {
    echo '<h2 class="page-title">Posts by ' . perch_blog_author(perch_get('author'), array('template' => 'author_name.html'), true) . '</h2>';
    perch_blog_custom(array('author' => perch_get('author'), 'template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order, 'paginate' => true, 'page-links' => true, 'page-link-style' => 'all'));
    $posts_displayed = true;
}
/* --------------------------- DEFAULT: ALL POSTS --------------------------- */
if ($posts_displayed == false) {
    // No other options have been used; no posts have been displayed yet.
    // So display all posts.
    echo '<h2 class="page-title">Archive</h2>';
    perch_blog_custom(array('template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order, 'paginate' => true, 'page-links' => true, 'page-link-style' => 'all'));
}
?>
            </main>
            <?php 
perch_layout('sidebar');
?>
        </div>
开发者ID:amillionmonkeys,项目名称:perchd,代码行数:31,代码来源:archive.php


示例12: perch_blog_author

            print perch_blog_author(perch_get('author'));
            ?>
            </section>
            <section>
                <h2>Beiträge von <?php 
            echo perch_blog_author(perch_get('author'), array('template' => 'author_name.html'), true);
            ?>
</h2>
                <?php 
            perch_blog_custom(array('author' => perch_get('author'), 'template' => 'post_in_list.html', 'sort' => 'postDateTime', 'sort-order' => 'DESC'));
            ?>
            </section>
        <?php 
        } else {
            if (perch_get('year')) {
                $year = intval(perch_get('year'));
                $date_from = $year . '-01-01 00:00:00';
                $date_to = $year . '-12-31 23:59:59';
                ?>
            <h1><span class="arrow detail">Jahr</span> <?php 
                print strftime('%Y', strtotime($date_from));
                ?>
</h1>
            <section>
        <?php 
                perch_blog_custom(array('filter' => 'postDateTime', 'match' => 'eqbetween', 'value' => $date_from . ',' . $date_to, 'template' => 'post_in_list.html', 'sort' => 'postDateTime', 'sort-order' => 'DESC'));
                ?>
            </section>

        <?php 
            } else {
开发者ID:nilsmielke,项目名称:frwssr-Blog,代码行数:31,代码来源:index.php


示例13: perch_members_secure_download

<?php

include '../perch/runtime.php';
// config
$bucket_name = 'secure';
$url_param = 'file';
// By default, deny downloads unless we've proved the member is allowed this file.
$allow_download = false;
// Check a member is logged in
if (perch_member_logged_in()) {
    $allow_download = true;
}
/*
	Alternatively, you could check for a specific tag, e.g.

	if (perch_member_has_tag('subscriber')) {
		$allow_download = true;
	}
*/
// Deliver the file.
if ($allow_download) {
    perch_members_secure_download(perch_get($url_param), $bucket_name);
}
exit;
开发者ID:amillionmonkeys,项目名称:perchd,代码行数:24,代码来源:download.php


示例14: get_tags

      
        <div class="outer-container">
            <main class="main-body">
                <h2 class="page-title">Handy links from around the web</h2>
                <p>It's early days. And we promise, at some stage, the following will be sorted much better, but here is a list of some great Perch resources from around the web. If you've got something to add, email <a href="mailto:[email protected]">[email protected]</a>.</p>
                <?php 
$tags = get_tags();
echo '<div class="tags">';
$active = perch_get('tag') == null ? ' active' : '';
echo '<a class="btn--secondary ' . $active . '" href="/links">All</a>&nbsp;';
foreach ($tags as $tag) {
    $active = perch_get('tag') == $tag ? ' active' : '';
    echo '<a class="btn--secondary' . $active . '" href="/links?tag=' . $tag . '">' . ucfirst(substr($tag, 6)) . '</a>&nbsp;';
}
echo '</div>';
$items = pinboard_bookmarks('perch ' . perch_get('tag'));
foreach ($items as $item) {
    echo '<article class="post--extended">';
    echo '<header class="post__header"><h3 class="post__title"><a href="' . $item['url'] . '">' . $item['title'] . '</a></h3>';
    //echo '<div class="post__byline"><time class="dt-published">'.$item['date'].'</time></div></header>';
    echo '<div class="post__content"><p>' . $item['description'] . '</p></div>';
    echo '</article>';
    echo '<hr />';
}
?>
            </main>
            <?php 
perch_layout('sidebar');
?>
        </div>
        
开发者ID:amillionmonkeys,项目名称:perchd,代码行数:29,代码来源:links.php


示例15: perch_pages_title

<?php

if (!defined('PERCH_RUNWAY')) {
    include $_SERVER['DOCUMENT_ROOT'] . '/perch/runtime.php';
}
$title = perch_pages_title(true);
perch_layout('header', ['title' => $title . ' | perch.io']);
// perch_layout('homepage-header');
?>
      
        <div class="outer-container">
            <main class="main-body">
                <?php 
listing(perch_get('s'), array('template' => 'addons_item.html'));
?>
            </main>
            <?php 
perch_layout('user-sidebar');
?>
        </div>
        
    <?php 
perch_layout('footer');
开发者ID:amillionmonkeys,项目名称:perchd,代码行数:23,代码来源:item.php


示例16: perch_mailchimp_campaign_content

<?php

include $_SERVER['DOCUMENT_ROOT'] . '/perch/runtime.php';
perch_mailchimp_campaign_content(perch_get('s'));
开发者ID:connor-baer,项目名称:waterford-website,代码行数:4,代码来源:campaign.php


示例17: perch_get

//     echo '<h1>Archive of: '.$categoryTitle.'</h1>';
// }
// Tag?
if (perch_get('tag')) {
    $mode = 'tag';
    $tagSlug = perch_get('tag');
}
// Year?
if (perch_get('year')) {
    $mode = 'date';
    $year = intval(perch_get('year'));
    $date_from = $year . '-01-01 00:00:00';
    $date_to = $year . '-12-31 23:59:59';
    // Month and Year?
    if (perch_get('month')) {
        $month = intval(perch_get('month'));
        $date_from = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-01 00:00:00';
        $date_to = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-31 23:59:59';
    }
}
// NOW WE KNOW WHAT MODE, LET'S DO THE PERCH STUFF
switch ($mode) {
    // case 'category':
    //     $opts = array(
    //         'category'=>rtrim($categorySlug, '/')
    //         );
    //     break;
    case 'tag':
        $opts = array('tag' => rtrim($tagSlug, '/'));
        break;
    case 'date':
开发者ID:pete-naish,项目名称:4hair,代码行数:31,代码来源:archive.php


示例18: perch_blog_post_field

    <div class="hero-title-ctnr">
      <div class="hero-group">
        <h1 class="hero-title white text-shadow"><span itemprop="headline"><?php 
perch_blog_post_field(perch_get('s'), 'postTitle');
?>
</span></h1>
      </div>
    </div>
  </div>
</header>

<section>
  <div class="article-background">
    <article id="article" class="m0a">
      <?php 
perch_blog_post(perch_get('s'));
?>
    </article>
  </div>
</section>
</span>

<section class="cards">
  <div class="cards article-width--3">
    <header class="fp-header-ctnr">
      <h1 class="float-left medium blue">Latest news</h1>
      <p class="small"><a class="float-right link margin-top-05" href="/news/newsfeed/">All latest news &#8250;</a></p>
    </header>

    <?php 
perch_blog_custom(array('count' => 3, 'section' => 'newsfeed', 'template' => 'post_recent.html', 'sort' => 'postDateTime', 'sort-order' => 'DESC'));
开发者ID:connor-baer,项目名称:waterford-website,代码行数:31,代码来源:post.php


示例19: perch_blog_check_preview

function perch_blog_check_preview()
{
    if (!defined('PERCH_PREVIEW_ARG')) {
        define('PERCH_PREVIEW_ARG', 'preview');
    }
    if (perch_get(PERCH_PREVIEW_ARG)) {
        $Users = new PerchUsers();
        $CurrentUser = $Users->get_current_user();
        if (is_object($CurrentUser) && $CurrentUser->logged_in()) {
            PerchUtil::debug('Entering preview mode');
            PerchBlog_Posts::$preview_mode = true;
        }
    }
}
开发者ID:jimcurran,项目名称:bdmusichub,代码行数:14,代码来源:runtime.php


示例20: perch_blog_post_meta

<!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">      
    <?php 
if (perch_layout_has('blog-post')) {
    perch_blog_post_meta(perch_get('s'));
} else {
    echo '<title>' . perch_pages_title(true) . '</title>';
    perch_page_attributes();
}
?>
           
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="/assets/css/style.css">
        <link rel="shortcut icon" href="/assets/favicon.ico">
        <link rel="apple-touch-icon-precomposed" href="/assets/apple-touch-icon-152x152-precomposed.png">
        <script>
          (function(d) {
            var config = {
              kitId: 'lea0liy',
              scriptTimeout: 3000,
              async: true
            },
            h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
          })(document);
        </script>
    </head>
    <body>
        <header class="main-header">
开发者ID:amillionmonkeys,项目名称:perchd,代码行数:31,代码来源:header.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP perch_layout函数代码示例发布时间:2022-05-15
下一篇:
PHP perch_content函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap