本文整理汇总了PHP中vw_get_option函数的典型用法代码示例。如果您正苦于以下问题:PHP vw_get_option函数的具体用法?PHP vw_get_option怎么用?PHP vw_get_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vw_get_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: vw_setup_rtl
function vw_setup_rtl()
{
$site_enable_rtl = vw_get_option('site_enable_rtl');
if ($site_enable_rtl) {
wp_enqueue_style('vwcss-bootstrap-rtl', get_template_directory_uri() . '/css/bootstrap-rtl.css', array('vwcss-theme'), VW_THEME_VERSION);
wp_enqueue_style('vwcss-rtl', get_template_directory_uri() . '/css/rtl.css', array('vwcss-theme'), VW_THEME_VERSION);
add_filter('body_class', 'vw_body_class_rtl');
}
}
示例2: vw_custom_post_gallery
function vw_custom_post_gallery($null, $attr = array())
{
global $post, $wp_locale;
static $instance = 0;
$instance++;
extract(shortcode_atts(array('order' => 'ASC', 'orderby' => 'menu_order ID', 'id' => $post->ID, 'itemtag' => 'figure', 'captiontag' => 'figcaption', 'columns' => 3, 'size' => 'vw_medium', 'include' => '', 'exclude' => ''), $attr));
$id = intval($id);
if ('RAND' == $order) {
$orderby = 'none';
}
if (!empty($include)) {
$include = preg_replace('/[^0-9,]+/', '', $include);
$_attachments = get_posts(array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby));
$attachments = array();
foreach ($_attachments as $key => $val) {
$attachments[$val->ID] = $_attachments[$key];
}
} elseif (!empty($exclude)) {
$exclude = preg_replace('/[^0-9,]+/', '', $exclude);
$attachments = get_children(array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby));
} else {
$attachments = get_children(array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby));
}
if (empty($attachments)) {
return '';
}
if (is_feed()) {
$output = "\n";
foreach ($attachments as $att_id => $attachment) {
$output .= wp_get_attachment_link($att_id, $size, true) . "\n";
}
return $output;
}
$itemtag = tag_escape($itemtag);
$captiontag = tag_escape($captiontag);
$float = is_rtl() ? 'right' : 'left';
$gallery_layout = vw_get_option('blog_custom_gallery_layout', '213');
$output = "<div id='gallery-{$instance}' class='custom-gallery galleryid-{$id} clearfix' data-gallery-layout='{$gallery_layout}'>";
if ($itemtag != '' && $captiontag != '') {
$i = 1;
foreach ($attachments as $id => $attachment) {
$link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, false, false);
$link = str_replace('<a', '<a title="' . $attachment->post_excerpt . '" ', $link);
$output .= "<{$itemtag} class='gallery-item'>";
$output .= "{$link}";
if ($captiontag && trim($attachment->post_excerpt)) {
$output .= "\r\n\t\t\t\t\t<{$captiontag} class='gallery-caption'>\r\n\t\t\t\t\t" . wptexturize($attachment->post_excerpt) . "\r\n\t\t\t\t\t</{$captiontag}>";
}
$output .= "</{$itemtag}>";
$i++;
}
}
$output .= "</div>\n";
return $output;
}
示例3: vw_enqueue_front_assets
function vw_enqueue_front_assets()
{
wp_enqueue_script('vwjs-main', get_template_directory_uri() . '/js/main.js', array('jquery', 'jquery-effects-fade', 'vwjs-fitvids', 'vwjs-isotope', 'vwjs-flexslider', 'vwjs-swipebox', 'vwjs-asset'), VW_THEME_VERSION, true);
if (vw_get_option('icon_elusive')) {
wp_enqueue_style('vwcss-icon-elusive');
}
if (vw_get_option('icon_awesome')) {
wp_enqueue_style('vwcss-icon-awesome');
}
if (vw_get_option('icon_iconic')) {
wp_enqueue_style('vwcss-icon-iconic');
}
if (vw_get_option('icon_typicons')) {
wp_enqueue_style('vwcss-icon-typicons');
}
wp_enqueue_style('vwcss-theme', get_template_directory_uri() . '/css/SdTV.css', array('vwcss-flexslider', 'vwcss-icon-social', 'vwcss-icon-entypo', 'vwcss-icon-symbol', 'vwcss-swipebox', 'vwcss-bootstrap'), VW_THEME_VERSION);
}
示例4: vw_render_default_flexslider
function vw_render_default_flexslider()
{
?>
$( '.flexslider' ).flexslider({
animation: "<?php
echo vw_get_option('flexslider_animation');
?>
",
easing: "<?php
echo vw_get_option('flexslider_easing');
?>
",
slideshow: <?php
echo vw_get_option('flexslider_slideshow') ? 'true' : 'false';
?>
,
slideshowSpeed: <?php
echo vw_get_option('flexslider_slideshowspeed');
?>
,
animationSpeed: <?php
echo vw_get_option('flexslider_animationspeed');
?>
,
randomize: <?php
echo vw_get_option('flexslider_randomize') ? 'true' : 'false';
?>
,
pauseOnHover: <?php
echo (bool) vw_get_option('flexslider_pauseonhover') ? 'true' : 'false';
?>
,
prevText: '',
nextText: '',
start: function( slider ) {
slider.css( 'opacity', '1' );
slider.find( '.post-thumbnail-wrapper' ).css( 'height', '500px' ).imgLiquid().fadeIn(250);
},
});
<?php
}
示例5: get_template_part
?>
<div id="page-wrapper" class="container">
<div class="row">
<div id="page-content" class="col-sm-7 col-md-8">
<?php
if (have_posts()) {
?>
<?php
get_template_part('templates/page-title');
?>
<?php
$blog_layout = vw_get_option('blog_layout');
?>
<?php
if ('classic' == $blog_layout) {
?>
<div class="row archive-posts post-box-list">
<?php
while (have_posts()) {
the_post();
?>
<div class="col-sm-12 post-box-wrapper">
<?php
get_template_part('templates/post-box/classic', get_post_format());
?>
示例6: get_sidebar
<footer id="footer">
<?php
get_sidebar('footer');
?>
<div class="copyright">
<div class="container">
<div class="row">
<div class="col-sm-11 copyright-left"><?php
echo vw_get_option('copyright_text');
?>
</div>
<div class="col-sm-1 copyright-right">
<a class="back-to-top" href="#top">↑ <?php
_e('Back to top', 'envirra');
?>
</a>
</div>
</div>
</div>
</div>
</footer>
</div> <!-- Off canvas body inner -->
<?php
wp_footer();
?>
</body>
</html>
示例7: vw_options_saved
function vw_options_saved()
{
if (function_exists('icl_register_string')) {
$copyright_text = vw_get_option('copyright_text');
icl_register_string(VW_THEME_NAME . ' Copyright', strtolower(VW_THEME_NAME . '_copyright'), $copyright_text);
}
}
示例8: urlencode
<a class="social-digg" href="http://digg.com/submit?phase=2&url=<?php
echo urlencode(get_permalink());
?>
&bodytext=&tags=&title=<?php
echo esc_attr(the_title('', '', false));
?>
" target="_blank" title="<?php
esc_attr_e('Share on Digg', 'envirra');
?>
"><i class="icon-social-digg"></i></a>
<?php
}
?>
<?php
if (vw_get_option('sharebox_email')) {
?>
<a class="social-email" href="mailto:?subject=<?php
echo esc_attr(the_title('', '', false));
?>
&body=<?php
echo urlencode(get_permalink());
?>
" title="<?php
esc_attr_e('Share on E-Mail', 'envirra');
?>
" target="_blank"><i class="icon-social-email"></i></a>
<?php
}
?>
</div>
示例9: woocommerce_get_page_id
<div class="sidebar-inner">
<?php
if (is_page() || function_exists('is_woocommerce') && is_woocommerce()) {
/* Page Sidebar */
if (function_exists('is_woocommerce') && is_woocommerce()) {
$page_id = woocommerce_get_page_id('shop');
} else {
$page_id = get_the_id();
}
$page_sidebar = get_post_meta($page_id, 'vw_page_sidebar', true);
dynamic_sidebar($page_sidebar);
} else {
/* Blog Sidebar */
$blog_sidebar = vw_get_option('blog_sidebar');
dynamic_sidebar($blog_sidebar);
}
?>
</div>
示例10: vw_render_custom_css
//.........这里部分代码省略.........
background-color: <?php
echo $vw_presso['color_header_bg'];
?>
;
color: <?php
echo $vw_presso['color_header_font'];
?>
;
}
/* Main Navigation Colors */
.main-nav-bar {
background-color: <?php
echo $vw_presso['color_nav_bg'];
?>
;
}
.main-nav-bar, .main-nav > .menu-item > a {
color: <?php
echo $vw_presso['color_nav_font'];
?>
;
}
.main-nav .menu-item:hover > .menu-link,
.main-nav > .current-menu-ancestor > a,
.main-nav > .current-menu-item > a {
background-color: <?php
echo $vw_presso['color_nav_highlight'];
?>
;
color: <?php
echo $vw_presso['color_nav_highlight_font'];
?>
;
}
/* Widgets */
.widget_vw_widget_social_subscription .social-subscription:hover .social-subscription-icon { background-color: <?php
echo $vw_presso['color_primary'];
?>
; }
.widget_vw_widget_social_subscription .social-subscription:hover .social-subscription-count { color: <?php
echo $vw_presso['color_primary'];
?>
; }
.widget_vw_widget_categories a:hover { color: <?php
echo $vw_presso['color_primary'];
?>
; }
/* Footer Colors */
#footer {
background-color: <?php
echo $vw_presso['color_footer_bg'];
?>
;
}
#footer .widget-title {
color: <?php
echo $vw_presso['color_primary'];
?>
;
}
#footer,
#footer .title,
#footer .comment-author,
#footer .social-subscription-count
{ color: <?php
echo $vw_presso['color_footer_font'];
?>
; }
.copyright {
background-color: <?php
echo $vw_presso['color_copyright_bg'];
?>
;
}
.copyright, .copyright a {
color: <?php
echo $vw_presso['color_copyright_font'];
?>
;
}
/* Custom Styles */
<?php
do_action('vw_render_custom_css');
?>
<?php
echo vw_get_option('custom_css');
?>
</style>
<?php
}
示例11: the_ID
<article class="post-<?php
the_ID();
?>
post-box fly-in animated-content post-box-large-thumbnail">
<?php
if (has_post_thumbnail()) {
?>
<div class="post-thumbnail-wrapper">
<?php
$video_url = get_post_meta(get_the_ID(), 'vw_post_format_video_oembed', true);
if (vw_get_option('blog_show_video_player_for_thumbnail') && 'video' == get_post_format() && !empty($video_url)) {
?>
<a class="swipebox swipebox-video" href="<?php
echo $video_url;
?>
" title="<?php
printf(esc_attr__('Permalink to %s', 'envirra'), the_title_attribute('echo=0'));
?>
" rel="youtube">
<span class="post-play-video"></span>
<?php
} else {
?>
<a href="<?php
the_permalink();
?>
" title="<?php
printf(esc_attr__('Permalink to %s', 'envirra'), the_title_attribute('echo=0'));
?>
" rel="bookmark">
示例12: vw_get_option
}
?>
<?php
$fav_icon_ipad = vw_get_option('fav_icon_ipad');
if (!empty($fav_icon_ipad['url'])) {
?>
<link rel="apple-touch-icon" sizes="72x72" href="<?php
echo esc_url($fav_icon_ipad['url']);
?>
"><?php
}
?>
<?php
$fav_icon_ipad_retina = vw_get_option('fav_icon_ipad_retina');
if (!empty($fav_icon_ipad_retina['url'])) {
?>
<link rel="apple-touch-icon" sizes="144x144" href="<?php
echo esc_url($fav_icon_ipad_retina['url']);
?>
"><?php
}
?>
<link rel="pingback" href="<?php
bloginfo('pingback_url');
?>
" />
<?php
示例13: _e
} else {
?>
<h2><?php
_e('Not Found', 'envirra');
?>
</h2>
<?php
}
?>
</div>
<?php
if ($enable_sidebar) {
?>
<aside id="page-sidebar" class="sidebar-wrapper col-sm-5 col-md-4">
<div class="sidebar-inner">
<?php
dynamic_sidebar(vw_get_option('bbpress_sidebar'));
?>
</div>
</aside>
<?php
}
?>
</div>
</div>
<?php
get_footer();
示例14: get_post_meta
echo $review_summary;
?>
</p>
<?php
}
?>
<div class="review-box-dial">
<?php
$avg_score = get_post_meta(get_the_id(), 'vw_review_average_score', true);
?>
<input type="text" value="<?php
echo esc_attr($avg_score);
?>
" class="dial" data-readOnly="true" data-width="150" data-height="150" data-thickness="0.12" data-min="0" data-max="10" data-displayPrevious="true" data-fgColor="<?php
echo vw_get_option('color_primary');
?>
">
</div>
<div class="chart-bars">
<?php
$counter = 1;
for ($counter = 1; $counter <= 10; $counter++) {
$label = get_post_meta(get_the_id(), 'vw_review_score_' . $counter . '_label', true);
$score = get_post_meta(get_the_id(), 'vw_review_score_' . $counter . '_score', true);
if (empty($score)) {
break;
}
?>
<div class="chart-bar">
示例15: vw_body_class_options
function vw_body_class_options($classes)
{
// Site layout option
$site_layout = vw_get_option('site_layout');
if (empty($site_layout) || !$site_layout) {
$site_layout = 'full-large';
}
$classes[] = sprintf('site-layout-%s', $site_layout);
// Post box effect option
$site_enable_post_box_effects = vw_get_option('site_enable_post_box_effects');
if ($site_enable_post_box_effects == '1') {
$classes[] = 'site-enable-post-box-effects';
} else {
$classes[] = 'site-disable-post-box-effects';
}
return $classes;
}