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


PHP dttheme_option函数代码示例

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


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

示例1: dt_sensei_after_main_content

 function dt_sensei_after_main_content()
 {
     echo "</section>";
     if (is_singular('course')) {
         $page_layout = dttheme_option('sensei', "course-layout");
         $page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
     } elseif (is_singular('lesson')) {
         $page_layout = dttheme_option('sensei', "lesson-layout");
         $page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
     } elseif (is_singular('quiz')) {
         $page_layout = dttheme_option('sensei', "quiz-layout");
         $page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
     } elseif (taxonomy_exists('course-category')) {
         $page_layout = dttheme_option('sensei', "course-category-layout");
         $page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
     }
     $show_sidebar = $show_left_sidebar = $show_right_sidebar = false;
     $sidebar_class = "";
     switch ($page_layout) {
         case 'with-left-sidebar':
             $page_layout = "page-with-sidebar with-left-sidebar";
             $show_sidebar = $show_left_sidebar = true;
             $sidebar_class = "secondary-has-left-sidebar";
             break;
         case 'with-right-sidebar':
             $page_layout = "page-with-sidebar with-right-sidebar";
             $show_sidebar = $show_right_sidebar = true;
             $sidebar_class = "secondary-has-right-sidebar";
             break;
         case 'both-sidebar':
             $page_layout = "page-with-sidebar page-with-both-sidebar";
             $show_sidebar = $show_right_sidebar = $show_left_sidebar = true;
             $sidebar_class = "secondary-has-both-sidebar";
             break;
         case 'content-full-width':
         default:
             $page_layout = "content-full-width";
             break;
     }
     if ($show_sidebar) {
         if ($show_right_sidebar) {
             echo '<section id="secondary-right" class="secondary-sidebar ' . $sidebar_class . '">';
             get_sidebar('right');
             echo '</section>';
         }
     }
 }
开发者ID:PNW3DEV,项目名称:iesdb-v1,代码行数:47,代码来源:index.php

示例2: dt_services_columns_display

 function dt_services_columns_display($columns, $id)
 {
     global $post;
     switch ($columns) {
         case 'details':
             $info = get_post_meta($post->ID, "_info", true);
             $info = is_array($info) ? $info : array();
             $price = array_key_exists('price', $info) ? $info['price'] : "";
             $price = !empty($price) ? dt_currency_symbol(dttheme_option('company', 'currency')) . ' ' . $price : "";
             $price = !empty($price) ? '<p>' . __("Price", "dt_themes") . ' - ' . $price . '</p>' : "";
             echo $price;
             $duration = array_key_exists('duration', $info) ? $info['duration'] : "";
             $duration = !empty($duration) ? '<p>' . __("Duration", 'dt_themes') . ' - ' . durationToString($duration) . '</p>' : "";
             echo $duration;
             break;
     }
 }
开发者ID:namnguyen2312,项目名称:spa,代码行数:17,代码来源:dt-service-post-type.php

示例3: widget

	function widget($args, $instance) {
		extract($args);
		echo $before_widget;
		$title = empty($instance['title']) ? '' : strip_tags($instance['title']);
		$title = apply_filters( 'widget_title', $title );

		$desc = empty($instance['desc']) ? '' : strip_tags($instance['desc']);
		$desc = apply_filters( 'widget_title', $desc );

		$list_id = $instance['list_id'];
		
		if ( !empty( $title ) ) echo $before_title.$title.$after_title;
		
		if ( !empty( $desc ) ) echo "<p>$desc</p>";
		
		if( isset( $_REQUEST['mythem_mc_emailid']) ):
			require_once(IAMD_FW."theme_widgets/mailchimp/MCAPI.class.php");
			$mcapi = new MCAPI( dttheme_option('general','mailchimp-key') );
			
			$merge_vars = Array( 'EMAIL' => $_REQUEST['mythem_mc_emailid']);
			$list_id = $instance['list_id'];

			if($mcapi->listSubscribe($list_id, $_REQUEST['mythem_mc_emailid'], $merge_vars ) ):
				// It worked!   
				$msg = '<span style="color:white;">'.__('Success!&nbsp; Check your inbox or spam folder for a message containing a confirmation link.','dt_themes').'</span>';
			else:
				// An error ocurred, return error message   
				$msg = '<span style="color:red;"><b>'.__('Error:','dt_themes').'</b>&nbsp; ' . $mcapi->errorMessage.'</span>';
			endif;
			
		endif;
		
		echo '<form method="post" class="mailchimp-form">';
		echo '	<input type="email" placeholder="'.__('Enter Email Address','dt_themes').'" name="mythem_mc_emailid" value="" required/>';
		echo "	<input type='hidden' name='mythem_mc_listid' value='$list_id' />";
		echo '	<input type="submit" name="submit" class="nl-submit" value="Signup" />';
		echo '</form>';

		if ( isset ( $msg ) ) echo '<span class="zn_mailchimp_result">'.$msg.'</span>';
		
		echo $after_widget;		
	}
开发者ID:namnguyen2312,项目名称:spa,代码行数:42,代码来源:mailchimp.php

示例4: widget

    function widget($args, $instance)
    {
        extract($args);
        global $post;
        $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
        $_post_count = (int) $instance['_post_count'];
        $_post_categories = "";
        if (!empty($instance['_post_categories']) && is_array($instance['_post_categories'])) {
            $_post_categories = array_filter($instance['_post_categories']);
        } elseif (!empty($instance['_post_categories'])) {
            $_post_categories = explode(",", $instance['_post_categories']);
        }
        $_enable_course_image = $instance['_enable_course_image'] == 1 ? 1 : 0;
        $arg = array('posts_per_page' => $_post_count, 'post_type' => 'dt_courses', 'orderby' => 'menu_order', 'order' => 'ASC');
        $arg = empty($_post_categories) ? $arg : array('posts_per_page' => $_post_count, 'tax_query' => array(array('taxonomy' => 'course_category', 'field' => 'id', 'operator' => 'IN', 'terms' => $_post_categories)), 'orderby' => 'menu_order', 'order' => 'ASC');
        echo $before_widget;
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        echo "<div class='recent-course-widget'><ul>";
        query_posts($arg);
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                $title = strlen(get_the_title()) > 20 ? substr(get_the_title(), 0, 15) . "..." : get_the_title();
                echo "<li>";
                if (1 == $_enable_course_image) {
                    if (has_post_thumbnail()) {
                        $image_url = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'dt-course-widget');
                        echo '<img src="' . $image_url[0] . '" alt="' . get_the_title() . '" width="' . $image_url[1] . '" height="' . $image_url[2] . '" />';
                    } else {
                        echo '<img src="http://placehold.it/110x90&text=Image" alt="' . get_the_title() . '" />';
                    }
                }
                echo "<h6><a href='" . get_permalink() . "'>{$title}</a></h6>";
                $course_settings = get_post_meta(get_the_ID(), '_course_settings');
                $starting_price = dttheme_wp_kses(get_post_meta(get_the_ID(), 'starting-price', true));
                if ($starting_price != '') {
                    echo '<span class="dt-sc-course-price">
									<span class="amount">';
                    if (dttheme_option('dt_course', 'currency-position') == 'after-price') {
                        echo $starting_price . dttheme_wp_kses(dttheme_option('dt_course', 'currency'));
                    } else {
                        echo dttheme_wp_kses(dttheme_option('dt_course', 'currency')) . $starting_price;
                    }
                    echo '</span>
							</span>';
                }
                echo "</li>";
            }
        } else {
            echo "<li>" . __('No Course Entries found', 'dt_themes') . "</li>";
        }
        wp_reset_query();
        echo "</ul></div>";
        echo $after_widget;
    }
开发者ID:PNW3DEV,项目名称:iesdb-v1,代码行数:57,代码来源:courses_widgets.php

示例5: foreach

    foreach ($payment_data as $payment) {
        $course = get_post($payment['course_id']);
        $out .= '<tr>
							<td class="aligncenter">' . $i . '</td>
							<td class="aligncenter">' . $course->post_title . '</td>
							<td class="aligncenter">' . $payment['purchases'] . '</td>
							<td class="aligncenter">' . $payment['starting_price'] . '</td>
							<td class="aligncenter">' . $payment['commission'] . '</td>
							<td class="aligncenter">' . $payment['topay'] . '</td>
						</tr>';
        $total = $total + $payment['topay'];
        $i++;
    }
    if ($total > 0) {
        $out .= '<tr>
							<td colspan="6">&nbsp;</td>
						</tr>';
        $out .= '<tr>
							
							<td colspan="5" class="alignright"><strong>' . __('Total (' . dttheme_wp_kses(dttheme_option('dt_course', 'currency')) . ')', 'dt_themes') . '</strong></td>
							<td>' . $total . '</td>
						</tr>';
    }
    $out .= '</table>';
    echo $out;
}
?>
        
    </div>
    
</div>
开发者ID:PNW3DEV,项目名称:iesdb-v1,代码行数:31,代码来源:dt_payment_default_metabox.php

示例6: _e

	<div class="column one-sixth"><?php 
_e('Price', 'dt_themes');
?>
</div>
	<div class="column five-sixth last"><?php 
$price = array_key_exists('price', $info) ? $info['price'] : "";
?>
		<input type="text" name="_info[price]" class='small-text' value="<?php 
echo $price;
?>
" placeholder="<?php 
_e('Price', 'dt_themes');
?>
">
		<?php 
echo dt_currency_symbol(dttheme_option('company', 'currency'));
?>
	</div>
</div>

<div class="custom-box">
	<div class="column one-sixth"><?php 
_e('Duration', 'dt_themes');
?>
</div>
	<div class="column five-sixth last">
		<select name="_info[duration]">
			<option value=""><?php 
_e('Select', 'dt_themes');
?>
</option><?php 
开发者ID:namnguyen2312,项目名称:spa,代码行数:31,代码来源:dt_services_metabox.php

示例7: widget

 function widget($args, $instance)
 {
     extract($args);
     echo $before_widget;
     $title = empty($instance['title']) ? '' : strip_tags($instance['title']);
     $title = apply_filters('widget_title', $title);
     $desc = empty($instance['desc']) ? '' : strip_tags($instance['desc']);
     $list_id = isset($instance['list_id']) ? $instance['list_id'] : '';
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     if (!empty($desc)) {
         echo "<p>{$desc}</p>";
     }
     if (isset($_REQUEST['mythem_mc_emailid'])) {
         require_once IAMD_FW . "theme_widgets/mailchimp/MCAPI.class.php";
         $mcapi = new MCAPI(dttheme_wp_kses(dttheme_option('general', 'mailchimp-key')));
         $merge_vars = array('EMAIL' => $_REQUEST['mythem_mc_emailid']);
         $list_id = $instance['list_id'];
         if ($mcapi->listSubscribe($list_id, $_REQUEST['mythem_mc_emailid'], $merge_vars)) {
             // It worked!
             $msg = '<span class="success-msg">' . __('Success!&nbsp; Please check your inbox or spam folder.', 'dt_themes') . '</span>';
         } else {
             // An error ocurred, return error message
             $msg = '<span class="error-msg"><b>' . __('Error:', 'dt_themes') . '</b>&nbsp; ' . $mcapi->errorMessage . '</span>';
         }
     }
     echo '<form method="post" class="mailchimp-form">';
     echo '	<input type="email" placeholder="' . __('Enter Email Address', 'dt_themes') . '" name="mythem_mc_emailid" value="" required/>';
     echo "\t<input type='hidden' name='mythem_mc_listid' value='{$list_id}' />";
     echo '	<input type="submit" name="submit" class="nl-submit" value="Signup" />';
     echo '</form>';
     if (isset($msg)) {
         echo '<span class="zn_mailchimp_result">' . $msg . '</span>';
     }
     echo $after_widget;
 }
开发者ID:enlacee,项目名称:anb.platicom.com.pe,代码行数:37,代码来源:mailchimp.php

示例8: dttheme_option

<?php

$dt_bp_data = dttheme_option("bp");
$dt_bp_data = is_array($dt_bp_data) ? $dt_bp_data : array();
$dt_per_page = array_key_exists("members-per-page", $dt_bp_data) ? dttheme_wp_kses($dt_bp_data["members-per-page"]) : 10;
$dt_per_page - intval($dt_per_page);
?>

<?php 
do_action('bp_before_members_loop');
$columns = $post_class = "";
$members_page_layout = dttheme_option('bp', "members-page-layout");
switch ($members_page_layout) {
    case "one-half-column":
        $columns = 2;
        $post_class = "column dt-sc-one-half";
        break;
    case "one-third-column":
        $columns = 3;
        $post_class = "column dt-sc-one-third";
        break;
    case "one-fourth-column":
        $columns = 4;
        $post_class = "column dt-sc-one-fourth";
        break;
    default:
        $columns = 4;
        $post_class = "column dt-sc-one-fourth";
        break;
}
if (bp_has_members(bp_ajax_querystring('members') . '&per_page=' . $dt_per_page)) {
开发者ID:PNW3DEV,项目名称:iesdb-v1,代码行数:31,代码来源:members-loop.php

示例9: _e

     <div class="clear"> </div>        
     
     <div class="column dt-sc-one-half first">
         <p> <input type="text" name="name" value="" placeholder="<?php _e('Name','dt_themes');?>"></p>
     </div>
     <div class="column dt-sc-one-half">
         <p><input type="email" name="email" value="" required placeholder="<?php _e('Email','dt_themes');?>"></p>
     </div>
     <div class="column dt-sc-one-half first">
         <p><input type="text" name="phone" value="" required placeholder="<?php _e('Phone','dt_themes');?>"></p>
     </div>
     
     <div class="column dt-sc-one-half">                
         <div class="choose-payment hidden">
             <?php $payatarrival = dttheme_option('company','enable-pay-at-arrival');
             $paypal = dttheme_option('company','enable-paypal');?>
             <select name="payment_type">
                 <option value=""><?php _e('Choose Payment','dt_themes');?></option>
                 <?php if( !empty($payatarrival) ): ?>
                     <option value="local"><?php _e('Pay At Arrival','dt_themes');?></option>
                 <?php endif;?>
                 <?php if( !empty($paypal) ): ?>					
                     <option value="paypal"><?php _e('Paypal Express Checkout','dt_themes');?></option>
                 <?php endif;?>
             </select>
         </div>
     </div>
     
     <textarea name="note" placeholder="<?php _e('Note','dt_themes');?>"></textarea>
 </div>    
       
开发者ID:namnguyen2312,项目名称:spa,代码行数:30,代码来源:tpl-reservation.php

示例10: get_header

<?php

get_header();
$page_layout = dttheme_option('specialty', 'category-archives-layout');
$page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
$post_layout = dttheme_option('specialty', 'category-archives-post-layout');
$post_layout = !empty($post_layout) ? $post_layout : "one-column";
$show_sidebar = $show_left_sidebar = $show_right_sidebar = false;
$sidebar_class = "";
$container_class = "";
$image_size = "";
switch ($page_layout) {
    case 'with-left-sidebar':
        $page_layout = "page-with-sidebar with-left-sidebar";
        $show_sidebar = $show_left_sidebar = true;
        $sidebar_class = "secondary-has-left-sidebar";
        break;
    case 'with-right-sidebar':
        $page_layout = "page-with-sidebar with-right-sidebar";
        $show_sidebar = $show_right_sidebar = true;
        $sidebar_class = "secondary-has-right-sidebar";
        break;
    case 'content-full-width':
    default:
        $page_layout = "content-full-width";
        break;
}
switch ($post_layout) {
    case 'one-column':
        $post_class = $show_sidebar ? " column dt-sc-one-column with-sidebar blog-fullwidth" : " column dt-sc-one-column blog-fullwidth";
        $image_size = $show_sidebar ? "blog-one-column-with-sidebar" : "blog-one-column";
开发者ID:namnguyen2312,项目名称:spa,代码行数:31,代码来源:category.php

示例11: get_header

<?php

get_header();
$page_layout = dttheme_option('specialty', 'search-layout');
$page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
$show_sidebar = $show_left_sidebar = $show_right_sidebar = false;
$sidebar_class = $thumbnail_sidebar = "";
switch ($page_layout) {
    case 'with-left-sidebar':
        $page_layout = "page-with-sidebar with-left-sidebar";
        $show_sidebar = $show_left_sidebar = true;
        $sidebar_class = "secondary-has-left-sidebar";
        $thumbnail_sidebar = "-single-sidebar";
        break;
    case 'with-right-sidebar':
        $page_layout = "page-with-sidebar with-right-sidebar";
        $show_sidebar = $show_right_sidebar = true;
        $sidebar_class = "secondary-has-right-sidebar";
        $thumbnail_sidebar = "-single-sidebar";
        break;
    case 'both-sidebar':
        $page_layout = "page-with-sidebar page-with-both-sidebar";
        $show_sidebar = $show_right_sidebar = $show_left_sidebar = true;
        $sidebar_class = "secondary-has-both-sidebar";
        $thumbnail_sidebar = "-both-sidebar";
        break;
    case 'content-full-width':
    default:
        $page_layout = "content-full-width";
        $thumbnail_sidebar = "";
        break;
开发者ID:enlacee,项目名称:anb.platicom.com.pe,代码行数:31,代码来源:search.php

示例12: dttheme_option

    $v = dttheme_option('woo', "product-tag-layout");
    $v = !empty($v) ? $v : "content-full-width";
    foreach ($layout as $key => $value) {
        $class = $key == $v ? " class='selected' " : "";
        echo "<li><a href='#' rel='{$key}' {$class}><img src='" . IAMD_FW_URL . "theme_options/images/columns/{$value}.png' alt='' /></a></li>";
    }
    ?>
                        </ul>
                        <input name="mytheme[woo][product-tag-layout]" type="hidden" value="<?php 
    echo $v;
    ?>
"/>
                    </div><!-- Product Detail Page Layout End-->
                    
					 <?php 
    $sb_layout = dttheme_option('woo', "product-tag-layout");
    $sidebar_both = $sidebar_left = $sidebar_right = '';
    if ($sb_layout == 'content-full-width') {
        $sidebar_both = 'style="display:none;"';
    } elseif ($sb_layout == 'with-left-sidebar') {
        $sidebar_right = 'style="display:none;"';
    } elseif ($sb_layout == 'with-right-sidebar') {
        $sidebar_left = 'style="display:none;"';
    }
    ?>
                    <div id="bpanel-widget-area-options" <?php 
    echo 'class="woocommerce-product-tag" ' . $sidebar_both;
    ?>
>
                        
                        <div id="left-sidebar-container" class="bpanel-page-left-sidebar" <?php 
开发者ID:enlacee,项目名称:anb.platicom.com.pe,代码行数:31,代码来源:woocommerce.php

示例13: dt_sc_newsletter_section

    function dt_sc_newsletter_section($atts, $content = null)
    {
        extract(shortcode_atts(array('title' => ''), $atts));
        $content = DTCoreShortcodesDefination::dtShortcodeHelper($content);
        $out = '<section id="newsletter">
					<h2 class="border-title aligncenter">' . $title . '</h2>
					<h6> ' . $content . ' </h6>
					<form name="frmsubscribe" method="post" class="dt-sc-subscribe-frm">
						<input type="email" name="dt_sc_mc_emailid" required="" placeholder="' . __('Your Email Address', 'dt_themes') . '" />
						<input type="hidden" name="dt_sc_mc_listid" value="' . stripslashes(dttheme_option('general', 'mailchimp-listid')) . '" />
						<input type="submit" name="submit" class="dt-sc-button small" value="' . __('Subscribe', 'dt_themes') . '" />
					</form>';
        if (isset($_REQUEST['dt_sc_mc_emailid'])) {
            require_once IAMD_FW . "theme_widgets/mailchimp/MCAPI.class.php";
            $mcapi = new MCAPI(dttheme_wp_kses(dttheme_option('general', 'mailchimp-key')));
            $list_id = dttheme_option('general', 'mailchimp-listid');
            if ($mcapi->listSubscribe($list_id, $_REQUEST['dt_sc_mc_emailid'])) {
                $msg = '<span class="success-msg">' . __('Success! Check your inbox or spam folder for a message containing a confirmation link.', 'dt_themes') . '</span>';
            } else {
                $msg = '<span class="error-msg"><b>' . __('Error:', 'dt_themes') . '</b>&nbsp; ' . $mcapi->errorMessage . '</span>';
            }
        }
        if (isset($msg)) {
            $out .= '<div class="dt_sc_mc_result">' . $msg . '</div>';
        }
        $out .= '</section>';
        return $out;
    }
开发者ID:enlacee,项目名称:anb.platicom.com.pe,代码行数:28,代码来源:shortcodes.php

示例14: __

				<p> <?php 
        echo $count . '&nbsp;' . __('Lessons', 'dt_themes');
        ?>
 </p>
			</div>
			
			<div class="dt-sc-course-data">
				<div class="dt-sc-course-duration">
					<i class="fa fa-clock-o"> </i>
					<span> <?php 
        echo $duration;
        ?>
 </span>
				</div>
				<?php 
        if (function_exists('the_ratings') && !dttheme_option('general', 'disable-ratings-courses')) {
            echo do_shortcode('[ratings id="' . get_the_ID() . '"]');
        }
        ?>
			</div>
												
		</div>
	
	</article>
    
    </div>

<?php 
    }
} else {
    echo __('No courses to load!', 'dt_themes');
开发者ID:PNW3DEV,项目名称:iesdb-v1,代码行数:31,代码来源:search-courses.php

示例15: dttheme_option

            <!-- **Header** -->
            <header id="header" class="header2">
            
                <div class="container">
                    <!-- **Logo - Start** -->
                    <div id="logo">
						<?php 
if (dttheme_option('general', 'logo')) {
    $url = dttheme_option('general', 'logo-url');
    $url = !empty($url) ? $url : IAMD_BASE_URL . "images/logo.png";
    $retina_url = dttheme_option('general', 'retina-logo-url');
    $retina_url = !empty($retina_url) ? $retina_url : IAMD_BASE_URL . "images/logo@2x.png";
    $width = dttheme_option('general', 'retina-logo-width');
    $width = !empty($width) ? $width . "px;" : "98px";
    $height = dttheme_option('general', 'retina-logo-height');
    $height = !empty($height) ? $height . "px;" : "99px";
    ?>
                            <a href="<?php 
    echo home_url();
    ?>
" title="<?php 
    echo dttheme_blog_title();
    ?>
">
                                <img class="normal_logo" src="<?php 
    echo esc_url($url);
    ?>
" alt="<?php 
    echo dttheme_blog_title();
    ?>
" title="<?php 
开发者ID:PNW3DEV,项目名称:iesdb-v1,代码行数:31,代码来源:header2.php


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