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


PHP dopt函数代码示例

本文整理汇总了PHP中dopt函数的典型用法代码示例。如果您正苦于以下问题:PHP dopt函数的具体用法?PHP dopt怎么用?PHP dopt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dopt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: bloginfo

"><?php 
bloginfo('name');
?>
</a>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1000537096'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s4.cnzz.com/z_stat.php%3Fid%3D1000537096' type='text/javascript'%3E%3C/script%3E"));</script>
		<script type="text/javascript" src="http://tajs.qq.com/stats?sId=34262718" charset="UTF-8"></script>

        <?php 
if (dopt('Rcloud_beian')) {
    echo dopt('Rcloud_beianhao');
}
?>

		<?php 
if (dopt('Rcloud_track_b')) {
    echo dopt('Rcloud_track');
}
?>

		<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F09e5d137cb48c128491f1000bf62a401' type='text/javascript'%3E%3C/script%3E"));
</script>

		<a href="http://www.rccoder.net/sitemap">站点地图</a>
		
本站由<a href="http://my.33c.cc/aff.php?aff=023" rel="nofollow">极速动力主机</a>和<a href="http://www.qiniu.com" rel="nofollow">七牛云储存</a>赞助
本站永久链接<a href="http://www.rccoder.net" rel="nofollow">www.rccoder.net</a>
        All Rights Reserved.

        自豪地使用WordPress
开发者ID:Nsking-xs,项目名称:rccoder,代码行数:31,代码来源:footerges.php

示例2: theme_description

function theme_description()
{
    global $s, $post;
    $description = '';
    $blog_name = get_bloginfo('name');
    if (is_singular()) {
        if (!empty($post->post_excerpt)) {
            $text = $post->post_excerpt;
        } else {
            $text = $post->post_content;
        }
        $description = trim(str_replace(array("\r\n", "\r", "\n", " ", " "), " ", str_replace("\"", "'", strip_tags($text))));
        if (!$description) {
            $description = $blog_name . "-" . trim(wp_title('', false));
        }
    } elseif (is_home()) {
        $description = $blog_name . "-" . get_bloginfo('description') . '|' . dopt('Rcloud_description');
        // 首頁要自己加
    } elseif (is_tag()) {
        $description = $blog_name . "有关 '" . single_tag_title('', false) . "' 的文章";
    } elseif (is_category()) {
        $description = $blog_name . "有关 '" . single_cat_title('', false) . "' 的文章";
    } elseif (is_archive()) {
        $description = $blog_name . "在: '" . trim(wp_title('', false)) . "' 的文章";
    } elseif (is_search()) {
        $description = $blog_name . ": '" . esc_html($s, 1) . "' 的搜索結果";
    } else {
        $description = $blog_name . "有关 '" . trim(wp_title('', false)) . "' 的文章";
    }
    $description = mb_substr($description, 0, 220, 'utf-8') . '..';
    echo "<meta name=\"description\" content=\"{$description}\" />\n";
}
开发者ID:Nsking-xs,项目名称:rccoder,代码行数:32,代码来源:key.php

示例3: dopt

        echo '<a class="google" href="' . dopt('d_rss_google') . '"><i class="fa fa-google-plus "></i></a>';
    }
    if (dopt('d_rss_facebook_b')) {
        echo '<a class="facebook" href="' . dopt('d_rss_facebook') . '"><i class="fa fa-facebook"></i></a>';
    }
    if (dopt('d_rss_github_b')) {
        echo '<a class="github" href="' . dopt('d_rss_github') . '"><i class="fa fa-github"></i></a>';
    }
    if (dopt('d_rss_tencent_b')) {
        echo '<a class="tweibo" href="' . dopt('d_rss_tencent') . '"><i class="fa fa-tencent-weibo"></i></a>';
    }
    if (dopt('d_rss_instagram_b')) {
        echo '<a class="instagram" href="' . dopt('d_rss_instagram') . '"><i class="fa fa-instagram"></i></a>';
    }
    if (dopt('d_rss_b')) {
        echo '<a class="rss" href="' . dopt('d_rss') . '"><i class="fa fa-rss"></i></a>';
    }
    //if( dopt('d_rss_b') ) echo '<a class="weixin" href="'.dopt('d_rss').'"><i class="fa fa-weixin"></i></a>';
    echo '</div>';
}
?>
		
	 </div>

  </div>
  
  <nav class="main-nav">
  
        <?php 
wp_nav_menu(array('theme_location' => 'header-menu', 'container' => 'ul', 'menu_class' => 'nav'));
?>
开发者ID:evershy,项目名称:yunmo,代码行数:31,代码来源:header.php

示例4: dopt

?>
"/>
	<a id="qr" href="javascript:;"><i class="fa fa-qrcode"></i></a>
	<a id="gotop" href="javascript:;"><i class="fa fa-arrow-up"></i></a>
	
<?php 
if (dopt('d_track_b') != '') {
    '<div class="static-hide">' . dopt('d_track') . '</div>';
}
if (dopt('d_footcode_b') != '') {
    echo dopt('d_footcode');
}
if (is_single() && dopt('d_sideroll_single_b')) {
    $sr_1 = dopt('d_sideroll_single_1');
    $sr_2 = dopt('d_sideroll_single_2');
} elseif (is_home() && dopt('d_sideroll_index_b')) {
    $sr_1 = dopt('d_sideroll_index_1');
    $sr_2 = dopt('d_sideroll_index_2');
} elseif (is_page() && dopt('d_sideroll_page_b')) {
    $sr_1 = dopt('d_sideroll_page_1');
    $sr_2 = dopt('d_sideroll_page_2');
} else {
    $sr_1 = 2;
    $sr_2 = 4;
}
echo '<script>var asr_1 = ' . $sr_1 . ',asr_2 = ' . $sr_2 . ';</script>';
wp_footer();
?>
  
</body>
</html>
开发者ID:w392807287,项目名称:FirstRepository,代码行数:31,代码来源:footer.php

示例5: the_title

        ?>
&title=<?php 
        the_title();
        ?>
" target="_blank"><i class="fa fa-renren"></i></a></li>
                <li><a href="http://twitter.com/share?url=<?php 
        the_permalink();
        ?>
&text=<?php 
        the_title();
        ?>
" target="_blank"><i class="fa fa-twitter"></i></a></li>
            </ul>
        </div>
    <?php 
        if (dopt('d_ding_b') != '') {
            ?>
        <div class="post-love">
            <a href="javascript:;" data-action="ding" data-id="<?php 
            the_ID();
            ?>
" class="favorite post-love-link <?php 
            if (isset($_COOKIE['mzw_ding_' . $post->ID])) {
                echo ' done';
            }
            ?>
" title="点个赞"><i class="fa fa-heart-o"></i>
            <span class="love-count">
                <?php 
            $ding_num = get_post_meta($post->ID, 'mzw_ding', true);
            echo $ding_num ? $ding_num : '0';
开发者ID:h2y,项目名称:germ,代码行数:31,代码来源:page-tags.php

示例6: get_the_tags

<ul>
<?php 
$exclude_id = $post->ID;
$posttags = get_the_tags();
$i = 0;
$limit = !dopt('d_related_count') ? 12 : dopt('d_related_count');
if ($posttags) {
    $tags = '';
    foreach ($posttags as $tag) {
        $tags .= $tag->name . ',';
    }
    $args = array('post_status' => 'publish', 'tag_slug__in' => explode(',', $tags), 'post__not_in' => explode(',', $exclude_id), 'caller_get_posts' => 1, 'orderby' => 'comment_date', 'posts_per_page' => $limit);
    query_posts($args);
    while (have_posts()) {
        the_post();
        echo '<li><a href="' . get_permalink() . '">', get_the_title(), '</a></li>';
        $exclude_id .= ',' . $post->ID;
        $i++;
    }
    wp_reset_query();
}
if ($i < $limit) {
    $cats = '';
    foreach (get_the_category() as $cat) {
        $cats .= $cat->cat_ID . ',';
    }
    $args = array('category__in' => explode(',', $cats), 'post__not_in' => explode(',', $exclude_id), 'caller_get_posts' => 1, 'orderby' => 'comment_date', 'posts_per_page' => $limit - $i);
    query_posts($args);
    while (have_posts()) {
        the_post();
        echo '<li><a href="' . get_permalink() . '">', get_the_title(), '</a></li>';
开发者ID:sunyang3721,项目名称:wdy-wordpress,代码行数:31,代码来源:related.php

示例7: widget

    function widget($args, $instance)
    {
        extract($args);
        echo $before_widget;
        ?>
        <img src="<?php 
        bloginfo('template_directory');
        ?>
/images/bg_small.jpg">
        <div class="author-body">
            <div class="author_img">
            <?php 
        if (dopt('d_defaultavatar_b')) {
            echo get_avatar(get_the_author_email(), $size = '80', '');
        } else {
            $head_src = dopt('d_myavatar') ? dopt('d_myavatar') : "http://q.qlogo.cn/qqapp/100229475/F1260A6CECA521F6BE517A08C4294D8A/100";
            echo '<img src="' . $head_src . '" class="avatar avatar-80 photo" height="80" width="80">';
        }
        ?>
            </div>
            <div class="author_bio">
                <h3><?php 
        the_author_meta('nickname');
        ?>
 </h3>
                <p class="muted"><?php 
        the_author_meta('user_description');
        ?>
 </p>
            </div>
        </div>
        <?php 
        if (dopt('d_sns_open')) {
            echo '<div class="social">';
            if (dopt('d_rss_b')) {
                echo '<a target="_blank" class="rss" href="' . dopt('d_rss') . '"><i class="fa fa-rss"></i></a>';
            }
            if (dopt('d_mail_b')) {
                echo '<a rel="nofollow" target="_blank" class="mail" href="' . dopt('d_mail') . '"><i class="fa fa-envelope"></i></a>';
            }
            if (dopt('d_rss_sina_b')) {
                echo '<a rel="nofollow" target="_blank" class="weibo" href="' . dopt('d_rss_sina') . '"><i class="fa fa-weibo"></i></a>';
            }
            if (dopt('d_rss_twitter_b')) {
                echo '<a rel="nofollow" target="_blank" class="twitter" href="' . dopt('d_rss_twitter') . '"><i class="fa fa-twitter"></i></a>';
            }
            if (dopt('d_rss_google_b')) {
                echo '<a rel="nofollow" target="_blank" class="google" href="' . dopt('d_rss_google') . '"><i class="fa fa-google-plus "></i></a>';
            }
            if (dopt('d_rss_facebook_b')) {
                echo '<a rel="nofollow" target="_blank" class="facebook" href="' . dopt('d_rss_facebook') . '"><i class="fa fa-facebook"></i></a>';
            }
            if (dopt('d_rss_github_b')) {
                echo '<a rel="nofollow" target="_blank" class="github" href="' . dopt('d_rss_github') . '"><i class="fa fa-github"></i></a>';
            }
            if (dopt('d_rss_tencent_b')) {
                echo '<a rel="nofollow" target="_blank" class="tweibo" href="' . dopt('d_rss_tencent') . '"><i class="fa fa-tencent-weibo"></i></a>';
            }
            if (dopt('d_rss_linkedin_b')) {
                echo '<a rel="nofollow" target="_blank" class="linkedin" href="' . dopt('d_rss_linkedin') . '"><i class="fa fa-linkedin"></i></a>';
            }
            //if( dopt('d_rss_b') ) echo '<a class="weixin" href="'.dopt('d_rss').'"><i class="fa fa-weixin"></i></a>';
            echo '</div>';
        }
        echo $after_widget;
    }
开发者ID:h2y,项目名称:germ,代码行数:66,代码来源:widget.php

示例8: mytheme_admin

function mytheme_admin()
{
    global $themename, $options;
    $i = 0;
    if ($_REQUEST['saved']) {
        echo '<div class="updated settings-error"><p>' . $themename . '修改已保存</p></div>';
    }
    ?>

<div class="wrap d_wrap">
    <link rel="stylesheet" href="<?php 
    bloginfo('template_url');
    ?>
/admin/admin.css"/>
    <h2><?php 
    echo $themename;
    ?>
设置
        <span class="d_themedesc">发布来源:<a href="http://www.yusi123.com/" target="_blank">欲思博客</a> &nbsp;&nbsp; <a href="http://yusi123.com/3233.html" target="_blank">访问<?php 
    echo $themename;
    ?>
主页</a></span>
    </h2>

<form method="post" class="d_formwrap">
    <table>
    <thead>
        <tr>
            <th width="200"></th>
            <th></th>
        </tr>
    </thead>
    <tr>
        <td class="d_tit">网站描述</td>
        <td>
            <input class="ipt-b" type="text" id="d_description" name="d_description" value="<?php 
    echo dopt('d_description');
    ?>
">
        </td>
    </tr>
    <tr>
        <td class="d_tit">网站关键字</td>
        <td>
            <input class="ipt-b" type="text" id="d_keywords" name="d_keywords" value="<?php 
    echo dopt('d_keywords');
    ?>
">
        </td>
    </tr>
    <tr>
        <td class="d_tit">最新消息</td>
        <td>
            <textarea name="d_tui" id="d_tui" type="textarea" rows=""><?php 
    echo dopt('d_tui');
    ?>
</textarea>
            <span class="d_tip">最新消息显示在全站导航条下方,非常给力的推广位置</span>
        </td>
    </tr>
    <tr>
        <td class="d_tit">首页置顶推荐幻灯片</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_sticky_b" name="d_sticky_b" <?php 
    if (dopt('d_sticky_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            显示<input class="d_num" name="d_sticky_count" id="d_sticky_count" type="number" value="<?php 
    echo dopt('d_sticky_count');
    ?>
">条 默认4条
            &nbsp; &nbsp;
            <span class="d_tip">开启后请确保您的后台-文章中设置了4篇以上的置顶文章,并且文章第一张图片像素为716*297</span>
        </td>
    </tr>
    <tr>
        <td class="d_tit">友情链接页面</td>
        <td>
            <label class="checkbox inline">
                只显示分类ID为 <input name="d_linkpage_cat" id="d_linkpage_cat" type="text" value="<?php 
    echo dopt('d_linkpage_cat');
    ?>
"> 的链接(id之间用英文逗号隔开),默认显示全部,如果要显示带头像的友情链接,请在notes中添加上链接邮箱
                &nbsp; &nbsp;
            </label>
        </td>
    </tr>
    <tr>
        <td class="d_tit">文章无特色图时不显示默认缩略图</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_thumbnail_b" name="d_thumbnail_b" <?php 
    if (dopt('d_thumbnail_b')) {
        echo 'checked="checked"';
    }
    ?>
//.........这里部分代码省略.........
开发者ID:hjm8809,项目名称:xsphp.com,代码行数:101,代码来源:Yusi.php

示例9: get_currentuserinfo

    global $current_user;
    get_currentuserinfo();
    $uid = $current_user->ID;
    $u_name = get_user_meta($uid, 'nickname', true);
    ?>
			<div class="pull-right">
				<?php 
    if (is_user_logged_in()) {
        echo '<i class="icon-user icon12"></i> ' . $u_name . ' &nbsp; ';
        echo '<a href="' . site_url('/wp-admin') . '" target="_blank">后台管理</a>';
        echo ' &nbsp; &nbsp; <i class="icon-off icon12"></i> ';
    } else {
        echo '<i class="icon-user icon12"></i> ';
    }
    wp_loginout();
    ?>
			</div>
		<?php 
}
?>
		<div class="toptip"><strong class="text-success">最新消息:</strong><?php 
echo dopt('d_tui');
?>
</div>
	</div>
</header>
<section class="container">
	<?php 
if (dopt('d_adsite_01_b')) {
    echo '<div class="banner banner-site">' . dopt('d_adsite_01') . '</div>';
}
开发者ID:sunyang3721,项目名称:wdy-wordpress,代码行数:31,代码来源:header.php

示例10: course_sec_status_select

/**
 * Course section select: shows general list of statuses and
 * if $status is not NULL, shows the current status
 * for a particular course section record.
 *
 * @since 1.0.0
 * @param string $status            
 * @return string Returns the record key if selected is true.
 */
function course_sec_status_select($status = NULL, $readonly = '')
{
    $app = \Liten\Liten::getInstance();
    $select = '<select name="currStatus" class="selectpicker form-control" data-style="btn-info" data-size="10" data-live-search="true" required' . $readonly . '>
    			<option value="">&nbsp;</option>
    	    	<option' . dopt('activate_course_sec') . ' value="A"' . selected($status, 'A', false) . '>A Active</option>
    	    	<option value="I"' . selected($status, 'I', false) . '>I Inactive</option>
    			<option value="P"' . selected($status, 'P', false) . '>P Pending</option>
    			<option' . dopt('cancel_course_sec') . ' value="C"' . selected($status, 'C', false) . '>C Cancel</option>
    			<option value="O"' . selected($status, 'O', false) . '>O Obsolete</option>
		        </select>';
    return $app->hook->apply_filter('course_sec_status', $select, $status);
}
开发者ID:parkerj,项目名称:eduTrac-SIS,代码行数:22,代码来源:hook-function.php

示例11: widget

    function widget($args, $instance)
    {
        extract($args);
        ?>

<?php 
        echo $before_widget;
        ?>

<h3 class="widget-title"><?php 
        echo $instance['title'];
        ?>
</h3>
<div class="widget-line"></div>
<ul class="catPost">
<?php 
        $post_tags = wp_get_post_tags($post->ID);
        if ($post_tags) {
            foreach ($post_tags as $tag) {
                // 获取标签列表
                $tag_list[] .= $tag->term_id;
            }
        }
        $post_tag = $tag_list[rand(0, count($tag_list) - 1)];
        $query_posts = new WP_Query('orderby=rand&caller_get_posts=1&showposts=' . $instance['Num'] . '&tag_in=' . $post_tag);
        ?>

<?php 
        while ($query_posts->have_posts()) {
            $query_posts->the_post();
            ?>

<?php 
            if ($instance['style'] == "img") {
                ?>

<li class="imglist"><a href=" <?php 
                the_permalink();
                ?>
 " title=" <?php 
                the_title();
                ?>
 ">
    <?php 
                if (dopt('Rcloud_timthumb_b')) {
                    post_thumbnail(145, 90);
                } else {
                    the_img();
                }
                ?>

<?php 
                the_title();
                ?>
 </a></li>
<?php 
            } elseif ($instance['style'] == "text") {
                ?>

<li class="textlist"><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
"><?php 
                the_title();
                ?>
</a></li>
<?php 
            }
        }
        ?>

</ul>
              <?php 
        echo $after_widget;
        ?>

        <?php 
    }
开发者ID:Nsking-xs,项目名称:rccoder,代码行数:81,代码来源:widget.php

示例12: dopt

    </article>
    <?php 
}
?>

    <div class="article-footer">
    </div>
    <div class="relates">
      <?php 
include 'modules/related.php';
?>

    </div>
    <?php 
if (dopt('d_adpost_02_b')) {
    echo '<div class="banner_post_bottom">' . dopt('d_adpost_02') . '</div>';
}
?>

    <?php 
comments_template('', true);
?>

  </div>
  <?php 
get_sidebar();
?>

</div>
<?php 
get_footer();
开发者ID:surperone,项目名称:Wordpress_Theme_One,代码行数:31,代码来源:single.php

示例13: mzw_description

function mzw_description()
{
    global $s, $post;
    $description = '';
    $blog_name = get_bloginfo('name');
    if (is_singular()) {
        $ID = $post->ID;
        $title = $post->post_title;
        $author = $post->post_author;
        $user_info = get_userdata($author);
        $post_author = $user_info->display_name;
        if (!get_post_meta($ID, "meta-description", true)) {
            $description = $title . ' - 作者: ' . $post_author . ',首发于' . $blog_name;
        } else {
            $description = get_post_meta($ID, "meta-description", true);
        }
    } elseif (is_home()) {
        $description = dopt('d_description');
    } elseif (is_tag()) {
        $description = single_tag_title('', false) . " - " . trim(strip_tags(tag_description()));
    } elseif (is_category()) {
        $description = single_cat_title('', false) . " - " . trim(strip_tags(category_description()));
    } elseif (is_archive()) {
        $description = $blog_name . "'" . trim(wp_title('', false)) . "'";
    } elseif (is_search()) {
        $description = $blog_name . ": '" . esc_html($s, 1) . "' 的搜索結果";
    } else {
        $description = $blog_name . "'" . trim(wp_title('', false)) . "'";
    }
    $description = mb_substr($description, 0, 220, 'utf-8');
    echo "<meta name=\"description\" content=\"{$description}\">\n";
}
开发者ID:a3587556,项目名称:quench,代码行数:32,代码来源:functions.php

示例14: get_header

<?php

get_header();
if (dopt('d_adindex_01_b')) {
    printf('<div class="banner banner-navbar">' . dopt('d_adindex_01') . '</div>');
}
?>
<div class="content-wrap">
	<div class="content">
	<?php 
if (dopt('d_adindex_03_b')) {
    printf('<div class="banner banner-contenttop">' . dopt('d_adindex_03') . '</div>');
}
if ($paged && $paged > 1) {
    printf('<header class="archive-header"><h1>最新发布 第' . $paged . '页</h1><div class="archive-header-info"><p>' . get_option('blogname') . get_option('blogdescription') . '</p></div></header>');
} else {
    if (dopt('d_sticky_b')) {
        include 'modules/sticky.php';
    }
}
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array('caller_get_posts' => 1, 'paged' => $paged);
query_posts($args);
include 'modules/excerpt.php';
?>
	</div>
</div>
<?php 
get_sidebar();
get_footer();
开发者ID:dfc643,项目名称:ARCHIVE-2014-wordpress-theme-backup,代码行数:30,代码来源:index.php

示例15: bloginfo

 -- <?php 
echo bloginfo('name');
?>
</h1>
<div class="demo-header">
	<a class="demo-name" href="<?php 
echo get_permalink($pid);
?>
">&laquo; <?php 
echo $title;
?>
</a>
	<span style="display:none"><?php 
if (dopt('d_track_b') != '') {
    echo dopt('d_track');
}
?>
</span>
</div>
<div class="demo-container demo"><?php 
echo $theCode;
?>
</div>
<div style="display:none"><?php 
if (dopt('d_track_b')) {
    echo dopt('d_track');
}
?>
</div>
</body>
</html>
开发者ID:dfc643,项目名称:ARCHIVE-2014-wordpress-theme-backup,代码行数:31,代码来源:example.php


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