Пример #1
0
echo "\n";
wp_customheader();
echo "\n";
?>
	
    <?php 
$blogurl = get_bloginfo('url');
$currurl = $blogurl . $_SERVER['REQUEST_URI'];
$currurl = preg_quote($currurl, '/');
if (preg_match('/(' . $currurl . 'index.php)/', 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']) || preg_match('/(' . $currurl . 'index.php)/', 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'])) {
    if (get_bloginfo('description') != '') {
        $metadesc = get_bloginfo('description');
        // We're at the home page
    } else {
        $supdate = new SourceUpdate();
        $metadesc = $supdate->display(0);
    }
} else {
    // We must be in a page or a post
    $postdata = get_post($postid, ARRAY_A);
    $metadesc = substr($postdata['post_content'], 0, 134) . ' [...]';
}
$metadesc = strip_tags($metadesc);
?>
    <meta name="description" content="<?php 
echo $metadesc;
?>
" />
</head>

<body>
Пример #2
0
    ?>
</p>
					<div id="status-bottom">&nbsp;</div>
				</div>
			</div>
			<!-- /status -->
			<?php 
} elseif ($status->select()) {
    ?>
			<!-- status -->
			<div id="status">	
				<?php 
    echo get_avatar('1', $size = '36', $default = 'images/avatar.jpg');
    ?>
				<p><?php 
    echo $status->display();
    ?>
</p>
				<div id="status-bottom">&nbsp;</div>
			</div>
			<!-- /status -->
			<?php 
} else {
    ?>
			<p id="description"><?php 
    bloginfo('description');
    ?>
</p>
			<?php 
}
?>