本文整理汇总了PHP中article_title函数的典型用法代码示例。如果您正苦于以下问题:PHP article_title函数的具体用法?PHP article_title怎么用?PHP article_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了article_title函数的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: while
</li>
<?php
$i = 0;
while (posts()) {
?>
<li>
<article class="wrap">
<h2>
<a href="<?php
echo article_url();
?>
" title="<?php
echo article_title();
?>
"><?php
echo article_title();
?>
</a>
</h2>
<footer>
Posted <time datetime="<?php
echo date(DATE_W3C, article_time());
?>
"><?php
echo relative_time(article_time());
?>
</time> by <?php
echo article_author('real_name');
?>
.
示例3: article_date
<h3 class="animated bounceInRight">
Posted: <time><?php
echo article_date();
?>
</time> By <?php
echo article_author('real_name');
?>
</h3>
<div class="animated bounceInLeft">
<div class="addthis_sharing_toolbox"></div>
<?php
$pageTitle = article_title() . ' - DownloadMii Blog';
$buffer = ob_get_contents();
ob_end_clean();
$buffer = str_replace("%TITLE%", $pageTitle, $buffer);
$buffer = str_replace("%DESCRIPTION%", article_title(), $buffer);
$buffer = str_replace("%SOCIAL_TITLE%", $pageTitle, $buffer);
$buffer = str_replace("%SOCIAL_URL%", article_url(), $buffer);
$buffer = str_replace("%SOCIAL_DESC%", article_description(), $buffer);
echo $buffer;
if (article_custom_field('appnameField1', 'null') != 'null') {
?>
App: <a href="https://www.downloadmii.com/apps/view/<?php
echo article_custom_field('appnameField1_GUID');
?>
"><?php
echo article_custom_field('appnameField1');
?>
</a>
<br />
<?php
示例4: defined
<?php
defined('IN_CMS') or die('No direct access allowed.');
$home = is_postspage();
$url = isset($url) && !$home ? $url : article_url();
$title = isset($title) && !$home ? $title : article_title();
$time = isset($time) && !$home ? $time : article_time();
$excerpt = isset($excerpt) && !$home ? $excerpt : trim(article_description());
$excerpt = $excerpt == "" ? false : $excerpt;
$content = isset($content) && !$home ? $content : article_html();
$image = isset($image) && !$home ? $image : article_custom_field('img', false);
$isArticle = isset($isArticle) && $isArticle;
$uurl = urlencode(full_url());
$utitle = urlencode($title);
$tags = array("theme_url" => theme_url());
foreach ($tags as $s => $r) {
$content = str_replace("{" . $s . "}", $r, $content);
}
?>
<li class="<?php
if (isset($first) && $first) {
echo "showContent";
}
if (!$time) {
echo " noFooter";
}
echo is_single() ? " single" : " multiple";
?>
">
<header tabindex="-1">
<!--<a href="<?php
示例5: empty
<?php
// Enable content-aware coloring
$primary = empty(article_title()) ? site_meta('primary', 'indigo') : str_replace('-', '_', color(article_title()));
$accent = empty(article_title()) ? site_meta('accent', 'pink') : str_replace('-', '_', accent(article_title()));
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php
echo page_title('Page can’t be found');
?>
- <?php
echo site_name();
?>
</title>
<!-- Include Roboto font -->
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
<!-- Include Material Icons -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<!-- Include Material Design Lite -->
<link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.4/material.<?php
echo $primary;
?>
-<?php
echo $accent;
?>
.min.css">
<script type="text/javascript" src="https://storage.googleapis.com/code.getmdl.io/1.0.4/material.min.js"></script>
示例6: theme_include
<?php
theme_include("header");
?>
<article class="article article-single">
<h2><?php
echo article_title();
?>
</h2>
<?php
$image = article_custom_field('image');
if (!empty($image)) {
echo "<img src=\"{$image}\" class=\"img-responsive\" alt=\"", article_title(), "\" itemprop=\"image\">";
//if there is image show it
}
?>
<aside class="article-info">
<span class="time">
<span class="glyphicon glyphicon-time" aria-hidden="true"></span>
<?php
echo article_date();
?>
</span>
<span class="author">
<span class="glyphicon glyphicon-user" aria-hidden="true"></span>
<?php
echo article_author();
?>