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


PHP pl_setting函数代码示例

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


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

示例1: pagelines_body_classes

/**
 * PageLines Body Classes
 *
 * Sets up classes for controlling design and layout and is used on the body tag
 *
 */
function pagelines_body_classes()
{
    global $pagelines_addclasses, $plpg, $pl_custom_template;
    $special_body_class = pl_setting('special_body_class') ? pl_setting('special_body_class') : '';
    $classes = array();
    $classes[] = $special_body_class;
    // child theme name
    $classes[] = sanitize_html_class(strtolower(PL_CHILDTHEMENAME));
    // pro
    $classes[] = pl_is_pro() ? 'pl-pro-version' : 'pl-basic-version';
    // for backwards compatiblity, dms is:
    $classes[] = 'responsive';
    $classes[] = 'full_width';
    // externally added via global variable (string)
    if (isset($pagelines_addclasses) && $pagelines_addclasses) {
        $classes = array_merge($classes, (array) explode(' ', $pagelines_addclasses));
    }
    $template = isset($pl_custom_template['key']) ? $pl_custom_template['key'] : 'none';
    $classes[] = sprintf('template-%s', $template);
    // ensure no duplicates or empties
    $classes = array_unique(array_filter($classes));
    // filter & convert to string
    $body_classes = join(' ', (array) apply_filters('pagelines_body_classes', $classes));
    return $body_classes;
}
开发者ID:taeche,项目名称:SoDoEx,代码行数:31,代码来源:lib.body.php

示例2: section_template

    function section_template()
    {
        $loop = new fotosPostLoop();
        $artsep = pl_setting('ba_fotos_art_sep');
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                ?>
<article <?php 
                post_class('fotos-article');
                ?>
 id="post-<?php 
                the_ID();
                ?>
" itemscope="itemscope" itemtype="http://schema.org/BlogPosting" itemprop="blogPost"><?php 
                $loop->post_header();
                $loop->post_content();
                $loop->post_social();
                $loop->post_comments();
                ?>
</article><?php 
                if ($artsep && is_home()) {
                    echo $artsep;
                }
            }
        } else {
            echo 'Sorry no posts found';
        }
    }
开发者ID:adrian-sowinski,项目名称:fotos,代码行数:29,代码来源:section.php

示例3: pl_deprecate_v2

function pl_deprecate_v2()
{
    if (pl_setting('enable_v2')) {
        return false;
    } else {
        return true;
    }
}
开发者ID:zakikazmi,项目名称:TestGithub,代码行数:8,代码来源:lib.editor.php

示例4: custom_less_vars

 function custom_less_vars($less)
 {
     // Adding a custom LESS var, use this in LESS as @my-var. In this example, its linked to a custom color picker in options. We also must set a default or else it's going to error.
     // pl_hashify must be used with color pickers so that it appends the # symbol to the hex code
     // pl_setting is being used because this is a global option used in the theme
     $less['my-var'] = pl_setting('my_custom_color') ? pl_hashify(pl_setting('my_custom_color')) : 'f7f7f7';
     return $less;
 }
开发者ID:cliffordp,项目名称:pl-starter-theme,代码行数:8,代码来源:functions.php

示例5: section_template

 /**
  * Section template.
  */
 function section_template()
 {
     $second_menu = pl_setting('_second_nav_menu') ? pl_setting('_second_nav_menu') : null;
     if (isset($second_menu)) {
         wp_nav_menu(array('menu_class' => 'secondnav_menu fix lcolor3', 'menu' => $second_menu, 'container' => null, 'container_class' => '', 'depth' => 1, 'fallback_cb' => 'pagelines_page_subnav'));
     } elseif (pl_setting('nav_use_hierarchy')) {
         pagelines_page_subnav();
     }
 }
开发者ID:taeche,项目名称:SoDoEx,代码行数:12,代码来源:section.php

示例6: section_template

    function section_template()
    {
        $section_output = !$this->active_loading ? render_nested_sections($this->meta['content'], 1) : '';
        $style = '';
        $inner_style = '';
        // Use alt mode for this
        $title = $this->opt('pl_standard_title') ? sprintf('<h2 class="pl-section-title pla-from-top subtle pl-animation">%s</h2>', $this->opt('pl_standard_title')) : '';
        $inner_style .= $this->opt('pl_area_height') ? sprintf('min-height: %spx;', $this->opt('pl_area_height')) : '';
        $inner_classes = 'pl-inner area-region pl-sortable-area editor-row';
        $classes = '';
        // If there is no output, there should be no padding or else the empty area will have height.
        if ($section_output || $title != '') {
            // global
            $default_padding = pl_setting('section_area_default_pad', array('default' => '20'));
            // opt
            $padding = rtrim($this->opt('pl_area_pad', array('default' => $default_padding)), 'px');
            $padding_bottom = rtrim($this->opt('pl_area_pad_bottom', array('default' => $padding)), 'px');
            $style .= sprintf('padding-top: %spx; padding-bottom: %spx;', $padding, $padding_bottom);
            $content_class = $padding ? 'nested-section-area' : '';
            $buffer = pl_draft_mode() ? sprintf('<div class="pl-sortable pl-sortable-buffer span12 offset0"></div>') : '';
            $section_output = $buffer . $section_output . $buffer;
        } else {
            $pad_css = '';
            $content_class = '';
        }
        ?>
	<div class="pl-area-wrap <?php 
        echo $classes;
        ?>
" style="<?php 
        echo $style;
        ?>
">

		<div class="pl-content <?php 
        echo $content_class;
        ?>
">
			<?php 
        echo $title;
        ?>
			<div class="<?php 
        echo apply_filters('pl-area-inner-classes', $inner_classes, $this->meta);
        ?>
" style="<?php 
        echo apply_filters('pl-area-inner-style', $inner_style, $this->meta);
        ?>
">
				<?php 
        echo $section_output;
        ?>
			</div>
		</div>
	</div>
	<?php 
    }
开发者ID:taeche,项目名称:SoDoEx,代码行数:56,代码来源:section.php

示例7: save_layout

 function save_layout($response, $data)
 {
     $px = $data['store']['px'];
     $percent = $data['store']['percent'];
     pl_global_setting_update('content_width_px', $px);
     pl_global_setting_update('content_width_percent', $percent);
     $response['px'] = $px;
     $response['_px'] = pl_setting('content_width_px');
     return $response;
 }
开发者ID:taeche,项目名称:SoDoEx,代码行数:10,代码来源:editor.saving.php

示例8: add_google_imports

 function add_google_imports()
 {
     $gcss = $this->foundry->google_import($this->import_fonts, 'link');
     $added = pl_setting('font_extra') ? pl_setting('font_extra') : '';
     if ($gcss != '') {
         $gcss .= '|' . $added;
     } else {
         $gcss .= $added;
     }
     if ($gcss != '') {
         printf("<link id='master_font_import' rel='stylesheet' type='text/css' href='//fonts.googleapis.com/css?family=%s'>\n", $gcss);
     }
 }
开发者ID:zakikazmi,项目名称:TestGithub,代码行数:13,代码来源:editor.typography.php

示例9: fotos_less

 function fotos_less($less)
 {
     $less['fotos-header-bg-color'] = pl_setting('ba_fotos_post_header_bg_color') ? pl_hashify(pl_setting('ba_fotos_post_header_bg_color')) : '@pl-base';
     $less['fotos-post-title'] = pl_setting('ba_fotos_post_title_color') ? pl_hashify(pl_setting('ba_fotos_post_title_color')) : '@pl-text';
     $less['fotos-post-meta'] = pl_setting('ba_fotos_post_meta_color') ? pl_hashify(pl_setting('ba_fotos_post_meta_color')) : '@pl-text';
     $less['fotos-post-date'] = pl_setting('ba_fotos_post_date_color') ? pl_hashify(pl_setting('ba_fotos_post_date_color')) : '@pl-text';
     $less['fotos-post-social-txt'] = pl_setting('ba_fotos_post_social_txt_color') ? pl_hashify(pl_setting('ba_fotos_post_social_txt_color')) : '@pl-text';
     $less['fotos-post-comm-bg'] = pl_setting('ba_fotos_post_comm_bg') ? pl_hashify(pl_setting('ba_fotos_post_comm_bg')) : '@pl-base';
     $less['fotos-post-comm-bg-dr'] = pl_setting('ba_fotos_post_comm_drawer_bg') ? pl_hashify(pl_setting('ba_fotos_post_comm_drawer_bg')) : '@pl-base';
     $less['fotos-post-comm-txt'] = pl_setting('ba_fotos_post_comm_txt') ? pl_hashify(pl_setting('ba_fotos_post_comm_txt')) : '@pl-text';
     $less['fotos-widget-title-color'] = pl_setting('ba_fotos_widget_title_color') ? pl_hashify(pl_setting('ba_fotos_widget_title_color')) : '@pl-text';
     $less['fotos-box-shadow-color'] = pl_setting('ba_fotos_box_shadow_color') ? pl_hashify(pl_setting('ba_fotos_box_shadow_color')) : '#111';
     return $less;
 }
开发者ID:adrian-sowinski,项目名称:fotos,代码行数:14,代码来源:options.php

示例10: dms_debug

    function dms_debug()
    {
        ?>
		<form id="pl-dms-debug-form" class="dms-update-setting" data-setting="enable_debug" data-type="check">
			
			<input type="checkbox" name="enable_debug" class="input_enable_debug" <?php 
        checked(pl_setting('enable_debug'), 1);
        ?>
 />
			<input class="button button-primary" type="submit" value="<?php 
        _e('Update', 'pagelines');
        ?>
			" /><span class="saving-confirm"></span>
		</form>
		<?php 
    }
开发者ID:taeche,项目名称:SoDoEx,代码行数:16,代码来源:admin.editor.php

示例11: add_karma

 function add_karma($id = false, $args = array())
 {
     $defaults = array('classes' => '', 'attr' => '');
     $atts = wp_parse_args($args, $defaults);
     global $post;
     $id = $id ? $id : $post->ID;
     $output = $this->karma_post($id);
     $class = 'pl-karma pl-social-counter pl-social-pagelines';
     $title = __('Give Karma', 'pagelines');
     if (isset($_COOKIE['pl_karma_' . $id])) {
         $class = 'pl-karma loved';
         $title = __('You already gave karma!', 'pagelines');
     }
     $karma_icon = '' != pl_setting('karma_icon') ? pl_setting('karma_icon') : 'sun';
     return sprintf('<a href="#" class="%s %s" id="pl-karma-%s" title="%s" data-social="pagelines" %s> <span class="pl-social-icon"><i class="icon icon-%s"></i></span> <span class="pl-social-count">%s</span></a>', $class, $atts['classes'], $id, $title, $atts['attr'], $karma_icon, $output);
 }
开发者ID:benpeck,项目名称:experticity-fools,代码行数:16,代码来源:utils.karma.php

示例12: add_google_imports

 function add_google_imports()
 {
     $base_url = apply_filters('pagelines_gfont_baseurl', '//fonts.googleapis.com/css?family=');
     $gcss = $this->foundry->google_import($this->import_fonts, 'link');
     $added = pl_setting('font_extra') ? pl_setting('font_extra') : '';
     if ($added != '' && $gcss != '') {
         $gcss .= '|' . $added;
     } else {
         $gcss .= $added;
     }
     if (!$gcss) {
         return false;
     }
     $url = sprintf("%s%s", $base_url, $gcss);
     wp_enqueue_style('master_font_import', $url, false, pl_get_cache_key());
 }
开发者ID:taeche,项目名称:SoDoEx,代码行数:16,代码来源:editor.typography.php

示例13: menu_template

    function menu_template()
    {
        if (has_action('pl_no_mobile_menu')) {
            return;
        }
        $menu = pl_setting('primary_navigation_menu') ? pl_setting('primary_navigation_menu') : false;
        $menu2 = pl_setting('secondary_navigation_menu') ? pl_setting('secondary_navigation_menu') : false;
        ?>
		<div class="pl-mobile-menu">
			
			<?php 
        if ('1' !== pl_setting('mobile_menus_disable_search')) {
            pagelines_search_form(true, 'mm-search');
        }
        ?>
				
			<div class="mm-holder">
				
				
				<?php 
        if (is_array(wp_get_nav_menu_items($menu)) || has_nav_menu('mobile_nav')) {
            wp_nav_menu(array('menu_class' => 'mobile-menu primary-menu', 'menu' => $menu, 'container' => null, 'container_class' => '', 'depth' => 3, 'fallback_cb' => '', 'theme_location' => 'mobile_nav'));
        } else {
            pl_nav_fallback('mobile-menu primary-menu');
        }
        if (is_array(wp_get_nav_menu_items($menu2))) {
            wp_nav_menu(array('menu_class' => 'mobile-menu secondary-menu', 'menu' => $menu2, 'container' => null, 'container_class' => '', 'depth' => 3, 'fallback_cb' => ''));
        }
        $twitter = pl_setting('twittername');
        $facebook = pl_setting('facebook_name');
        ?>
				<div class="social-menu">
					
					<?php 
        if ($facebook) {
            printf('<a href="http://www.facebook.com/%s"><i class="mm-icon icon icon-large icon-facebook"></i></a>', $facebook);
        }
        if ($twitter) {
            printf('<a href="http://www.twitter.com/%s"><i class="mm-icon icon icon-large icon-twitter"></i></a>', $twitter);
        }
        ?>
				</div>
			</div>
		</div>
		<?php 
    }
开发者ID:taeche,项目名称:SoDoEx,代码行数:46,代码来源:mobile.menu.php

示例14: pl_navigation

function pl_navigation($args = array())
{
    $respond = isset($args['respond']) && !$args['respond'] ? '' : 'respond';
    $menu_classes = sprintf('menu-toggle mm-toggle %s', $respond);
    if ((!isset($args['menu']) || empty($args['menu'])) && !has_nav_menu($args['theme_location'])) {
        $out = sprintf('<ul class="inline-list pl-nav"><li class="popup-nav"><a class="menu-toggle mm-toggle show-me"><i class="icon icon-reorder"></i></a></li></ul>');
    } else {
        // allow inline styles on nav ( offsets! )
        if (isset($args['attr'])) {
            $args['items_wrap'] = '<ul id="%1$s" class="%2$s" ' . $args['attr'] . '>%3$s<li class="popup-nav"><a class="' . $menu_classes . '"><i class="icon icon-reorder"></i></a></li></ul>';
        }
        $defaults = array('menu_class' => 'inline-list pl-nav', 'menu' => pl_setting('primary_navigation_menu'), 'container' => null, 'container_class' => '', 'depth' => 3, 'fallback_cb' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s" style="">%3$s<li class="popup-nav"><a class="' . $menu_classes . '"><i class="icon icon-reorder"></i></a></li></ul>', 'style' => false, 'echo' => false, 'pl_behavior' => 'standard');
        $args = wp_parse_args($args, $defaults);
        $args['menu_class'] .= ' ' . $respond;
        $out = str_replace("\n", "", wp_nav_menu($args));
    }
    return $out;
}
开发者ID:benpeck,项目名称:experticity-fools,代码行数:18,代码来源:lib.theming.php

示例15: custom_scripts

    function custom_scripts()
    {
        ?>
		<div class="opt codetext">
			<div class="opt-box">
				<div class="codetext-meta fix">
					<label class="codetext-label"><?php 
        _e('Custom Javascript or Header HTML', 'pagelines');
        ?>
</label>
				</div>
				<form class="code-form"><textarea id="custom_scripts" class="custom-scripts" name="settings[custom_scripts]" placeholder=""><?php 
        echo stripslashes(pl_setting('custom_scripts'));
        ?>
</textarea></form>
			</div>
		</div>
		<?php 
    }
开发者ID:taeche,项目名称:SoDoEx,代码行数:19,代码来源:panel.code.php


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