本文整理汇总了PHP中site_description函数的典型用法代码示例。如果您正苦于以下问题:PHP site_description函数的具体用法?PHP site_description怎么用?PHP site_description使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了site_description函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: vapor_twitter_card
function vapor_twitter_card()
{
$twitter = site_meta('twitter_account');
if ($twitter != '' || $twitter != NULL) {
$title = article_id() ? article_title() : site_name();
$description = article_id() ? article_description() : site_description();
echo '<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@' . str_replace('@', '', $twitter) . '" />
<meta name="twitter:title" content="' . $title . '" />
<meta name="twitter:description" content="' . $description . '" />';
}
}
示例2: my_get_description
function my_get_description($len = 500)
{
if (!Registry::get('article')) {
$description = site_description();
} else {
$description = trim(Registry::prop('article', 'description'));
if (empty($description)) {
$description = parse(Registry::prop('article', 'html'));
}
$description = trim(preg_replace('#<[^>]+>#', ' ', $description));
}
if (strlen($description) > $len) {
$description = substr($description, 0, $len - 3) . '...';
}
return preg_replace('/[\\n\\r\\t]+/', ' ', preg_replace('/\\s+/', ' ', $description));
}
示例3: page_title
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><?php
echo page_title();
?>
- <?php
echo site_name();
?>
</title>
<meta name="description" content="<?php
echo site_description();
?>
">
<link rel="stylesheet" href="<?php
echo theme_url('/css/reset.css');
?>
">
<link rel="stylesheet" href="<?php
echo theme_url('/css/style.css');
?>
">
<link rel="alternate" type="application/rss+xml" title="RSS" href="<?php
echo rss_url();
?>
">
示例4: css_path
<link rel="stylesheet" href="<?php
echo css_path('css/styles.css');
?>
" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:100,300,400,300italic" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.css" />
<link type="text/plain" rel="author" href="<?php
echo path('humans.txt');
?>
" />
<meta name="google-site-verification" content="VDLz-TZD53CTCmTol81Cd1UoOyz5RuAjdyjiP4irmsk" />
<meta name="description" content="<?php
site_description('', true);
?>
">
<script>
var GUMROAD_ACTIVE = '<?php
echo DISABLE_GUMROAD ? 'false' : 'true';
?>
';
</script>
<?php
include 'head-open-graph.php';
if ('prod' == ENV) {
include 'tracking.php';
}
?>
示例5: array
if (!($plugins = plugins_get_by_tag($tag))) {
Flight::notFound();
}
Flight::render($view, array('tag' => $tag, 'plugins' => $plugins));
});
/**
* 404
*/
Flight::map('notFound', function () {
site_title('404 - not found :(');
$request = Flight::request();
// see if a page exists
if ($page_info = page_exists($request->url)) {
site_title($page_info['title']);
if (null !== $page_info['description']) {
site_description($page_info['description']);
}
Flight::render($page_info['view']);
die;
}
// see if there's a valid permanent redirect, and if there is send the user to the new location
if ($redirect_url = redirect_destination($request->url)) {
Flight::redirect($redirect_url, 301);
die;
}
header('HTTP/1.0 404 Not Found');
site_header_title('404 :(');
site_description('<a href="' . path() . '">Visit the homepage <i class="fa fa-arrow-right"></i></a>');
Flight::render('404.php');
die;
});
示例6: site_enable_purchase
?>
" content="<?php
echo $value;
?>
" />
<?php
}
}
}
}
/**
* Check if Gumroad is enabled and if it is then add the Gumroad script
*/
function site_enable_purchase()
{
if (!DISABLE_GUMROAD) {
site_script('https://gumroad.com/js/gumroad.js', true);
}
}
// Set Defaults
// default site description
site_description('Designing <strong>Professional WordPress Themes</strong> since 2007.');
// default site title
site_title('Pro Theme Design - WordPress Themes and Plugins');
// default site page header title
site_header_title('Pro Theme Design');
// default site og:type
site_meta('og:type', 'website');
// default site scripts
site_script('https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js');
site_script(js_path('main.min.js'));