本文整理汇总了PHP中dt_theme_option函数的典型用法代码示例。如果您正苦于以下问题:PHP dt_theme_option函数的具体用法?PHP dt_theme_option怎么用?PHP dt_theme_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dt_theme_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: widget
function widget($args, $instance)
{
extract($args);
$title = empty($instance['title']) ? '' : strip_tags($instance['title']);
echo $before_widget;
if (!empty($title)) {
echo $before_title . $title . $after_title;
}
if (dt_theme_option('general', 'show-sociables')) {
?>
<ul class="dt-sc-social-icons"><?php
$socials = dt_theme_option('social');
if ($socials != null) {
foreach ($socials as $social) {
$link = esc_url($social['link']);
$icon = esc_attr($social['icon']);
echo "<li class='" . substr($icon, 3) . "'>";
echo "<a class='fa {$icon}' href='{$link}'></a>";
echo "</li>";
}
} else {
echo "<div class='error message'><span class='icon'></span>" . __('Please add social icons in general settings.', 'iamd_text_domain') . "</div>";
}
?>
</ul><?php
} else {
echo "<div class='error message'><span class='icon'></span>" . __('Please enable social icons in general settings.', 'iamd_text_domain') . "</div>";
}
echo $after_widget;
}
示例2: dt_theme_option
$v = dt_theme_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' /></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 = dt_theme_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
示例3: checked
<?php
checked(dt_theme_option('pagebuilder', $post_type_key), $post_type_key);
?>
/>
</div>
<?php
}
?>
<div class="hr"></div>
</div><!-- .bpanel-option-set -->
<div class="bpanel-option-set">
<?php
$checked = true == dt_theme_option('pagebuilder', 'enable-pagebuilder') ? ' checked="checked"' : '';
$pb_switchclass = true == dt_theme_option('pagebuilder', 'enable-pagebuilder') ? 'checkbox-switch-on' : 'checkbox-switch-off';
?>
<h6><?php
_e('Keep page builder active in above selected post types', 'iamd_text_domain');
?>
</h6>
<div data-for="mytheme-enable-pagebuilder" class="checkbox-switch <?php
echo $pb_switchclass;
?>
"></div>
<input class="hidden" id="mytheme-enable-pagebuilder" name="mytheme[pagebuilder][enable-pagebuilder]" type="checkbox" value="true" <?php
$checked;
?>
/>
<div class="hr"></div>
示例4: while
while ($the_query->have_posts()) {
$the_query->the_post();
$temp_class = "";
if ($i == 1) {
$temp_class = $article_class . " first";
} else {
$temp_class = $article_class;
}
if ($i == $column) {
$i = 1;
} else {
$i = $i + 1;
}
$format = get_post_format();
$format = !empty($format) ? $format : 'standard';
$pholder = dt_theme_option('general', 'enable-placeholder-images');
?>
<div class="<?php
echo esc_attr($temp_class);
?>
">
<article id="post-<?php
the_ID();
?>
" <?php
post_class('blog-entry');
?>
>
<div class="blog-entry-inner">
<div class="entry-title">
示例5: edit_post_link
?>
<div style="background-repeat:no-repeat;background-position:left top;" class="fullwidth-section">
<div class="container"><?php
edit_post_link(__('Edit', 'iamd_text_domain'), '<span class="edit-link">', '</span>');
echo '<div class="social-bookmark">';
show_fblike('page');
show_googleplus('page');
show_twitter('page');
show_stumbleupon('page');
show_linkedin('page');
show_delicious('page');
show_pintrest('page');
show_digg('page');
echo '</div>';
dt_theme_social_bookmarks('sb-page');
if (dt_theme_option('integration', 'enable-single-page-bottom-code') != '') {
echo wp_kses(stripslashes(dt_theme_option('integration', 'single-page-bottom-code')), $dt_allowed_html_tags);
}
if (dt_theme_option('general', 'disable-page-comment') != true && isset($meta_set['comment']) != "") {
comments_template('', true);
}
?>
</div>
</div>
</article>
</section>
</div>
</div><?php
}
get_footer();
示例6: dt_theme_breadcrumb
function dt_theme_breadcrumb()
{
$delimiter = "";
if (dt_theme_option('general', 'breadcrumb-delimiter') == 'default') {
$delimiter = 'class="' . dt_theme_option('general', 'breadcrumb-delimiter') . '"';
} else {
$delimiter = 'class="fa ' . dt_theme_option('general', 'breadcrumb-delimiter') . '"';
}
$this->options = array('before' => "<span {$delimiter} > ", 'after' => ' </span>');
$markup = $this->options['before'] . $this->options['after'];
global $post;
echo '<div class="breadcrumb"><a href="' . home_url() . '">' . __('Home', 'iamd_text_domain') . '</a>';
if (!is_front_page() && !is_home()) {
echo $markup;
}
$output = $this->simple_breadcrumb_case($post);
if (is_page() || is_single() && !is_singular('tribe_events')) {
echo "<h4>";
the_title();
echo "</h4>";
} else {
if (in_array('events-single', get_body_class())) {
echo '<h4>' . single_post_title() . '</h4>';
} else {
if ($output != NULL) {
echo "<h4>" . $output . "</h4>";
} else {
$title = get_option('page_for_posts') > 0 ? get_the_title(get_option('page_for_posts')) : NULL;
echo $markup;
echo "<h4>" . $title . "</h4>";
}
}
}
echo "</div>";
}
示例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);
$list_id = $instance['list_id'];
if (!empty($title)) {
echo $before_title . $title . $after_title;
}
if (isset($_REQUEST['mythem_mc_emailid'])) {
require_once IAMD_FW . "theme_widgets/mailchimp/MCAPI.class.php";
$mcapi = new MCAPI(dt_theme_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:green;">' . __('Success! Check your inbox or spam folder for a message containing a confirmation link.', 'iamd_text_domain') . '</span>';
} else {
// An error ocurred, return error message
$msg = '<span style="color:red;"><b>' . __('Error:', 'iamd_text_domain') . '</b> ' . $mcapi->errorMessage . '</span>';
}
}
echo '<p>' . __('Subscribe to your newsletter for latest offers and discounts. We will not spam you.', 'iamd_text_domain') . '</p>';
echo '<form name="frmsubscribe" method="post" class="subscribe-frm">';
echo '<input type="email" name="mythem_mc_emailid" required="" placeholder="' . __('Enter Email', 'iamd_text_domain') . '" />';
echo "<input type='hidden' name='mythem_mc_listid' value='{$list_id}' />";
echo '<input type="submit" name="submit" class="dt-sc-button small" value="' . __('Subscribe', 'iamd_text_domain') . '" />';
echo '</form>';
if (isset($msg)) {
echo '<span class="zn_mailchimp_result">' . $msg . '</span>';
}
echo $after_widget;
}
示例8: _e
<p class="note"><?php
_e('Please set default currency symbol which will be used in front end display', 'iamd_text_domain');
?>
</p>
</div>
<div class="hr_invisible"> </div>
<div class="column one-third"><label><?php
_e('Currency', 'iamd_text_domain');
?>
</label></div>
<div class="column two-third last">
<?php
$currency_options = array('ADF', 'ADP', 'AED', 'AFA', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'AON', 'ARS', 'ATS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BEF', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CAD', 'CDF', 'CFP', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CSK', 'CUC', 'CUP', 'CVE', 'CYP', 'CZK', 'DEM', 'DJF', 'DKK', 'DOP', 'DZD', 'ECS', 'EEK', 'EGP', 'ESP', 'ETB', 'EUR', 'FIM', 'FJD', 'FKP', 'FRF', 'GBP', 'GEL', 'GHC', 'GHS', 'GIP', 'GMD', 'GNF', 'GRD', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'IEP', 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'ITL', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LTL', 'LUF', 'LVL', 'LYD', 'MAD', 'MDL', 'MGF', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MTL', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'MZM', 'MZN', 'NAD', 'NGN', 'NIO', 'NLG', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PTE', 'PYG', 'QAR', 'ROL', 'RON', 'RSD', 'RUB', 'SAR', 'SBD', 'SCR', 'SDD', 'SDG', 'SDP', 'SEK', 'SGD', 'SHP', 'SIT', 'SKK', 'SLL', 'SOS', 'SRD', 'SRG', 'STD', 'SVC', 'SYP', 'SZL', 'THB', 'TMM', 'TND', 'TOP', 'TRL', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGS', 'USD', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'YUN', 'ZAR', 'ZMK', 'ZWD');
$currency_membership = dt_theme_option('general', 'currency-membership') != '' ? dt_theme_option('general', 'currency-membership') : 'USD';
?>
<select id="mytheme-currency-membership" name="mytheme[general][currency-membership]"><?php
foreach ($currency_options as $value) {
$selected = $value == $currency_membership ? ' selected="selected" ' : '';
echo "<option {$selected} value='{$value}'>{$value}</option>";
}
?>
</select>
<p class="note"><?php
_e('Please select your curreny symbol which will be used in s2member for payment.', 'iamd_text_domain');
?>
</p>
</div>
</div>
示例9: dt_woocommerce_output_upsells
function dt_woocommerce_output_upsells()
{
$page_layout = dt_theme_option('woo', "product-layout");
$page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
$upsell_products = $page_layout === "content-full-width" ? 4 : 3;
$output = "";
ob_start();
woocommerce_upsell_display($upsell_products, $upsell_products);
// X products, X columns
$content = ob_get_clean();
if ($content) {
$content = str_replace('<h2>', '<h2 class="border-title"><span>', $content);
$output .= "<div class='upsell-products-container'>{$content}</div>";
}
echo $output;
}
示例10: checked
echo $switchclass;
?>
"></div>
<input id="<?php
echo "sb-gallery-" . $social_bookmark['id'];
?>
" type="checkbox" value="<?php
echo $social_bookmark['id'];
?>
"
name="mytheme[integration][<?php
echo "sb-gallery-" . $social_bookmark['id'];
?>
]"
<?php
checked($social_bookmark['id'], dt_theme_option('integration', "sb-gallery-" . $social_bookmark['id']));
?>
class="hidden"/>
</div>
</div>
<?php
$count++;
}
?>
</div>
</div><!-- Social Bookmark module end-->
</div>
</div><!-- .bpanel-main-content end-->
</div><!-- #integration end-->
示例11: get_header
<?php
get_header();
#Getting meta values...
$page_layout = dt_theme_option('events', 'tt-event-detail-layout');
get_template_part('includes/breadcrumb_section');
?>
<div id="main">
<!-- main-content starts here -->
<div id="main-content">
<div class="container">
<div class="dt-sc-hr-invisible"></div>
<div class="dt-sc-hr-invisible"></div>
<?php
if ($page_layout == 'with-left-sidebar') {
?>
<section class="secondary-sidebar secondary-has-left-sidebar" id="secondary-left"><?php
get_sidebar('left');
?>
</section>
<?php
} elseif ($page_layout == 'with-both-sidebar') {
?>
<section class="secondary-sidebar secondary-has-both-sidebar" id="secondary-left"><?php
get_sidebar('left');
?>
</section>
<?php
}
示例12: wp_nav_menu
</div>
<div class="copyright">
<div class="container"><?php
#Footer Menu...
wp_nav_menu(array('theme_location' => 'secondary-menu', 'container' => false, 'menu_class' => 'footer-links', 'fallback_cb' => 'dt_theme_footer_navigation'));
?>
<?php
if (dt_theme_option('general', 'show-copyrighttext') != '') {
?>
<p><?php
echo wp_kses(stripslashes(dt_theme_option('general', 'copyright-text')), $dt_allowed_html_tags);
?>
</p>
<?php
}
?>
</div>
</div>
</footer><!-- footer ends here -->
</div><!-- **Inner Wrapper - End** -->
</div><!-- **Wrapper - End** -->
<?php
if (dt_theme_option('integration', 'enable-body-code') != '') {
echo '<script type="text/javascript">' . wp_kses(stripslashes(dt_theme_option('integration', 'body-code')), $dt_allowed_html_tags) . '</script>';
}
wp_footer();
?>
</body>
</html>
示例13: dt_theme_custom_widgetarea_list
function dt_theme_custom_widgetarea_list($id, $selected = "", $class = "mytheme_select")
{
$name = explode(",", $id);
if (count($name) > 1) {
$name = "[{$name[0]}][{$name[1]}]";
} else {
$name = "[{$name[0]}]";
}
$name = $class == "multidropdown" ? "mytheme{$name}[]" : "mytheme{$name}";
$widgets = dt_theme_option('widgetarea', 'custom');
$widgets = is_array($widgets) ? array_unique($widgets) : array();
$widgets = array_filter($widgets);
$output = "<select name='{$name}' class='{$class}'>";
$output .= "<option value=''>" . __('Select Widget Area', 'iamd_text_domain') . "</option>";
foreach ($widgets as $widget) {
$id = mb_convert_case($widget, MB_CASE_LOWER, "UTF-8");
$id = str_replace(" ", "-", $id);
$output .= "<option value='{$id}' " . selected($selected, $id, false) . ">{$widget}</option>";
}
$output .= "</select>\n";
return $output;
}
示例14: dt_theme_enqueue_styles
function dt_theme_enqueue_styles()
{
$dt_theme_options = get_option(IAMD_THEME_SETTINGS);
$dt_theme_general = $dt_theme_options['general'];
$template_uri = get_template_directory_uri();
if (isset($dt_theme_general['enable-favicon'])) {
$url = !empty($dt_theme_general['favicon-url']) ? $dt_theme_general['favicon-url'] : $template_uri . "/images/favicon.png";
echo "<link href='{$url}' rel='shortcut icon' type='image/x-icon' />\n";
$phone_url = !empty($dt_theme_general['apple-favicon']) ? $dt_theme_general['apple-favicon'] : $template_uri . "/images/apple-touch-icon.png";
echo "<link href='{$phone_url}' rel='apple-touch-icon-precomposed'/>\n";
$phone_retina_url = !empty($dt_theme_general['apple-retina-favicon']) ? $dt_theme_general['apple-retina-favicon'] : $template_uri . "/images/apple-touch-icon-114x114.png";
echo "<link href='{$phone_retina_url}' sizes='114x114' rel='apple-touch-icon-precomposed'/>\n";
$ipad_url = !empty($dt_theme_general['apple-ipad-favicon']) ? $dt_theme_general['apple-ipad-favicon'] : $template_uri . "/images/apple-touch-icon-72x72.png";
echo "<link href='{$ipad_url}' sizes='72x72' rel='apple-touch-icon-precomposed'/>\n";
$ipad_retina_url = !empty($dt_theme_general['apple-ipad-retina-favicon']) ? $dt_theme_general['apple-ipad-retina-favicon'] : $template_uri . "/images/apple-touch-icon-144x144.png";
echo "<link href='{$ipad_retina_url}' sizes='144x144' rel='apple-touch-icon-precomposed'/>\n";
}
if (dt_theme_is_plugin_active('timetable/timetable.php')) {
wp_dequeue_style(array('timetable_sf_style', 'timetable_style', 'timetable_event_template', 'timetable_responsive_style', 'timetable_font_lato'));
wp_register_style('tt-sf-style', $template_uri . '/css/timetable/superfish.css');
wp_register_style('tt-main-style', $template_uri . '/css/timetable/style.css');
wp_register_style('tt-template-style', $template_uri . '/css/timetable/event_template.css');
wp_register_style('tt-responsive-style', $template_uri . '/css/timetable/responsive.css');
wp_enqueue_style(array('tt-sf-style', 'tt-main-style', 'tt-template-style', 'tt-responsive-style'));
}
#Main Style...
wp_enqueue_style('default', get_stylesheet_uri());
wp_enqueue_style("css-tooltips", $template_uri . "/css/tooltips.css");
#Dark Skin...
if (dt_theme_option('appearance', 'dark-skin')) {
wp_enqueue_style("light-dark", $template_uri . "/dark/dark-skin.css");
}
#Skin...
if ($theme = dt_theme_option('appearance', 'skin')) {
wp_enqueue_style("skin", $template_uri . "/skins/{$theme}/style.css");
} else {
wp_enqueue_style("skin", $template_uri . "/skins/blue/style.css");
}
#Disable Slider for Mobile Devices...
$dt_theme_mobile = !empty($dt_theme_options['mobile']) ? $dt_theme_options['mobile'] : "";
if (isset($dt_theme_mobile['is-slider-disabled'])) {
$out = '<style type="text/css">';
$out .= '@media only screen and (max-width:320px), (max-width: 479px), (min-width: 480px) and (max-width: 767px), (min-width: 768px) and (max-width: 959px),
(max-width:1200px) { #slider { display:none !important; } }';
$out .= '</style>';
echo $out;
}
#Loader Css...
if (dt_theme_option('general', 'loading-bar') != "true") {
wp_enqueue_style("pace-load", $template_uri . "/css/pace-theme-loading-bar.css");
}
wp_enqueue_style('font-awesome', $template_uri . '/css/font-awesome.min.css');
wp_enqueue_style('fancybox', $template_uri . '/css/jquery.fancybox.css');
if (!is_singular('product')) {
wp_enqueue_style('prettyphoto', $template_uri . '/css/prettyPhoto.css');
}
#WooCommerce...
if (dt_theme_is_plugin_active('woocommerce/woocommerce.php')) {
wp_enqueue_style('woocommerce', $template_uri . '/framework/woocommerce/css/style.css');
}
#RTL...
if (is_rtl()) {
wp_enqueue_style('rtl', $template_uri . '/rtl.css');
}
#Media Styles...
if (dt_theme_option('mobile', 'is-theme-responsive')) {
wp_enqueue_style("responsive", $template_uri . "/css/responsive.css");
}
#jQuery Scripts...
wp_enqueue_script('modernizr-custom', $template_uri . '/framework/js/public/modernizr.custom.js', array('jquery'));
wp_enqueue_script('jquery');
if (dt_theme_option('general', 'loading-bar') != "true") {
wp_enqueue_script('jq.pacemin', $template_uri . '/framework/js/public/pace.min.js');
wp_localize_script('jq.pacemin', 'paceOptions', array('restartOnRequestAfter' => 'false', 'restartOnPushState' => 'false'));
}
}
示例15: dt_theme_option
$name = "mytheme[specialty][message-font-color]";
$value = dt_theme_option('specialty', 'message-font-color') != NULL ? dt_theme_option('specialty', 'message-font-color') : "#";
$tooltip = __("Pick a custom color for 404 message font color of the theme e.g. #a314a3", 'iamd_text_domain');
?>
<h6> <?php
echo $label;
?>
</h6>
<?php
dt_theme_admin_color_picker("", $name, $value, '');
?>
</div><!-- Font Color Section -->
<div class="column one-half last">
<?php
dt_theme_admin_jqueryuislider(__('Message Font Size', 'iamd_text_domain'), "mytheme[specialty][message-font-size]", dt_theme_option('specialty', "message-font-size"));
?>
</div>
</div>
<?php
}
?>
<!-- 404 Content End-->
</div><!-- .bpanel-box end -->
</div><!-- .tab-content end -->
<?php
}
?>
</div>