當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wp_credits函數代碼示例

本文整理匯總了PHP中wp_credits函數的典型用法代碼示例。如果您正苦於以下問題:PHP wp_credits函數的具體用法?PHP wp_credits怎麽用?PHP wp_credits使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了wp_credits函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: error

function error($error)
{
    ?>

<div style="font-family: Arial">
  <h2 align="center">An Error Has Occured</h2>
  <div align="center">
    <div style="width: 400px; padding: 10px; text-align: left; background-color: #336699; color: #fff; font-weight:bold; font-family: Arial; border: 1px solid #ccc;"> <?php 
    echo $error;
    ?>
 </div>
    <a href="javascript:window.history.go(-1);">Click Here To Go Back</a> </div>
</div>
<?php 
    wp_credits();
    exit;
}
開發者ID:rpiket,項目名稱:WP-Autoresponder,代碼行數:17,代碼來源:optin.php

示例2: _e

		<?php 
_e('What&#8217;s New');
?>
	</a><a href="credits.php" class="nav-tab nav-tab-active">
		<?php 
_e('Credits');
?>
	</a><a href="freedoms.php" class="nav-tab">
		<?php 
_e('Freedoms');
?>
	</a>
</h2>

<?php 
$credits = wp_credits();
if (!$credits) {
    echo '<p class="about-description">' . sprintf(__('WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.'), 'https://wordpress.org/about/', __('http://codex.wordpress.org/Contributing_to_WordPress')) . '</p>';
    include ABSPATH . 'wp-admin/admin-footer.php';
    exit;
}
echo '<p class="about-description">' . __('WordPress is created by a worldwide team of passionate individuals.') . "</p>\n";
$gravatar = is_ssl() ? 'https://secure.gravatar.com/avatar/' : 'http://0.gravatar.com/avatar/';
foreach ($credits['groups'] as $group_slug => $group_data) {
    if ($group_data['name']) {
        if ('Translators' == $group_data['name']) {
            // Considered a special slug in the API response. (Also, will never be returned for en_US.)
            $title = _x('Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section');
        } elseif (isset($group_data['placeholders'])) {
            $title = vsprintf(translate($group_data['name']), $group_data['placeholders']);
        } else {
開發者ID:easinewe,項目名稱:Avec2016,代碼行數:31,代碼來源:credits.php


注:本文中的wp_credits函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。