本文整理汇总了PHP中themify_get函数的典型用法代码示例。如果您正苦于以下问题:PHP themify_get函数的具体用法?PHP themify_get怎么用?PHP themify_get使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了themify_get函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: is_cache_activate
/**
* Check cache is disabled or builder is active or in admin
*
* return boolean
*/
public static function is_cache_activate()
{
$active = is_user_logged_in() && current_user_can('manage_options') || themify_get('setting-page_builder_cache') || is_admin() ? true : (class_exists('Themify_Builder') ? Themify_Builder::is_front_builder_activate() : FALSE);
return apply_filters('themify_builder_is_cache_active', $active);
}
示例2: porto_expand_link
/**
* Add class and data attribute to portfolio section
* @param sting $link
* @return string
*/
function porto_expand_link($link)
{
global $post, $themify;
if ('yes' == $themify->portfolio_expander && 'portfolio' == get_post_type() && themify_get('external_link') == '' && themify_get('lightbox_link') == '') {
$link .= '" class="porto-expand-js" data-post-id="' . $post->ID . '" data-post-type="' . get_post_type();
}
return $link;
}
示例3: array
} else {
$num_posts = "showposts=5&";
}
if (themify_check('setting-header_slider_display') && themify_get('setting-header_slider_display') == "images") {
$options = array("one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten");
foreach ($options as $option) {
if (themify_check('setting-header_slider_images_' . $option . '_image')) {
echo "<li>";
if (themify_check('setting-header_slider_images_' . $option . '_link')) {
$title = themify_check('setting-header_slider_images_' . $option . '_title') ? '<h3 class="feature-post-title">' . themify_get('setting-header_slider_images_' . $option . '_title') . '</h3>' : '';
$link = themify_get('setting-header_slider_images_' . $option . '_link');
$image = themify_get('setting-header_slider_images_' . $option . '_image');
themify_image("src=" . $image . "&setting=header_slider&ignore=true&w=145&h=120&before=<a href='" . urlencode($link) . "' title='" . urlencode($link) . "'>&after=</a>&alt=" . urlencode($link) . "&class=feature-img");
echo $title;
} else {
$image = themify_get('setting-header_slider_images_' . $option . '_image');
themify_image("src=" . $image . "&setting=header_slider&ignore=true&w=145&h=120&alt=" . $image . "&class=feature-img");
echo $title;
}
echo "</li>";
}
}
} else {
query_posts($num_posts . $cat);
if (have_posts()) {
while (have_posts()) {
the_post();
?>
<li>
<?php
示例4: shortcode
/**
* Main shortcode rendering
* @param array $atts
* @param $post_type
* @return string|void
*/
function shortcode($atts = array(), $post_type)
{
extract($atts);
// Pagination
global $paged;
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
// Parameters to get posts
$args = array('post_type' => $post_type, 'posts_per_page' => $limit, 'order' => $order, 'orderby' => $orderby, 'suppress_filters' => false, 'paged' => $paged);
// Category parameters
$args['tax_query'] = $this->parse_category_args($category, $post_type);
// Defines layout type
$cpt_layout_class = $this->post_type . '-multiple clearfix type-multiple';
$multiple = true;
// Single post type or many single post types
if ('' != $id) {
if (strpos($id, ',')) {
$ids = explode(',', str_replace(' ', '', $id));
foreach ($ids as $string_id) {
$int_ids[] = intval($string_id);
}
$args['post__in'] = $int_ids;
$args['orderby'] = 'post__in';
} else {
$args['p'] = intval($id);
$cpt_layout_class = $this->post_type . '-single';
$multiple = false;
}
}
// Get posts according to parameters
$portfolio_query = new WP_Query();
$posts = $portfolio_query->query(apply_filters('themify_' . $post_type . '_shortcode_args', $args));
// Grid Style
if ('' == $style) {
$style = themify_check('setting-default_portfolio_index_post_layout') ? themify_get('setting-default_portfolio_index_post_layout') : 'grid4';
}
if (is_singular('portfolio')) {
if ('' == $image_w) {
$image_w = themify_check('setting-default_portfolio_single_image_post_width') ? themify_get('setting-default_portfolio_single_image_post_width') : '670';
}
if ('' == $image_h) {
$image_h = themify_check('setting-default_portfolio_single_image_post_height') ? themify_get('setting-default_portfolio_single_image_post_height') : '0';
}
if ('' == $post_date) {
$post_date = themify_check('setting-default_portfolio_single_post_date') ? themify_get('setting-default_portfolio_index_post_date') : 'yes';
}
if ('' == $title) {
$title = themify_check('setting-default_portfolio_single_title') ? themify_get('setting-default_portfolio_single_title') : 'yes';
}
if ('' == $unlink_title) {
$unlink_title = themify_check('setting-default_portfolio_single_unlink_post_title') ? themify_get('setting-default_portfolio_single_unlink_post_title') : 'no';
}
if ('' == $post_meta) {
$post_meta = themify_check('setting-default_portfolio_single_meta') ? themify_get('setting-default_portfolio_single_meta') : 'yes';
}
} else {
if ('' == $image_w) {
$image_w = themify_check('setting-default_portfolio_index_image_post_width') ? themify_get('setting-default_portfolio_index_image_post_width') : '221';
}
if ('' == $image_h) {
$image_h = themify_check('setting-default_portfolio_index_image_post_height') ? themify_get('setting-default_portfolio_index_image_post_height') : '221';
}
if ('' == $title) {
$title = themify_check('setting-default_portfolio_index_title') ? themify_get('setting-default_portfolio_index_title') : 'yes';
}
if ('' == $unlink_title) {
$unlink_title = themify_check('setting-default_portfolio_index_unlink_post_title') ? themify_get('setting-default_portfolio_index_unlink_post_title') : 'no';
}
// Reverse logic
if ('' == $post_date) {
$post_date = themify_check('setting-default_portfolio_index_post_date') ? 'no' == themify_get('setting-default_portfolio_index_post_date') ? 'yes' : 'no' : 'no';
}
if ('' == $post_meta) {
$post_meta = themify_check('setting-default_portfolio_index_post_meta_category') ? 'no' == themify_get('setting-default_portfolio_index_post_meta_category') ? 'yes' : 'no' : 'no';
}
}
// Collect markup to be returned
$out = '';
if ($posts) {
global $themify;
$themify_save = clone $themify;
// save a copy
// override $themify object
$themify->hide_title = 'yes' == $title ? 'no' : 'yes';
$themify->unlink_title = '' == $unlink_title || 'no' == $unlink_title ? 'no' : 'yes';
$themify->hide_image = 'yes' == $image ? 'no' : 'yes';
$themify->hide_meta = 'yes' == $post_meta ? 'no' : 'yes';
$themify->hide_date = 'yes' == $post_date ? 'no' : 'yes';
if (!$multiple) {
if ('' == $image_w || get_post_meta($args['p'], 'image_width', true)) {
$themify->width = get_post_meta($args['p'], 'image_width', true);
}
if ('' == $image_h || get_post_meta($args['p'], 'image_height', true)) {
$themify->height = get_post_meta($args['p'], 'image_height', true);
}
//.........这里部分代码省略.........
示例5: themify_webfonts_subsets
/**
* Module to specify additional characters subsets
* @param array Themify data
* @return string Module markup
* @since 1.3.9
*/
function themify_webfonts_subsets($data = array())
{
$data = themify_get_data();
$key = 'setting-webfonts_subsets';
$subsets = themify_get($key);
return '<p>
<span class="label">' . __('Additional subsets', 'themify') . '</span> <input type="text" class="width10" name="' . $key . '" value="' . $subsets . '" /> <br />
<span class="pushlabel">
<a href="#" class="refresh-webfonts button">' . __('Refresh list', 'themify') . '</a>
<br/><small>' . __('Enter the additional character subsets you need to use from Google WebFonts separated by commas. Example: latin-ext,cyrillic', 'themify') . '</small></span>
</p>';
}
示例6: get_query_var
} else {
$width = $post_image_width;
$height = $post_image_height;
}
if (get_query_var('paged')) {
$paged = get_query_var('paged');
} elseif (get_query_var('page')) {
$paged = get_query_var('page');
} else {
$paged = 1;
}
if ($post_query_category != "") {
?>
<?php
if (themify_get('section_categories') != 'yes') {
?>
<?php
$wp_query->query('cat=' . $post_query_category . '&posts_per_page=' . $posts_per_page . '&paged=' . $paged);
?>
<?php
if (have_posts()) {
?>
<!-- loops-wrapper -->
<div class="loops-wrapper <?php
echo $post_layout;
?>
">
示例7: the_excerpt
?>
<?php
the_excerpt();
?>
<?php
} elseif ($display_testimonial == 'none') {
?>
<?php
} else {
?>
<?php
the_content(themify_check('setting-default_more_text') ? themify_get('setting-default_more_text') : __('More →', 'themify'));
?>
<?php
}
//display content
?>
<?php
edit_post_link(__('Edit', 'themify'), '[', ']');
?>
<p class="testimonial-author">
<?php
echo $BuilderTestimonial->author_name($post, 'yes');
?>
示例8: themify_framework_theme_config_add_builder
/**
* Add Builder to all themes using the themify_theme_config_setup filter.
* @param $themify_theme_config
* @return mixed
* @since 1.4.2
*/
function themify_framework_theme_config_add_builder($themify_theme_config)
{
$themify_theme_config['panel']['settings']['tab']['page_builder'] = array('title' => __('Themify Builder', 'themify'), 'id' => 'themify-builder', 'custom-module' => array(array('title' => __('Enable/Disable Themify Builder', 'themify'), 'function' => 'themify_manage_builder_active')));
if ('disable' != apply_filters('themify_enable_builder', themify_get('setting-page_builder_is_active'))) {
$themify_theme_config['panel']['settings']['tab']['page_builder']['custom-module'][] = array('title' => __('Builder Options', 'themify'), 'function' => 'themify_manage_builder');
}
return $themify_theme_config;
}
示例9: get_query_var
* Creates numbered pagination or displays button for infinite scroll based on user selection
* @since 1.0.0
*/
if ('infinite' == themify_get('setting-more_posts') || '' == themify_get('setting-more_posts')) {
global $wp_query, $themify;
$total_pages = $wp_query->max_num_pages;
$current_page = get_query_var('paged') ? get_query_var('paged') : 1;
if ($total_pages > $current_page) {
if ($themify->query_category != '') {
//If it's a Query Category page, set the number of total pages
echo '<script type="text/javascript">var qp_max_pages = ' . $total_pages . '</script>';
}
echo '<p id="load-more"><a href="' . next_posts($total_pages, false) . '">' . __('Load More', 'themify') . '</a></p>';
}
} else {
if ('numbered' == themify_get('setting-entries_nav') || '' == themify_get('setting-entries_nav')) {
themify_pagenav();
} else {
?>
<div class="post-nav">
<span class="prev"><?php
next_posts_link(__('« Older Entries', 'themify'));
?>
</span>
<span class="next"><?php
previous_posts_link(__('Newer Entries »', 'themify'));
?>
</span>
</div>
<?php
}
示例10: themify_shortcode_post_slider
/**
* Create a slider with posts retrieved through get_posts
* @param Object $atts
* @param String $content
* @return String
*/
function themify_shortcode_post_slider($atts, $content = null)
{
wp_enqueue_script('themify-carousel-js');
extract(shortcode_atts(array('visible' => '1', 'scroll' => '1', 'auto' => '0', 'pause_hover' => 'no', 'wrap' => 'yes', 'excerpt_length' => '20', 'speed' => 'normal', 'slider_nav' => 'yes', 'pager' => 'yes', 'limit' => '5', 'offset' => '0', 'category' => '', 'image' => 'yes', 'image_w' => '240px', 'image_h' => '180px', 'more_text' => __('More...', 'themify'), 'title' => 'yes', 'display' => 'none', 'post_meta' => 'no', 'post_date' => 'no', 'width' => '', 'height' => '', 'class' => '', 'unlink_title' => 'no', 'unlink_image' => 'no', 'image_size' => 'medium', 'post_type' => 'post', 'taxonomy' => 'category', 'order' => 'DESC', 'orderby' => 'date', 'effect' => 'scroll'), $atts, 'themify_post_slider'));
$wrapvar = 'false';
if ('yes' == $wrap) {
$wrapvar = 'true';
}
if ('0' == $auto) {
$play = 'false';
} else {
$play = 'true';
}
switch ($speed) {
case 'fast':
$speed = '.5';
break;
case 'normal':
$speed = '1';
break;
case 'slow':
$speed = '4';
break;
}
$pause_hover = $pause_hover == 'yes' ? 'true' : 'false';
$numsldr = rand(0, 10000);
$postsliderstr = '';
global $post;
$query_args = array('numberposts' => $limit, 'offset' => $offset, 'post_type' => $post_type, 'order' => $order, 'orderby' => $orderby, 'suppress_filters' => false, 'post__not_in' => array(get_the_ID()));
if ('' != $category) {
$tax_query_terms = explode(',', $category);
if (preg_match('#[a-z]#', $category)) {
$query_args['tax_query'] = array(array('taxonomy' => $taxonomy, 'field' => 'slug', 'terms' => $tax_query_terms));
} else {
$exclude = array_filter($tax_query_terms, 'themify_is_negative_number');
$query_args['tax_query'] = array('relation' => 'AND', array('taxonomy' => $taxonomy, 'field' => 'id', 'terms' => array_filter($tax_query_terms, 'themify_is_positive_number')), array('taxonomy' => $taxonomy, 'field' => 'id', 'terms' => array_map('themify_make_absolute_number', $exclude), 'operator' => 'NOT IN'));
}
}
$posts = get_posts($query_args);
$class .= ' effect-' . $effect;
if ($posts) {
$postsliderstr = '<!-- shortcode post_slider --> <div id="post-slider-' . esc_attr($numsldr) . '" style="width: ' . esc_attr($width) . '; height: ' . esc_attr($height) . ';" class="shortcode clearfix post-slider ' . $class . '">
<ul class="slides">';
foreach ($posts as $post) {
setup_postdata($post);
global $more;
$more = 0;
$post_class = '';
foreach (get_post_class() as $postclass) {
$post_class .= " " . $postclass;
}
//get_post_class() as $postclass
$postsliderstr .= '<li><div class="slide-wrap ' . esc_attr($post_class) . '">';
if ('yes' == $image) {
$video_url = themify_get('video_url');
if ('' != $video_url) {
$postsliderstr .= '<div class="post-video">';
global $wp_embed;
$postsliderstr .= $wp_embed->run_shortcode('[embed]' . $video_url . '[/embed]');
$postsliderstr .= '</div>';
} else {
if ('no' == $unlink_image) {
$postsliderstr .= themify_get_image(array('image_size=' => $image_size, 'ignore' => true, 'w' => $image_w, 'h' => $image_h, 'alt' => get_the_title(), 'before' => '<p class="post-image"><a href="' . themify_get_featured_image_link() . '">', 'after' => '</a></p>'));
} else {
$postsliderstr .= themify_get_image(array('image_size' => $image_size, 'ignore' => true, 'w' => $image_w, 'h' => $image_h, 'alt' => get_the_title(), 'before' => '<p class="post-image">', 'after' => '</p>'));
}
}
}
//'yes' == $image
if ('yes' == $title) {
if ('no' == $unlink_title) {
$postsliderstr .= '<h3 class="post-title"><a href="' . themify_get_featured_image_link() . '">' . get_the_title() . '</a></h3>';
} else {
$postsliderstr .= '<h3 class="post-title">' . get_the_title() . '</h3>';
}
}
//$title == "yes"
if ($post_date == "yes") {
$postsliderstr .= '<p class="post-date">' . get_the_date() . '</p>';
}
//$post_date == "yes"
if ('yes' == $post_meta) {
$postsliderstr .= '<p class="post-meta">
<span class="post-author">' . get_the_author() . '</span>
<span class="post-category">' . get_the_category_list(', ') . '</span>';
if (comments_open()) {
ob_start();
comments_popup_link('0', '1', '%', 'comments-link', '');
$write_comments = ob_get_contents();
ob_clean();
} else {
$write_comments = '';
}
$postsliderstr .= '<span class="post-comment">' . $write_comments . '</span>';
//.........这里部分代码省略.........
示例11: get_bggallery_order
function get_bggallery_order()
{
$sc_order = false;
if (themify_is_woocommerce_active() && is_shop()) {
$gallery_raw = get_post_meta(get_option('woocommerce_shop_page_id'), 'background_gallery', true);
} else {
$gallery_raw = themify_get('background_gallery');
}
if (strpos($gallery_raw, 'orderby') !== false) {
$sc_order = preg_replace('#\\[gallery(.*)orderby="([a-zA-Z0-9]*)"(.*)\\]#i', '$2', $gallery_raw);
}
return $sc_order ? $sc_order : 'post__in';
}
示例12: themify_img_settings
function themify_img_settings($data = array())
{
/*** Img.php Crop Option Array ***/
$options = array(array("value" => "c", "name" => __('Center', 'themify')), array("value" => "t", "name" => __('Top', 'themify')), array("value" => "tr", "name" => __('Top Right', 'themify')), array("value" => "tl", "name" => __('Top Left', 'themify')), array("value" => "b", "name" => __('Bottom', 'themify')), array("value" => "br", "name" => __('Bottom Right', 'themify')), array("value" => "bl", "name" => __('Bottom Left', 'themify')), array("value" => "l", "name" => __('Left', 'themify')), array("value" => "r", "name" => __('Right', 'themify')));
$options_vertical = array(array('name' => '', 'value' => ''), array('name' => __('Yes', 'themify'), 'value' => 'yes'), array('name' => __('No', 'themify'), 'value' => 'no'));
$feature_sizes = array(array('value' => 'blank', 'name' => ''), array('value' => 'thumbnail', 'name' => __('Thumbnail', 'themify')), array('value' => 'medium', 'name' => __('Medium', 'themify')), array('value' => 'large', 'name' => __('Large', 'themify')), array('value' => 'full', 'name' => __('Original Image', 'themify')));
if (themify_check('setting-img_settings_use')) {
$checked_use = "checked='checked'";
}
if (themify_check('setting-img_settings_legacy')) {
$checked_legacy = "checked='checked'";
}
$output = '<div class="module">
<div class="label">img.php</div>
<div class="row">
<input type="checkbox" class="disable_img_php" name="setting-img_settings_use" ' . $checked_use . '/> ' . __('Disable img.php globally', 'themify') . '<br/>
<small>' . __('(WordPress Featured Image or original images will be used)', 'themify') . '</small>
<br/>
</div>
<!-- BEGIN Show if img.php is enabled -->
<div class="show_if_enabled_img_php">
<div class="label">' . __('Image Quality', 'themify') . '</div>
<div class="row">
<input class="width2" type="text" name="setting-img_settings_quality" value="' . themify_get('setting-img_settings_quality') . '"> <small>' . __('max 100 (higher = better quality, but bigger file size)', 'themify') . '</small>
</div>
<div class="label">' . __('Cropping Alignment', 'themify') . '</div>
<div class="row">
<select name="setting-img_settings_crop_option"><option></option>';
foreach ($options as $option) {
if ($option['value'] == themify_get('setting-img_settings_crop_option')) {
$output .= '<option value="' . $option['value'] . '" selected="selected">' . $option['name'] . '</option>';
} else {
$output .= '<option value="' . $option['value'] . '">' . $option['name'] . '</option>';
}
}
$output .= '</select></div>
<div class="label">' . __('Vertical Cropping', 'themify') . '</div>
<div class="row">
<select name="setting-img_settings_vertical_crop_option">';
foreach ($options_vertical as $option_vertical) {
if ($option_vertical['value'] == themify_get('setting-img_settings_vertical_crop_option')) {
$output .= '<option value="' . $option_vertical['value'] . '" selected="selected">' . $option_vertical['name'] . '</option>';
} else {
$output .= '<option value="' . $option_vertical['value'] . '">' . $option_vertical['name'] . '</option>';
}
}
$output .= '</select> <small>' . __('(Select \'no\' to disable vertical cropping globally)', 'themify') . '</small></div>
</div>
<!-- END Show if img.php is enabled -->
</div>';
return $output;
}
示例13: 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;
}
示例14: 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_';
$out = '';
$field_ids = isset($data[$pre . 'field_ids']) ? json_decode($data[$pre . 'field_ids']) : '';
if (is_array($field_ids) || is_object($field_ids)) {
$show_link_name = isset($instance['show_link_name']) && $instance['show_link_name'] ? true : false;
$open_new_window = isset($instance['open_new_window']) && $instance['open_new_window'] ? true : false;
$new_window_attr = $open_new_window ? 'target="_blank"' : '';
$icon_type = themify_check($pre . 'icon_type') ? themify_get($pre . 'icon_type') : 'image-icon';
// Icon Size
$icon_size = isset($instance['icon_size']) && '' != $instance['icon_size'] ? $instance['icon_size'] : 'icon-medium';
// Orientation
$orientation = isset($instance['orientation']) && '' != $instance['orientation'] ? $instance['orientation'] : 'horizontal';
$out .= '<ul class="social-links ' . $orientation . '">';
foreach ($field_ids as $key => $fid) {
$type_val = isset($data[$pre . 'type_' . $fid]) ? $data[$pre . 'type_' . $fid] : '';
if ($type_val != $icon_type) {
continue;
}
$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]) : '';
if ('' == $link_val) {
continue;
}
// Image Icon
$img_name = $pre . 'img_' . $fid;
$img_val = !isset($data[$img_name]) || '' == $data[$img_name] ? '' : '<img src="' . $data[$img_name] . '" />';
// Font Icon
$font_icon = '';
if ($font_icon_class = themify_get($pre . 'ficon_' . $fid)) {
$fi_style = '';
$font_icon_class = 'fa ' . $font_icon_class;
if (stripos($font_icon_class, 'icon-') !== false) {
$font_icon_class = str_replace('icon-', 'fa-', $font_icon_class);
}
if ($font_icon_color = themify_get($pre . 'ficolor_' . $fid)) {
$fi_style .= 'color: #' . $font_icon_color . ';';
}
if ($font_icon_bgcolor = themify_get($pre . 'fibgcolor_' . $fid)) {
$fi_style .= 'background-color: #' . $font_icon_bgcolor . ';';
}
if ('' != $fi_style) {
$fi_style = 'style="' . $fi_style . '"';
}
$font_icon = '<i class="' . $font_icon_class . '" ' . $fi_style . '></i>';
}
if ('' != $link_val) {
$out .= sprintf('
<li class="social-link-item %s %s %s">
<a href="%s" title="%s" %s>%s %s %s</a>
</li>
<!-- /themify-link-item -->', sanitize_title($title_val), $icon_type, $icon_size, esc_attr($link_val), $title_val, $new_window_attr, $font_icon, $img_val, $show_link_name ? $title_val : '');
}
}
$out .= '</ul>';
}
echo $out;
/* After widget (defined by themes). */
echo $after_widget;
}
示例15: themify_get
<?php
/**
* Template to load footer widgets.
* @package themify
* @since 1.0.0
*/
$footer_widget_option = '' == themify_get('setting-footer_widgets') ? 'footerwidget-3col' : themify_get('setting-footer_widgets');
if ($footer_widget_option != 'none') {
$columns = array('footerwidget-4col' => array('col4-1', 'col4-1', 'col4-1', 'col4-1'), 'footerwidget-3col' => array('col3-1', 'col3-1', 'col3-1'), 'footerwidget-2col' => array('col4-2', 'col4-2'), 'footerwidget-1col' => array(''));
if (themify_theme_has_widgets('footer-widget-', $columns[$footer_widget_option])) {
?>
<div class="footer-widgets clearfix">
<?php
$x = 0;
foreach ($columns[$footer_widget_option] as $col) {
$x++;
$class = 1 == $x ? 'first' : '';
?>
<div class="<?php
echo esc_attr($col . ' ' . $class);
?>
">
<?php
dynamic_sidebar('footer-widget-' . $x);
?>
</div>
<?php
}
?>