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


PHP cs_get_option函数代码示例

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


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

示例1: output

 public function output()
 {
     echo $this->element_before();
     echo '<div class="cs-inner">';
     foreach ($this->field['fields'] as $field) {
         $field_id = isset($field['id']) ? $field['id'] : '';
         $field_value = isset($this->value[$field_id]) ? $this->value[$field_id] : '';
         $unique_id = $this->unique . '[' . $this->field['id'] . ']';
         if (!empty($this->field['un_array'])) {
             echo cs_add_element($field, cs_get_option($field_id), $this->unique);
         } else {
             echo cs_add_element($field, $field_value, $unique_id);
         }
     }
     echo '</div>';
     echo $this->element_after();
 }
开发者ID:firmansyahm,项目名称:-payment-confirmation-woocommerce,代码行数:17,代码来源:fieldset.php

示例2: cs_get_option

				<div id="infinite-scroll-holder" class="row grid">
				<?php 
    //get the nano progga theme settings from Theme Options page.
    $widgets_positioning = cs_get_option('widgets_positioning');
    /* Start the Loop */
    $_counter = 0;
    while (have_posts()) {
        the_post();
        ?>

					<?php 
        //Determine the pagination
        $paged = get_query_var('paged') ? get_query_var('paged') : 1;
        //Show widgets only on the first page or not
        if (cs_get_option('widgets_in_pages') || 1 === $paged) {
            //First Widget
            $widget_1_pos = $widgets_positioning['home_widget_1'] ? (int) $widgets_positioning['home_widget_1'] : 3;
            if ($_counter === $widget_1_pos && is_active_sidebar('home_widget_1')) {
                dynamic_sidebar('home_widget_1');
            }
            //Second Widget
            $widget_2_pos = $widgets_positioning['home_widget_2'] ? (int) $widgets_positioning['home_widget_2'] : 4;
            if ($_counter === $widget_2_pos && is_active_sidebar('home_widget_2')) {
                dynamic_sidebar('home_widget_2');
            }
            //Third Widget
            $widget_3_pos = $widgets_positioning['home_widget_3'] ? (int) $widgets_positioning['home_widget_3'] : 6;
            if ($_counter === $widget_3_pos && is_active_sidebar('home_widget_3')) {
                dynamic_sidebar('home_widget_3');
            }
开发者ID:Banglakontho,项目名称:nano-progga,代码行数:30,代码来源:index.php

示例3: cs_get_option

<?php

global $wd_wt;
?>
<footer>
    <div class="footer-sidebar grey-dark"></div>
    <div class="footer-bg grey">
        <div class="footer-content">
            <p><?php 
echo cs_get_option("wd_copyright");
?>
</p>

            <p><?php 
echo cs_get_option("wd_contact_number");
?>
</p>
        </div>
    </div>
</footer>
开发者ID:alexandru-b,项目名称:working-three,代码行数:20,代码来源:section-footer-copyright.php

示例4: cs_get_option

<?php

global $wd_wt;
$title = cs_get_option('wd_newsletter_title');
$logo = cs_get_option('wd_newsletter_logo');
$content = cs_get_option('wd_newsletter_content');
$has_enabled = cs_get_option('wd_enable_newsletter');
?>
<div id="dNewsletter" style="display: none;">
    <div class="closeWrap"><a class="closeButton" href="#" onclick="toggle_visibility('dNewsletter');">Close</a></div>

    <?php 
if (!empty($logo)) {
    ?>
    <img class="newsletterLogo" src="<?php 
    echo $wd_wt->tpl_url['img'];
    ?>
/placeholder.jpe">
    <?php 
} else {
    ?>
    <img class="newsletterLogo" src="<?php 
    echo $logo;
    ?>
"/>
    <?php 
}
?>

    <div class="newsletterContent">
        <div class="newsletterTitle"><?php 
开发者ID:alexandru-b,项目名称:working-three,代码行数:31,代码来源:section-newsletter.php

示例5: get_post_meta

<?php

/* 
Template Name: 留言页面
*/
$meta_data = get_post_meta(get_the_ID(), 'message_page', true);
$featured = $meta_data['i_page_image'];
$wall = cs_get_option('i_comment_wall');
$num = cs_get_option('i_comment_num');
get_header();
?>
		<!-- 留言页面 -->
		<div id="content">
			<div class="posts fade out">	
				<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
				<article <?php 
        post_class('post');
        ?>
>			
					<div class="box-wrap">
						<div class="box">
							 <?php 
        if (!empty($featured)) {
            ?>
		
									<a class="featured-image" href="<?php 
            the_permalink();
开发者ID:xmandxx,项目名称:Teahouse-Wordpress-Theme,代码行数:31,代码来源:custom-message.php

示例6: cs_get_option

<?php

/* 
Template Name: 作品页面
*/
$pagination = cs_get_option('i_pagination');
$loadmore = cs_get_option('i_ajax_loading');
$loadend = cs_get_option('i_ajax_end');
$loadnum = cs_get_option('i_ajax_num');
$worksnum = cs_get_option('i_works_num');
?>


<?php 
get_header();
?>
		<div id="content"><div class="posts grid">
<?php 
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query();
$show_posts = $worksnum;
//How many post you want on per page
$permalink = 'Post name';
// Default, Post name
$post_type = 'work';
//Know the current URI
$req_uri = $_SERVER['REQUEST_URI'];
//Permalink set to default
if ($permalink == 'Default') {
    $req_uri = explode('paged=', $req_uri);
开发者ID:xmandxx,项目名称:Teahouse-Wordpress-Theme,代码行数:31,代码来源:custom-work.php

示例7: add_js

function add_js()
{
    echo '<!-- 自定义js --><script>' . cs_get_option('i_js') . '</script>';
}
开发者ID:xmandxx,项目名称:Teahouse-Wordpress-Theme,代码行数:4,代码来源:functions.php

示例8: cs_get_option

<?php

// 获取选项
$like = cs_get_option('i_post_like');
$qrcodes = cs_get_option('i_code_qrcodes');
$qrcodes_img = cs_get_option('i_qrcodes_img');
$view = cs_get_option('i_post_view');
$meta_data = get_post_meta(get_the_ID(), 'work_options', true);
$comment = $meta_data['i_work_comment'];
$work_bg = $meta_data['i_work_bg'];
$bg_scr = $meta_data['i_work_bg_scr'];
$featured = $meta_data['i_work_featured'];
$workscom = cs_get_option('i_works_comment');
?>
 

<?php 
get_header();
?>

		<div id="content">
			<div class="posts fadeInDown animated">	
				<!-- single -->
				<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
				<?php 
        setPostViews(get_the_ID());
        ?>
开发者ID:xmandxx,项目名称:Teahouse-Wordpress-Theme,代码行数:31,代码来源:single-work.php

示例9: cs_get_option

<?php

// 获取选项
$excerpt = cs_get_option('i_post_readmore');
$qrcodes = cs_get_option('i_code_qrcodes');
$qrcodes_img = cs_get_option('i_qrcodes_img');
$font = cs_get_option('i_post_font');
$view = cs_get_option('i_post_view');
$sticky_img = cs_get_option('i_sticky_image');
$featured = cs_get_option('i_post_featured');
$meta_data = get_post_meta(get_the_ID(), 'aside_options', true);
$music = $meta_data['i_post_music'];
$player_id = cs_get_option('i_player_id');
$player = cs_get_option('i_player');
$player_mobi = cs_get_option('i_player_mobi');
$author = cs_get_option('i_post_author');
?>
 		
	<!-- 日志 -->
	
	<div class="box-wrap">
		<div class="box">
		
		<header>
			<?php 
if (is_single() || is_page()) {
    ?>
				<h1 class="entry-title"><a href="<?php 
    the_permalink();
    ?>
" title="<?php 
开发者ID:xmandxx,项目名称:Teahouse-Wordpress-Theme,代码行数:31,代码来源:format-aside.php

示例10: cs_get_option

    }
    ?>
	

			</ul>
		</div>
	<?php 
}
?>
	
	<footer id="footer">
		<?php 
if ($topbar == true && is_active_sidebar(2) && !is_mobile()) {
    ?>
		<?php 
    $column = cs_get_option('i_topbar_col');
    $column_style = '';
    switch ($column) {
        case "col_1":
            $column_style = 'columns1';
            break;
        case "col_2":
            $column_style = 'columns2';
            break;
        case "col_3":
            $column_style = 'columns3';
            break;
        case "col_4":
            $column_style = 'columns4';
            break;
    }
开发者ID:xmandxx,项目名称:Teahouse-Wordpress-Theme,代码行数:31,代码来源:footer.php

示例11: csv_import_to_post

 public function csv_import_to_post()
 {
     //check if there any errors while uploading
     $success = true;
     if (cs_get_option('csv_file')) {
         //set CSV file
         $csv_file = array_map('str_getcsv', file(cs_get_option('csv_file')));
         $post_meta_order = array_map('trim', current($csv_file));
         $post_data = array_values($post_meta_order);
         $counter_data = 0;
         $count_data = count($csv_file);
         $data_per_line = count($post_data);
         //based on the post meta order that has been set by user
         $post_data_csv = array();
         foreach ($csv_file as $index => $data) {
             //if option to skip first line is check then will skip the loop
             if ($index < 1) {
                 continue;
             }
             //will iterate every data on CSV file
             for ($i = 0; $i < $data_per_line; $i++) {
                 $post_data_csv[$post_data[$i]] = $data[$i];
             }
             //will create a post and get id
             $post_id = wp_insert_post(array('post_title' => $post_data_csv['post_title'] ? $post_data_csv['post_title'] : '', 'post_content' => $post_data_csv['post_content'] ? $post_data_csv['post_content'] : '', 'post_name' => $post_data_csv['post_name'] ? $post_data_csv['post_name'] : '', 'post_type' => cs_get_option('post_type'), 'post_status' => 'publish', 'publish_author' => 1));
             if (is_wp_error($post_id)) {
                 echo json_encode(array('success' => 'false', 'message' => $post_id->get_error_message()));
             }
             //loop through post meta
             foreach ($post_data_csv as $meta_key => $meta_value) {
                 if (strstr($meta_key, 'post_')) {
                     continue;
                 }
                 add_post_meta($post_id, $meta_key, $meta_value);
             }
             $counter_data++;
         }
         //will remove the file from the option
         if (defined('CS_OPTION')) {
             $cs_options = get_option(CS_OPTION);
             unset($cs_options['csv_file']);
             update_option(CS_OPTION, $cs_options);
         }
         echo json_encode(array('success' => 'true', 'message' => __('Successfully Imported CSV', 'import-csv-to-post')));
     }
     die;
 }
开发者ID:junrillg,项目名称:import-csv-to-post,代码行数:47,代码来源:class-import-csv-to-post-admin.php

示例12: cs_get_option

<?php

// 获取选项
$excerpt = cs_get_option('i_post_readmore');
$next = cs_get_option('i_post_next');
$author = cs_get_option('i_post_author');
$link = cs_get_option('i_post_link');
$related = cs_get_option('i_post_related');
$mbx = cs_get_option('i_post_mbx');
$like = cs_get_option('i_post_like');
?>
 

<?php 
get_header();
?>
		<div id="content">
			<div class="posts fade out">	
				<!-- single -->
				<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
				<?php 
        setPostViews(get_the_ID());
        ?>
				<article <?php 
        post_class('post');
        ?>
>
开发者ID:xmandxx,项目名称:Teahouse-Wordpress-Theme,代码行数:31,代码来源:single.php

示例13: nano_progga_breadcrumbs

nano_progga_breadcrumbs();
?>
						
						<?php 
if (cs_get_option('showseriesblog') && is_page_template('page-templates/blog.php') || is_home()) {
    /**
     * Featured Series
     * @since  3.0.0
     */
    if (cs_get_option('showseries')) {
        ?>
							<section id="series-showcase" class="hidden-print">
								<?php 
        $series_ids = array();
        //default
        $series_ids = cs_get_option('serieschoice');
        if ($series_ids) {
            ?>
									<div class="row">
										<div class="col-md-12">
											<h2 class="inner-title"><span><?php 
            _e('Popular Series', 'nano-progga');
            ?>
</span></h2>
										</div> <!-- /.col-md-12 -->
										<?php 
            foreach ($series_ids as $series_id) {
                $featured_series = get_term_by('id', (int) $series_id, 'series');
                $img_src = nano_get_tax_meta_img_src($series_id, 'series_cover', $size = 'medium');
                $series_link = get_term_link((int) $series_id, 'series');
                ?>
开发者ID:Banglakontho,项目名称:nano-progga,代码行数:31,代码来源:header.php

示例14: cs_get_option

        ?>
">
					<?php 
        echo $ourworkitem["wd_mobile_more_menu_our_work_title"];
        ?>
				</a>
            <?php 
    }
    ?>
        <?php 
}
?>
    </div>
    <div class="nav-bot-wrap">
                <?php 
$menuitems = cs_get_option("wd_mobile_menu_items");
?>

                <?php 
if (isset($menuitems) && !empty($menuitems)) {
    $i = 1;
    ?>
                    <?php 
    foreach ($menuitems as $menuitem) {
        ?>
                    	<?php 
        if ($i == 2) {
            ?>
			                <div class="nav-bot-link" id="ow-link" onclick="toggle_visibility('our-work-menu');">
        					<script>
        						if (jQuery(window).width() < 767) {
开发者ID:alexandru-b,项目名称:working-three,代码行数:31,代码来源:section-nav-bottom.php

示例15: get_template_part

			<?php 
    get_template_part('template-parts/content', 'single');
    ?>

			<?php 
    nano_progga_pagination();
    ?>

			<?php 
    /**
     * Show related posts.
     * If enabled in Theme Options Page.
     * -------------------------------------------
     */
    if (cs_get_option('related_posts')) {
        echo nano_progga_get_related_posts(get_the_ID());
    }
    ?>

			<?php 
    // If comments are open or we have at least one comment, load up the comment template.
    if (comments_open() || get_comments_number()) {
        comments_template();
    }
    ?>

		<?php 
}
// End of the loop.
?>
开发者ID:Banglakontho,项目名称:nano-progga,代码行数:30,代码来源:single.php


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