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


PHP themify_get_data函数代码示例

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


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

示例1: end_cache

 /**
  * End Caching
  * 
  * return void
  */
 public static function end_cache()
 {
     if (!self::$turnoff_cache && !empty(self::$cache)) {
         self::$started--;
         if (self::$started == 0) {
             $content = '';
             if (!self::check_cache(self::$cache['cache_dir'], self::$cache['time'])) {
                 $content = ob_get_contents();
                 ob_end_clean();
                 $dir = pathinfo(self::$cache['cache_dir'], PATHINFO_DIRNAME);
                 if (!is_dir($dir)) {
                     wp_mkdir_p($dir);
                 }
                 unset($dir);
                 $wp_filesystem = self::InitWpFile();
                 self::$turnoff_cache = !$wp_filesystem->put_contents(self::$cache['cache_dir'], self::minify_html($content));
             }
             if (!self::$turnoff_cache) {
                 readfile(self::$cache['cache_dir']);
             } else {
                 echo $content;
                 self::removeDirectory(self::get_cache_dir());
                 $data = themify_get_data();
                 $data['setting-page_builder_cache'] = 'on';
                 themify_set_data($data);
                 self::$turnoff_cache = true;
             }
             self::$cache = 0;
         }
     }
 }
开发者ID:tchataigner,项目名称:palette,代码行数:36,代码来源:class-themify-cache.php

示例2: setup_defaults

 public function setup_defaults()
 {
     $data = themify_get_data();
     if (isset($data[$this->setting_name]) && null === $data[$this->setting_name]) {
         $this->fonts = array('Muli', 'Jura', 'Istok Web', 'Nunito', 'Lato', 'PT Sans', 'EB Garamond', 'Oranienbaum', 'Kameron', 'Lustria', 'Cinzel', 'Oswald', 'Open Sans');
         $data[$this->setting_name] = json_encode($this->fonts);
         update_option('themify_data', $data);
     }
 }
开发者ID:rgrasiano,项目名称:viabasica-hering,代码行数:9,代码来源:class-editor-fonts.php

示例3: themify_default_page_layout

/**
 * Default Page Layout Module
 * @param array $data Theme settings data
 * @return string Markup for module.
 * @since 1.0.0
 */
function themify_default_page_layout($data = array())
{
    $data = themify_get_data();
    /**
     * Theme Settings Option Key Prefix
     * @var string
     */
    $prefix = 'setting-default_page_';
    /**
     * Sidebar placement options
     * @var array
     */
    $sidebar_location_options = array(array('value' => 'sidebar1', 'img' => 'images/layout-icons/sidebar1.png', 'selected' => true, 'title' => __('Sidebar Right', 'themify')), array('value' => 'sidebar1 sidebar-left', 'img' => 'images/layout-icons/sidebar1-left.png', 'title' => __('Sidebar Left', 'themify')), array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'title' => __('No Sidebar', 'themify')));
    /**
     * Tertiary options <blank>|yes|no
     * @var array
     */
    $default_options = array(array('name' => '', 'value' => ''), array('name' => __('Yes', 'themify'), 'value' => 'yes'), array('name' => __('No', 'themify'), 'value' => 'no'));
    /**
     * Module markup
     * @var string
     */
    $output = '';
    /**
     * Page sidebar placement
     */
    $output .= '<p>
					<span class="label">' . __('Page Sidebar Option', 'themify') . '</span>';
    $val = isset($data[$prefix . 'layout']) ? $data[$prefix . 'layout'] : '';
    foreach ($sidebar_location_options as $option) {
        if (('' == $val || !$val || !isset($val)) && (isset($option['selected']) && $option['selected'])) {
            $val = $option['value'];
        }
        if ($val == $option['value']) {
            $class = "selected";
        } else {
            $class = "";
        }
        $output .= '<a href="#" class="preview-icon ' . $class . '" title="' . $option['title'] . '"><img src="' . THEME_URI . '/' . $option['img'] . '" alt="' . $option['value'] . '"  /></a>';
    }
    $output .= '<input type="hidden" name="' . $prefix . 'layout" class="val" value="' . $val . '" /></p>';
    /**
     * Hide Title in All Pages
     */
    $output .= '<p>
					<span class="label">' . __('Hide Title in All Pages', 'themify') . '</span>
					<select name="setting-hide_page_title">' . themify_options_module($default_options, 'setting-hide_page_title') . '
					</select>
				</p>';
    /**
     * Page Comments
     */
    $pre = 'setting-comments_pages';
    $output .= '<p><span class="label">' . __('Page Comments', 'themify') . '</span><label for="' . $pre . '"><input type="checkbox" id="' . $pre . '" name="' . $pre . '" ' . checked(themify_get($pre), 'on', false) . ' /> ' . __('Disable comments in all Pages', 'themify') . '</label></p>';
    return $output;
}
开发者ID:jhostetter,项目名称:wp_intern_themes,代码行数:62,代码来源:post-type-page.php

示例4: widget

    function widget($args, $instance)
    {
        extract($args);
        /* User-selected settings. */
        $title = apply_filters('widget_title', $instance['title']);
        /* Before widget (defined by themes). */
        echo $before_widget;
        /* Title of widget (before and after defined by themes). */
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        $data = themify_get_data();
        $pre = 'setting-link_';
        $field_ids = json_decode($data[$pre . 'field_ids']);
        $show_link_name = $instance['show_link_name'] ? true : false;
        $open_new_window = $instance['open_new_window'] ? true : false;
        $new_window_attr = $open_new_window ? 'target="_blank"' : '';
        $out = '<ul class="social-links">';
        foreach ($field_ids as $key => $fid) {
            $title_name = $pre . 'title_' . $fid;
            if (function_exists('icl_t')) {
                $title_val = icl_t('Themify', $title_name, $data[$title_name]);
            } else {
                $title_val = isset($data[$title_name]) ? $data[$title_name] : '';
            }
            $link_name = $pre . 'link_' . $fid;
            $link_val = isset($data[$link_name]) ? trim($data[$link_name]) : '';
            $img_name = $pre . 'img_' . $fid;
            $w = isset($instance['thumb_width']) && '' != $instance['thumb_width'] ? 'width="' . $instance['thumb_width'] . '"' : '';
            $h = isset($instance['thumb_height']) && '' != $instance['thumb_height'] ? 'height="' . $instance['thumb_height'] . '"' : '';
            $img_val = '' == $data[$img_name] || !isset($data[$img_name]) ? '' : '<img src="' . $data[$img_name] . '" ' . $w . ' ' . $h . ' />';
            if ('' != $link_val) {
                $out .= sprintf('
						<li class="social-link-item %s">
							<a href="%s" title="%s" %s>%s %s</a>
						</li>
						<!-- /themify-link-item -->', sanitize_title($title_val), $link_val, $title_val, $new_window_attr, $img_val, $show_link_name ? $title_val : '');
            }
        }
        $out .= '</ul>';
        echo $out;
        /* After widget (defined by themes). */
        echo $after_widget;
    }
开发者ID:byronmisiva,项目名称:msv-dev,代码行数:44,代码来源:themify-widgets.php

示例5: themify_transition_effect

    /**
     * Add transition effect
     * FlyIn/FadeIn/disabled
     * @return string
     */
    function themify_transition_effect()
    {
        $data = themify_get_data();
        $prefix = 'setting-transition_effect_';
        $fadein_checked = '';
        $mobile_checked = '';
        $disabled_checked = '';
        $mobile_options = array(array('name' => __('Off', 'themify'), 'value' => 'off'), array('name' => __('On', 'themify'), 'value' => 'on'));
        if (themify_check($prefix . 'fadein')) {
            $fadein_checked = "checked='checked'";
        }
        if (themify_check($prefix . 'mobile_exclude')) {
            $mobile_checked = "checked='checked'";
        }
        if (themify_check($prefix . 'all_disabled')) {
            $disabled_checked = "checked='checked'";
        }
        $output = '<p>
						<span class="label" style="width:400px;">' . __('Turn off fly-in animation on mobile/tablet for better performance', 'themify') . '</span> 
						<select name="' . $prefix . 'mobile_exclude">';
        foreach ($mobile_options as $mobile_option) {
            $output .= '<option ' . selected(themify_get($prefix . 'mobile_exclude'), $mobile_option['value'], false) . ' value="' . $mobile_option['value'] . '">' . $mobile_option['name'] . '</option>';
        }
        $output .= '	</select>
					</p>';
        $output .= '<p><label for="' . $prefix . 'fadein"><input type="checkbox" id="' . $prefix . 'fadein" name="' . $prefix . 'fadein" ' . $fadein_checked . '/> ' . __('Use fade-in transition effect instead of fly-in', 'themify') . '</label></p>';
        $output .= '<p><label for="' . $prefix . 'all_disabled"><input type="checkbox" id="' . $prefix . 'all_disabled" name="' . $prefix . 'all_disabled" ' . $disabled_checked . '/> ' . __('Disable all transition effect', 'themify') . '</label></p>';
        return $output;
    }
开发者ID:byronmisiva,项目名称:msv-dev,代码行数:34,代码来源:theme-modules.php

示例6: themify_entries_navigation

 /**
  * Display module to select numbered pagination or links to previous and next posts.
  * @param $data array
  * @return $html Module markup.
  * @since 1.6.0
  */
 function themify_entries_navigation($data = array())
 {
     $data = themify_get_data();
     $key = 'setting-entries_nav';
     $html = '<p>';
     // Numbered pagination
     $html .= '<label for="' . $key . '_numbered">';
     $html .= '<input ' . checked(isset($data[$key]) ? $data[$key] : 'numbered', 'numbered', false) . ' type="radio" id="' . $key . '_numbered" name="' . $key . '" value="numbered" /> ';
     $html .= __('Numbered Page Navigation (page 1, 2, 3, etc.)', 'themify') . '</label>';
     $html .= '<br/>';
     // Previous / Next links
     $html .= '<label for="' . $key . '_prevnext">';
     $html .= '<input ' . checked(isset($data[$key]) ? $data[$key] : '', 'prevnext', false) . ' type="radio" id="' . $key . '_prevnext" name="' . $key . '" value="prevnext" /> ';
     $html .= __('Previous Posts and Next Posts Links', 'themify') . '</label>';
     $html .= '</p>';
     return $html;
 }
开发者ID:byronmisiva,项目名称:mrkpln-dev,代码行数:23,代码来源:themify-modules.php

示例7: themify_has_styling_data

/**
 * Checks if there is styling data or custom CSS.
 *
 * 1.9.1 Removed cached option because it might be misleading on certain situations.
 *		 Refactored to exit as soon as possible and minimize execution time and memory usage.
 *
 * @since 1.8.2
 *
 * @return bool
 */
function themify_has_styling_data()
{
    /* Allow to restore the Styling panel by filtering and returning true */
    if (apply_filters('themify_show_styling_panel', false)) {
        return true;
    }
    /**
     * @var array $themify_data Themify theme settings and styling. 
     */
    $themify_data = themify_get_data();
    // Check Custom CSS
    $custom_css = isset($themify_data['setting-custom_css']) && !empty($themify_data['setting-custom_css']);
    if ($custom_css) {
        return true;
    }
    // Check styling data
    foreach ($themify_data as $key => $val) {
        if (false !== stripos($key, 'styling-')) {
            $val = trim($val);
            if (!empty($val)) {
                return true;
            }
        }
    }
    return false;
}
开发者ID:tchataigner,项目名称:palette,代码行数:36,代码来源:themify-utils.php

示例8: themify_request_tweets

/**
 * Get request tweets from service api
 * @param $args
 * @return bool|object
 */
function themify_request_tweets($args)
{
    $data = themify_get_data();
    $prefix = 'setting-twitter_settings_';
    $screen_name = urlencode(strip_tags(sanitize_user(str_replace('@', '', $args['username']))));
    if ($args['limit'] != '') {
        $count = intval($args['limit']);
    }
    if ($args['include_retweets'] == 'true') {
        $include_rts = '1';
    } else {
        $include_rts = '0';
    }
    $exclude_replies = $args['exclude_replies'];
    $consumer_key = isset($data[$prefix . 'consumer_key']) ? $data[$prefix . 'consumer_key'] : '';
    $consumer_secret = isset($data[$prefix . 'consumer_secret']) ? $data[$prefix . 'consumer_secret'] : '';
    if (!class_exists('Wp_Twitter_Api')) {
        // Require twitter oauth class
        require 'twitteroauth/class-wp-twitter-api.php';
    }
    $credentials = apply_filters('themify_twitter_credentials', array('consumer_key' => $consumer_key, 'consumer_secret' => $consumer_secret));
    $query = 'screen_name=' . $screen_name . '&count=' . $count . '&include_rts=' . $include_rts . '&exclude_replies=' . $exclude_replies . '&include_entities=true';
    $twitterConnection = new Wp_Twitter_Api($credentials);
    $tweets = $twitterConnection->query($query);
    return $tweets;
}
开发者ID:tchataigner,项目名称:palette,代码行数:31,代码来源:themify-shortcodes.php

示例9: themify_footer_logo

function themify_footer_logo($data = array())
{
    if ($data['attr']['target'] != '') {
        $target = "<span class='hide target'>" . $data['attr']['target'] . "</span>";
    }
    $data = themify_get_data();
    if ($data['setting-footer_logo'] == "image") {
        $image = "checked='checked'";
        $image_display = "style='display:block;'";
        $text_display = "";
    } else {
        $text = "checked='checked'";
        $text_display = "";
        $image_display = "style='display:none;'";
    }
    return '<div class="themify_field_row">
					<p>
						<span class="label">' . __('Display', 'themify') . '</span> 
						<input name="setting-footer_logo" type="radio" value="text" ' . $text . ' /> ' . __('Site Title', 'themify') . ' 
						<input name="setting-footer_logo" type="radio" value="image" ' . $image . ' /> ' . __('Image', 'themify') . '
					</p>
					' . $target . '
					<div class="uploader-fields pushlabel image" ' . $image_display . '>
						<input type="text" class="width10" id="setting-footer_logo_image_value" name="setting-footer_logo_image_value" value="' . $data['setting-footer_logo_image_value'] . '" /> <br />
						<div style="display:block;">' . themify_get_uploader('setting-footer_logo_image_value', array('tomedia' => true)) . '</div>
					</div>
					<p class="pushlabel image" ' . $image_display . '>
						<input type="text" name="setting-footer_logo_width" class="width2" value="' . $data['setting-footer_logo_width'] . '" /> ' . __('width', 'themify') . ' 
						<input type="text" name="setting-footer_logo_height" class="width2" value="' . $data['setting-footer_logo_height'] . '" /> ' . __('height', 'themify') . '
					</p>
				</div>';
}
开发者ID:rinodung,项目名称:live-theme,代码行数:32,代码来源:theme-modules.php

示例10: themify_manage_builder

    /**
     * Builder Settings
     * @param array $data
     * @return string
     * @since 1.2.7
     */
    function themify_manage_builder($data = array())
    {
        global $ThemifyBuilder;
        $data = themify_get_data();
        $pre = 'setting-page_builder_';
        $output = '';
        $modules = $ThemifyBuilder->get_modules();
        foreach ($modules as $m) {
            $exclude = $pre . 'exc_' . $m['name'];
            $checked = isset($data[$exclude]) ? 'checked="checked"' : '';
            $output .= '<p>
						<span><input id="builder_module_' . $m['name'] . '" type="checkbox" name="' . $exclude . '" value="1" ' . $checked . '/> <label for="builder_module_' . $m['name'] . '">' . sprintf(__('Exclude %s module', 'themify'), ucfirst($m['name'])) . '</label></span>
					</p>';
        }
        return $output;
    }
开发者ID:byronmisiva,项目名称:mrkpln-dev,代码行数:22,代码来源:themify-builder.php

示例11: themify_default_layout

/**
 * Default Index Layout Module
 * @param array $data Theme settings data
 * @return string Markup for module.
 * @since 1.0.0
 */
function themify_default_layout($data = array())
{
    $data = themify_get_data();
    /**
     * Theme Settings Option Key Prefix
     * @var string
     */
    $prefix = 'setting-default_';
    if (!isset($data[$prefix . 'more_text']) || '' == $data[$prefix . 'more_text']) {
        $more_text = __('More', 'themify');
    } else {
        $more_text = $data[$prefix . 'more_text'];
    }
    /**
     * Tertiary options <blank>|yes|no
     * @var array
     */
    $default_options = array(array('name' => '', 'value' => ''), array('name' => __('Yes', 'themify'), 'value' => 'yes'), array('name' => __('No', 'themify'), 'value' => 'no'));
    /**
     * Default options 'yes', 'no'
     * @var array
     */
    $binary_options = array(array('name' => __('Yes', 'themify'), 'value' => 'yes'), array('name' => __('No', 'themify'), 'value' => 'no'));
    /**
     * Post content display options
     * @var array
     */
    $default_display_options = array(array('name' => __('Full Content', 'themify'), 'value' => 'content'), array('name' => __('Excerpt', 'themify'), 'value' => 'excerpt'), array('name' => __('None', 'themify'), 'value' => 'none'));
    /**
     * Post layout options
     * @var array
     */
    $default_post_layout_options = array(array('value' => 'list-post', 'img' => 'images/layout-icons/list-post.png', 'title' => __('List Post', 'themify'), "selected" => true), array('value' => 'grid4', 'img' => 'images/layout-icons/grid4.png', 'title' => __('Grid 4', 'themify')), array('value' => 'grid3', 'img' => 'images/layout-icons/grid3.png', 'title' => __('Grid 3', 'themify')), array('value' => 'grid2', 'img' => 'images/layout-icons/grid2.png', 'title' => __('Grid 2', 'themify')), array('value' => 'slider', 'img' => 'images/layout-icons/slider-default.png', 'title' => __('Slider', 'themify')));
    /**
     * Sidebar placement options
     * @var array
     */
    $sidebar_location_options = array(array('value' => 'sidebar1', 'img' => 'images/layout-icons/sidebar1.png', 'selected' => true, 'title' => __('Sidebar Right', 'themify')), array('value' => 'sidebar1 sidebar-left', 'img' => 'images/layout-icons/sidebar1-left.png', 'title' => __('Sidebar Left', 'themify')), array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'title' => __('No Sidebar', 'themify')));
    /**
     * Image alignment options
     * @var array
     */
    $alignment_options = array(array('name' => '', 'value' => ''), array('name' => __('Left', 'themify'), 'value' => 'left'), array('name' => __('Right', 'themify'), 'value' => 'right'));
    /**
     * Entry media position, above or below the title
     */
    $media_position = array(array('name' => __('Above Post Title', 'themify'), 'value' => 'above'), array('name' => __('Below Post Title', 'themify'), 'value' => 'below'));
    /**
     * HTML for settings panel
     * @var string
     */
    $output = '<div class="themify-info-link">' . __('Here you can set the <a href="http://themify.me/docs/default-layouts">Default Layouts</a> for WordPress archive post layout (category, search, archive, tag pages, etc.), single post layout (single post page), and the static Page layout. The default single post and page layout can be override individually on the post/page > edit > Themify Custom Panel.', 'themify') . '</div>';
    /**
     * Index Sidebar Option
     */
    $output .= '<p>
					<span class="label">' . __('Index Sidebar Option', 'themify') . '</span>';
    $val = isset($data[$prefix . 'layout']) ? $data[$prefix . 'layout'] : '';
    foreach ($sidebar_location_options as $option) {
        if (($val == '' || !$val || !isset($val)) && $option['selected']) {
            $val = $option['value'];
        }
        if ($val == $option['value']) {
            $class = 'selected';
        } else {
            $class = '';
        }
        $output .= '<a href="#" class="preview-icon ' . esc_attr($class) . '" title="' . esc_attr($option['title']) . '"><img src="' . esc_url(THEME_URI . '/' . $option['img']) . '" alt="' . esc_attr($option['value']) . '"  /></a>';
    }
    $output .= '	<input type="hidden" name="' . esc_attr($prefix) . 'layout" class="val" value="' . esc_attr($val) . '" />
				</p>';
    /**
     * Post Layout
     */
    $output .= '<p>
					<span class="label">' . __('Post Layout', 'themify') . '</span>';
    $val = isset($data[$prefix . 'post_layout']) ? $data[$prefix . 'post_layout'] : '';
    foreach ($default_post_layout_options as $option) {
        if (($val == '' || !$val || !isset($val)) && $option['selected']) {
            $val = $option['value'];
        }
        if ($val == $option['value']) {
            $class = 'selected';
        } else {
            $class = '';
        }
        $output .= '<a href="#" class="preview-icon ' . esc_attr($class) . '" title="' . esc_attr($option['title']) . '"><img src="' . esc_url(THEME_URI . '/' . $option['img']) . '" alt="' . esc_attr($option['value']) . '"  /></a>';
    }
    $output .= '	<input type="hidden" name="' . esc_attr($prefix) . 'post_layout" class="val" value="' . esc_attr($val) . '" />
				</p>';
    /**
     * Post Content Layout
     */
    $output .= '<p>
//.........这里部分代码省略.........
开发者ID:jhostetter,项目名称:wp_intern_themes,代码行数:101,代码来源:theme-modules.php

示例12: themify_manage_builder_active

    /**
     * Builder Settings
     * @param array $data
     * @return string
     * @since 1.2.7
     */
    function themify_manage_builder_active($data = array())
    {
        global $ThemifyBuilder;
        $data = themify_get_data();
        $pre = 'setting-page_builder_';
        $output = '';
        $options = array(array('name' => __('Enable', 'themify'), 'value' => 'enable'), array('name' => __('Disable', 'themify'), 'value' => 'disable'));
        $output .= '<p>
						<span class="label">' . __('Themify Builder:', 'themify') . '</span> 
						<select name="' . $pre . 'is_active">' . themify_options_module($options, $pre . 'is_active') . '
						</select>
					</p>';
        return $output;
    }
开发者ID:byronmisiva,项目名称:msv-dev,代码行数:20,代码来源:themify-builder.php

示例13: themify_body_classes

/**
 * Add different CSS classes to body tag.
 * Outputs:
 * 		skin name
 * 		layout
 * @param Array
 * @return Array
 * @since 1.2.2
 */
function themify_body_classes($classes)
{
    global $themify;
    $data = themify_get_data();
    // Add skin name
    if ($data['skin']) {
        $skin_dir = explode('/', $data['skin']);
        $classes[] = 'skin-' . $skin_dir[sizeof($skin_dir) - 2];
    } else {
        $classes[] = 'skin-default';
    }
    // Browser classes
    global $is_gecko, $is_opera, $is_iphone, $is_IE, $is_winIE, $is_macIE;
    $is_android = stripos($_SERVER['HTTP_USER_AGENT'], 'android') ? true : false;
    $is_webkit = stripos($_SERVER['HTTP_USER_AGENT'], 'webkit') ? true : false;
    $is_ie10 = stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE 10') ? true : false;
    $is_ie9 = stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE 9') ? true : false;
    $is_ie8 = stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') ? true : false;
    $is_ie7 = stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') ? true : false;
    $browsers = array($is_gecko => 'gecko', $is_opera => 'opera', $is_iphone => 'iphone', $is_IE => 'ie', $is_winIE => 'iewin', $is_macIE => 'iemac', $is_android => 'android', $is_webkit => 'webkit', $is_ie10 => 'ie10', $is_ie9 => 'ie9', $is_ie8 => 'ie8', $is_ie7 => 'ie7');
    foreach ($browsers as $browser => $name) {
        if ($browser) {
            $classes[] = $name;
        }
    }
    // Add default layout and post layout
    $layout = themify_get('setting-default_layout');
    $post_layout = themify_get('setting-default_post_layout');
    // It's a page
    if (is_page()) {
        // It's a page
        $layout = themify_get('page_layout') != 'default' && themify_check('page_layout') ? themify_get('page_layout') : themify_get('setting-default_page_layout');
    }
    // It's a post
    if (is_single()) {
        $layout = themify_get('layout') != 'default' && themify_check('layout') ? themify_get('layout') : themify_get('setting-default_page_post_layout');
    }
    // If still empty, set default
    if (apply_filters('themify_default_layout_condition', '' == $layout)) {
        $layout = apply_filters('themify_default_layout', 'sidebar1');
    }
    $classes[] = $layout;
    // Set post layout for blog, archive or a query category page
    $post_query_category = themify_get('query_category');
    if (is_home() || is_archive() || '' != $post_query_category || is_search()) {
        $post_layout = $themify->post_layout;
        if (apply_filters('themify_default_post_layout_condition', '' == $post_layout)) {
            $post_layout = apply_filters('themify_default_post_layout', 'list-post');
        }
        $classes[] = $post_layout;
    }
    return apply_filters('themify_body_classes', $classes);
}
开发者ID:rinodung,项目名称:live-theme,代码行数:62,代码来源:themify-utils.php

示例14: themify_gallery_slider

    function themify_gallery_slider()
    {
        /**
         * Associative array containing theme settings
         * @var array
         */
        $data = themify_get_data();
        /**
         * Variable prefix key
         * @var string
         */
        $prefix = 'setting-portfolio_slider_';
        /**
         * Basic default options '', 'yes', 'no'
         * @var array
         */
        $default_options = array(array('name' => __('Yes', 'themify'), 'value' => 'yes'), array('name' => __('No', 'themify'), 'value' => 'no'));
        $auto_options = array(__('4 Secs (default)', 'themify') => 4000, __('Off', 'themify') => 'off', __('1 Sec', 'themify') => 1000, __('2 Secs', 'themify') => 2000, __('3 Secs', 'themify') => 3000, __('4 Secs', 'themify') => 4000, __('5 Secs', 'themify') => 5000, __('6 Secs', 'themify') => 6000, __('7 Secs', 'themify') => 7000, __('8 Secs', 'themify') => 8000, __('9 Secs', 'themify') => 9000, __('10 Secs', 'themify') => 10000);
        $speed_options = array(__('Fast', 'themify') => 500, __('Normal', 'themify') => 1000, __('Slow', 'themify') => 1500);
        $effect_options = array(array('name' => __('Slide', 'themify'), 'value' => 'slide'), array('name' => __('Fade', 'themify'), 'value' => 'fade'));
        $output = '<p>
						<span class="label">' . __('Auto Play', 'themify') . '</span>
						<select name="' . $prefix . 'autoplay">';
        foreach ($auto_options as $name => $val) {
            $output .= '<option value="' . $val . '" ' . selected($data[$prefix . 'autoplay'], $data[$prefix . 'autoplay'] ? $val : 4000, false) . '>' . $name . '</option>';
        }
        $output .= '	</select>
					</p>';
        $output .= '<p>
						<span class="label">' . __('Effect', 'themify') . '</span>
						<select name="' . $prefix . 'effect">' . themify_options_module($effect_options, $prefix . 'effect') . '
						</select>
					</p>';
        $output .= '<p>
						<span class="label">' . __('Transition Speed', 'themify') . '</span>
						<select name="' . $prefix . 'transition_speed">';
        foreach ($speed_options as $name => $val) {
            $output .= '<option value="' . $val . '" ' . selected($data[$prefix . 'transition_speed'], $data[$prefix . 'transition_speed'] ? $val : 500, false) . '>' . $name . '</option>';
        }
        $output .= '	</select>
					</p>';
        return $output;
    }
开发者ID:byronmisiva,项目名称:msv-dev,代码行数:43,代码来源:theme-class-portfolio.php

示例15: themify_manage_builder_parallax

 /**
  * Builder Setting Animations
  * @param array $data
  * @return string
  * @since 2.0.2
  */
 function themify_manage_builder_parallax($data = array())
 {
     $opt_data = themify_get_data();
     $pre = 'setting-page_builder_parallax_';
     $mobile_checked = '';
     $disabled_checked = '';
     if (isset($opt_data[$pre . 'mobile_exclude']) && $opt_data[$pre . 'mobile_exclude']) {
         $mobile_checked = " checked='checked'";
     }
     if (isset($opt_data[$pre . 'disabled']) && $opt_data[$pre . 'disabled']) {
         $disabled_checked = " checked='checked'";
     }
     $out = '';
     $out .= sprintf('<p><label for="%s"><input type="checkbox" id="%s" name="%s"%s> %s</label></p>', esc_attr($pre . 'mobile_exclude'), esc_attr($pre . 'mobile_exclude'), esc_attr($pre . 'mobile_exclude'), $mobile_checked, wp_kses_post(__('Disable Builder parallax on mobile and tablet only', 'themify')));
     $out .= sprintf('<p><label for="%s"><input type="checkbox" id="%s" name="%s"%s> %s</label></p>', esc_attr($pre . 'disabled'), esc_attr($pre . 'disabled'), esc_attr($pre . 'disabled'), $disabled_checked, wp_kses_post(__('Disable Builder parallax on all devices (all row will not have any effect)', 'themify')));
     return $out;
 }
开发者ID:tchataigner,项目名称:palette,代码行数:23,代码来源:themify-builder.php


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