本文整理汇总了PHP中vp_option函数的典型用法代码示例。如果您正苦于以下问题:PHP vp_option函数的具体用法?PHP vp_option怎么用?PHP vp_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vp_option函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: jobboard_option
function jobboard_option($name)
{
if (function_exists('vp_option')) {
return vp_option("jobboard_option." . $name);
}
//endif;
}
开发者ID:bunnywong,项目名称:freshlinker,代码行数:7,代码来源:theme-admin.php
示例2: vp_pf_option
function vp_pf_option($key, $default = null)
{
if (!function_exists('vp_option')) {
return $default;
}
return vp_option(VP_PF_OPTION_KEY . '.' . $key, $default);
}
开发者ID:GaryJones,项目名称:m2xdemo,代码行数:7,代码来源:helpers.php
示例3: charityHomeLayoutSetUp
function charityHomeLayoutSetUp()
{
$home_1_select = vp_option("vpt_option.charity_home_1_select");
$home_2_select = vp_option("vpt_option.charity_home_2_select");
$home_3_select = vp_option("vpt_option.charity_home_3_select");
$home_shoplanding = vp_option("vpt_option.charity_home_shoplanding");
$home_layout = vp_option("vpt_option.home_layout");
switch ($home_layout) {
case "one":
update_option("show_on_front", "page");
update_option('page_on_front', $home_1_select);
break;
case "two":
update_option("show_on_front", "page");
update_option('page_on_front', $home_2_select);
break;
case "three":
update_option("show_on_front", "page");
update_option('page_on_front', $home_3_select);
break;
case "shoplanding":
update_option("show_on_front", "page");
update_option('page_on_front', $home_shoplanding);
break;
default:
$front_page_id = get_option('page_on_front');
$templatePage = get_post_meta($front_page_id, "_wp_page_template", true);
if ($templatePage == "charity-home-one.php" || $templatePage == "charity-home-two.php" || $templatePage == "charity-home-three.php" || $templatePage == "charity-shop-landing.php") {
update_option("show_on_front", "posts");
update_option('page_on_front', "");
}
break;
}
}
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:34,代码来源:charity-option-after-oneclick.php
示例4: get_option
public function get_option($name, $get_default = true)
{
$option = vp_option("wp_tiles." . $name);
if ($get_default && is_null($option)) {
$option = $this->get_defaults($name);
}
return apply_filters('wp_tiles_option_' . $name, $option, $get_default);
}
开发者ID:wir,项目名称:WP-Tiles,代码行数:8,代码来源:Options.php
示例5: charity_login_logo
function charity_login_logo() {
$site_logo = (vp_option('vpt_option.site_logo')) ? vp_option('vpt_option.site_logo') : get_stylesheet_directory_uri() . "/assets/img/logo.png";
$color = (vp_option('vpt_option.theme_color')) ? vp_option('vpt_option.theme_color') : '#ffffff';
echo "<style type='text/css'>
body.login div#login h1 a{ background-image: url('" . esc_url($site_logo) . "') !important; }
body.login{ background-color: " . esc_attr($color) . "!important; }
</style>";
}
开发者ID:kautzar,项目名称:drpp4,代码行数:8,代码来源:login-form.php
示例6: charityProjectPostDetailsLayout
function charityProjectPostDetailsLayout()
{
$layoutOption = vp_option("vpt_option.charity-project-single-layout");
if ($layoutOption == "sidebar") {
get_template_part("content/project/project", "detail-withsidebar");
} else {
get_template_part("content/project/project", "detail");
}
}
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:9,代码来源:project-hooks.php
示例7: charity_global_donation_button_shortcode
function charity_global_donation_button_shortcode($atts, $content = null)
{
$causesId = vp_option("vpt_option.charity_global_donation_cause_id");
if (!empty($causesId)) {
$content = '<a data-toggle="modal" href="javascript:;" data-id="' . $causesId . '" data-target=".donate-form" class="btn btn-default charity-global-causes-' . $causesId . ' charity-donation-button">' . __("DONATE NOW", "charity") . '</a>';
} else {
$content = __("Select causes for global donation", "charity");
}
return $content;
}
开发者ID:kautzar,项目名称:drpp4,代码行数:10,代码来源:general.php
示例8: jeg_load_shortcode
function jeg_load_shortcode()
{
/** General shortcode */
new VP_ShortcodeGenerator(array('name' => 'generalshortcode', 'template' => locate_template(array('admin/shortcode/generalshortcode.php'), true, true), 'modal_title' => 'Jkreativ General Shortocde', 'button_title' => 'Jkreativ General Shortocde', 'types' => array('post', 'page', 'portfolio'), 'included_pages' => array(''), 'main_image' => get_template_directory_uri() . '/assets/img/jshortcode.png', 'sprite_image' => get_template_directory_uri() . '/assets/img/jshortcode.png'));
/** Page builder Shortcode **/
if (vp_option('joption.enable_section_builder')) {
new VP_ShortcodeGenerator(array('name' => 'sectionshortcode', 'template' => locate_template(array('admin/shortcode/sectionshortcode.php'), true, true), 'modal_title' => 'Jkreativ Section Shortcode', 'button_title' => 'Jkreativ Section Shortcode', 'types' => array('page', 'portfolio'), 'included_pages' => array(''), 'main_image' => get_template_directory_uri() . '/assets/img/sshortcode.png', 'sprite_image' => get_template_directory_uri() . '/assets/img/sshortcode.png'));
}
/** Page builder Shortcode **/
new VP_ShortcodeGenerator(array('name' => 'creditshortcode', 'template' => locate_template(array('admin/shortcode/creditshortcode.php'), true, true), 'modal_title' => 'Jkreativ Credit Shortocde', 'button_title' => 'Jkreativ Credit Shortocde', 'types' => array(), 'included_pages' => array('toplevel_page_jeg_option'), 'main_image' => get_template_directory_uri() . '/assets/img/cshortcode.png', 'sprite_image' => get_template_directory_uri() . '/assets/img/cshortcode.png'));
}
开发者ID:OpenDoorBrewCo,项目名称:odbc-wp-prod,代码行数:11,代码来源:shortcode.php
示例9: setup
function setup()
{
$options = vp_option('vpt_option');
add_theme_support('soil-clean-up');
// Enable clean up from Soil
add_theme_support('soil-relative-urls');
// Enable relative URLs from Soil
add_theme_support('soil-nice-search');
// Enable nice search from Soil
add_theme_support('soil-google-analytics', $options['ga_id']);
// Enable Google Analytics
//add_theme_support('soil-jquery-cdn'); // Enable jQuery from the Google CDN
//add_theme_support('soil-js-to-footer'); // Enable js to footer
add_theme_support('soil-nav-walker');
// Enable clean nav walker
add_theme_support('bootstrap-gallery');
// Enable Bootstrap Gallery
// Make theme available for translation
// Community translations can be found at https://github.com/roots/sage-translations
load_theme_textdomain('sage', get_template_directory() . '/lang');
// Enable plugins to manage the document title
// http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
add_theme_support('title-tag');
// Register wp_nav_menu() menus
// http://codex.wordpress.org/Function_Reference/register_nav_menus
register_nav_menus(['primary_navigation' => __('Primary Navigation', 'sage')]);
// Add post thumbnails
// http://codex.wordpress.org/Post_Thumbnails
// http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
// http://codex.wordpress.org/Function_Reference/add_image_size
add_theme_support('post-thumbnails');
add_image_size('slider', 1200, 600, true);
//update_option( 'medium_crop', 1 ); //Turn on image crop at medium size
// Add post formats
// http://codex.wordpress.org/Post_Formats
//add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
// Add HTML5 markup for captions
// http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
add_theme_support('html5', ['caption', 'comment-form', 'comment-list', 'gallery', 'search-form']);
// Tell the TinyMCE editor to use a custom stylesheet
add_editor_style(Assets\asset_path('styles/editor-style.css'));
// Allow shortcode execution in widgets
add_filter('widget_text', 'do_shortcode');
// Gets rid of the word "Archive:" in front of the Archive title
add_filter('get_the_archive_title', function ($title) {
if (is_post_type_archive()) {
$title = post_type_archive_title();
}
return $title;
});
//remove_filter( 'the_content', 'wpautop' );
}
开发者ID:rku4er,项目名称:vafpress-wp,代码行数:52,代码来源:setup.php
示例10: footer
function footer()
{
$layoutOption = vp_option("vpt_option.footer_layout");
$slug = "content/footer/one";
switch ($layoutOption) {
case "two":
$slug = "content/footer/two";
break;
case "three":
$slug = "content/footer/three";
break;
default:
$slug = "content/footer/one";
break;
}
get_template_part($slug);
}
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:17,代码来源:page-layout.php
示例11: bgImage
function bgImage($args)
{
if (!empty($args['template_file'])) {
$id = charity_get_page_template($args['template_file'], $by = "ID");
} else {
global $post;
$id = $post->ID;
}
$bgImage = vp_metabox('breadcrumb.image', '', $id);
$bgDefaultImage = vp_option('vpt_option.img_404');
if (!empty($bgImage)) {
printf('style="background-image:url(%s)"', $bgImage);
} else {
printf('style="background-image:url(%s)"', $bgDefaultImage);
//default image
}
}
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:17,代码来源:breadcrumb-hooks.php
示例12: option
/**
* Access a VafPress option with optional default value
*/
public static function option($name, $default = null)
{
$option = vp_option('wpurp_option.' . $name);
if (is_null($default)) {
$default = self::get()->helper('vafpress_menu')->defaults($name);
}
// Chicory specific check
if ('partners_integrations_chicory_enable' == $name && '1' == $option) {
$option = vp_option('wpurp_option.partners_integrations_chicory_terms');
if (count($option) == 0) {
$option = '';
} else {
$option = '1';
}
}
return is_null($option) ? $default : $option;
}
开发者ID:elidagomez,项目名称:mdpecanland,代码行数:20,代码来源:wp-ultimate-recipe.php
示例13: charity_vc_become_volunteer
function charity_vc_become_volunteer($atts, $content = null)
{
extract(shortcode_atts(array('step_1' => '', 'title_1' => '', 'content_1' => '', 'step_2' => '', 'title_2' => '', 'content_2' => '', 'step_3' => '', 'title_3' => '', 'content_3' => '', 'step_4' => '', 'title_4' => '', 'content_4' => ''), $atts, 'volunteer'));
$return = "";
$return .= "<section class='process-section text-center'>";
$return .= "<header class='page-header section-header clearfix'>";
$return .= "<h2>" . vp_option('vpt_option.ch_volunteer_process_title') . "</h2>";
$return .= "</header>";
$return .= "<div class='row processes'>";
$return .= do_shortcode("[volunteer step='" . $step_1 . "' title='" . $title_1 . "']" . $content_1 . "[/volunteer]");
$return .= do_shortcode("[volunteer step='" . $step_2 . "' title='" . $title_2 . "']" . $content_2 . "[/volunteer]");
$return .= do_shortcode("[volunteer step='" . $step_3 . "' title='" . $title_3 . "']" . $content_3 . "[/volunteer]");
$return .= do_shortcode("[volunteer step='" . $step_4 . "' title='" . $title_4 . "']" . $content_4 . "[/volunteer]");
$return .= do_shortcode("[charity_join_today_button][/charity_join_today_button]");
$return .= do_shortcode("[join_today_form][contact-form-7 id='356' title='Join Today'][/join_today_form]");
$return .= "</div>";
$return .= "</section>";
return $return;
}
开发者ID:kautzar,项目名称:drpp4,代码行数:19,代码来源:volunteer.php
示例14: wpbpscripts_and_styles
function wpbpscripts_and_styles()
{
if (!is_admin()) {
// register stylesheets and js
wp_register_style('wpbp-styles', CSS . 'wpbp.css', '', '', 'all');
wp_register_script('wpbp-scripts', JS . 'wpbp.js', array('jquery'), '', true);
// enqueue it all
wp_enqueue_style('wpbp-styles');
wp_enqueue_script('wpbp-scripts');
if (is_singular() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
// loading Google Fonts if chosen in global theme settings
$font_face = vp_option('wpbp_option.wpbp_body_font_face');
$font_weight = vp_option('wpbp_option.wpbp_body_font_weight');
$font_style = vp_option('wpbp_option.wpbp_body_font_style');
VP_Site_GoogleWebFont::instance()->add($font_face, $font_weight, $font_style);
VP_Site_GoogleWebFont::instance()->register_and_enqueue();
}
}
开发者ID:tgallimore,项目名称:wp-boilerplate,代码行数:20,代码来源:theme-setup.php
示例15: singlePage
function singlePage($author_id)
{
$chy_options = array();
$social_icons = vp_option('vpt_option.auther_social_linlk');
if (empty($social_icons)) {
return;
}
foreach ($social_icons as $social_icon) {
$chy_options[$social_icon] = array("title" => __($social_icon, "charity"), "font-class" => "fa fa-" . $social_icon);
}
if (count($chy_options) > 0) {
?>
<ul class="social-icons blog-page-author">
<?php
foreach ($chy_options as $key => $val) {
$this->setLink($key, $val['title'], $author_id, $val['font-class']);
}
?>
</ul>
<?php
}
}
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:22,代码来源:social-links.php
示例16: query_posts
* @package charity
* @since 1.3.0
*/
global $more, $charityHomeNews;
$more = 0;
$charityHomeNews = "latestNewsSection";
query_posts(array("post_type" => "post", "post_status" => "publish", "posts_per_page" => 3));
if (have_posts()) :
?>
<section class="latest-news ">
<div class="container">
<div class="row">
<div class="col-xs-12">
<header class="page-header section-header clearfix">
<h2 class="home-four-title"><?php echo vp_option('vpt_option.ch_hfour_latest_news_title'); ?></h2>
</header>
<div class="article-list row">
<?php while (have_posts()) : the_post(); ?>
<div class="items zoom col-xs-12 col-sm-4 charity-latest-news-home-one">
<?php
$format = (get_post_format()) ? get_post_format() : "standard";
get_template_part('content/format/' . $format);
?>
</div>
<?php endwhile; ?>
</div>
</div>
</div>
</div>
开发者ID:kautzar,项目名称:drpp4,代码行数:31,代码来源:home-four-news.php
示例17: array
?>
<?php
$args = array('post_type' => 'charity-causes', "post_status" => "publish", "posts_per_page" => 2);
global $more;
query_posts($args);
if (have_posts()) {
?>
<div class="col-xs-12 col-md-6 cause-summary">
<div class="row">
<div class="col-xs-12">
<h2><?php
echo vp_option('vpt_option.ch_htwo_allcauses_title');
?>
</h2>
</div>
<?php
while (have_posts()) {
the_post();
?>
<div class="col-xs-12 col-sm-6 col-md-6 one-block">
<div class="items zoom">
<?php
if (has_post_thumbnail()) {
?>
<a
href="<?php
the_permalink();
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:31,代码来源:home-two-causes.php
示例18: get_header
<?php
/**
* Custom Taxonomy: Courses /// course category
*/
?>
<?php
// print site header
get_header();
?>
<?php
// sidebar
$sidebar_class = '';
$sidebar_pos = vp_option('vpt_option.sidebar_position');
if ($sidebar_pos == 'left') {
$sidebar_class = ' col-lg-push-4 col-md-push-4';
}
?>
<div class="row no-gutter"><!-- row -->
<div class="col-lg-8 col-md-8<?php
echo $sidebar_class;
?>
"><!-- doc body wrapper -->
<div class="col-padded"><!-- inner custom column -->
<div class="row gutter"><!-- row -->
开发者ID:CUPolishSociety,项目名称:campolsoc,代码行数:31,代码来源:taxonomy-courses.php
示例19: adventure_tours_get_option
/**
* Returns theme option value.
*
* @param string $name option name.
* @param mixed $default default value.
* @return mixed
*/
function adventure_tours_get_option($name, $default = null)
{
return vp_option(VP_OPTION_KEY . '.' . $name, $default);
}
开发者ID:j-kenneth,项目名称:Expeero,代码行数:11,代码来源:functions.php
示例20: while
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="testimonial-slider flexslider">
<ul class="slides">
<?php
while (have_posts()) {
the_post();
$company = vp_metabox('testimonial.companey_name');
?>
<li>
<div class="slide">
<h2><?php
echo vp_option('vpt_option.ch_hOne_testimonial_title');
?>
</h2>
<blockquote>
<?php
the_content();
?>
<footer>
<span><?php
the_title();
?>
</span>
<?php
if (!empty($company)) {
?>
<cite>(<?php
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:31,代码来源:home-one-testimonial.php
注:本文中的vp_option函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论