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


PHP site_description函数代码示例

本文整理汇总了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 . '" />';
    }
}
开发者ID:Rigter,项目名称:Vapor,代码行数:12,代码来源:functions.php

示例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));
}
开发者ID:aravindanve,项目名称:anchor-maeby-light,代码行数:16,代码来源:functions.php

示例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();
?>
">
开发者ID:rubenvincenten,项目名称:anchor-site,代码行数:30,代码来源:header.php

示例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';
}
?>
开发者ID:cutout,项目名称:ptd,代码行数:30,代码来源:head.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;
});
开发者ID:BinaryMoon,项目名称:pro-theme-design,代码行数:31,代码来源:routes.php

示例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'));
开发者ID:BinaryMoon,项目名称:pro-theme-design,代码行数:31,代码来源:template.php


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