• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP themerex_strpos函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: esc_attr

<?php

$post_title_tag = $opt['style'] == 'list' ? 'li' : 'h5';
$reviewsBlock = '';
$title = '<' . esc_attr($post_title_tag) . ' class="sc_blogger_title sc_title' . (in_array($opt['style'], array('accordion_1', 'accordion_2')) ? ' sc_accordion_title' : '') . '">' . ((!isset($opt['links']) || $opt['links']) && !in_array($opt['style'], array('accordion_1', 'accordion_2')) ? '<a href="' . esc_url($post_data['post_link']) . '">' : '') . (themerex_substr($opt['style'], 0, 6) == 'bubble' ? '<span class="sc_title_bubble_icon ' . ($post_data['post_icon'] != '' ? ' ' . esc_attr($post_data['post_icon']) : '') . '"' . ($post_data['bubble_color'] != '' ? ' style="background-color:' . esc_attr($post_data['bubble_color']) . '"' : '') . '></span>' : '') . (in_array($opt['style'], array('accordion_1', 'accordion_2')) ? '<span class="sc_accordion_icon"></span>' : '') . esc_html($post_data['post_title']) . ((!isset($opt['links']) || $opt['links']) && !in_array($opt['style'], array('accordion_1', 'accordion_2')) ? '</a>' : '') . '</' . esc_attr($post_title_tag) . '>' . (in_array($opt['style'], array('accordion_1', 'accordion_2', 'list')) ? '' : $reviewsBlock);
if ($opt['style'] == 'list') {
    echo balanceTags($title);
} else {
    $thumb = $post_data['post_thumb'] && themerex_strpos($opt['style'], 'image') !== false ? '<div class="thumb hoverIncrease">' . ($post_data['post_link'] != '' ? balanceTags($post_data['post_thumb']) . '<a href="' . esc_url($post_data['post_link']) . '"><span class="hoverIcon"></span></a>' : balanceTags($post_data['post_thumb'])) . '<span class="hoverShadow"></span></div>' : '';
    $info = sc_param_is_on($opt['info']) ? '<div class="sc_blogger_info">' . (themerex_strpos($opt['style'], 'image') !== false || themerex_strpos($opt['style'], 'accordion') !== false ? '<div class="sc_blogger_more sc_button sc_button_style_global sc_button_size_medium squareButton global medium"><a title="" href="' . esc_url($post_data['post_link']) . '">' . ($opt['readmore'] ? esc_html($opt['readmore']) : __('More', 'themerex')) . '</a></div><div class="sc_blogger_author">' . __('Posted by', 'themerex') : __('by', 'themerex')) . ' <a href="' . esc_url($post_data['post_author_url']) . '" class="post_author">' . esc_html($post_data['post_author']) . '</a>' . ($opt['counters'] != 'none' ? ' <span class="separator">|</span> ' . ($opt['orderby'] == 'comments' || $opt['counters'] == 'comments' ? __('Comments', 'themerex') : __('Views', 'themerex')) . ' <span class="comments_number">' . ($opt['orderby'] == 'comments' || $opt['counters'] == 'comments' ? esc_html($post_data['post_comments']) : esc_html($post_data['post_views'])) . '</span>' : '') . (themerex_strpos($opt['style'], 'image') !== false || themerex_strpos($opt['style'], 'accordion') !== false ? '</div>' : '') . '</div>' : '';
    if ($opt['dir'] == 'horizontal' && $opt['style'] != 'date') {
        ?>
		<div class="columns1_<?php 
        echo esc_attr($opt['posts_visible']);
        ?>
 column_item_<?php 
        echo esc_attr($opt['number']);
        echo ($opt['number'] % 2 == 1 ? ' odd' : ' even') . ($opt['number'] == 1 ? ' first' : '') . ($opt['number'] == $opt['posts_on_page'] ? ' columns_last' : '') . (sc_param_is_on($opt['scroll']) ? ' sc_scroll_slide swiper-slide' : '');
        ?>
">

		<?php 
    }
    ?>
<article class="sc_blogger_item<?php 
    echo (in_array($opt['style'], array('accordion_1', 'accordion_2')) ? ' sc_accordion_item' : '') . ($opt['number'] == $opt['posts_on_page'] && !sc_param_is_on($opt['loadmore']) ? ' sc_blogger_item_last' : '') . (sc_param_is_on($opt['scroll']) && ($opt['dir'] == 'vertical' || $opt['style'] == 'date') ? ' sc_scroll_slide swiper-slide' : '');
    ?>
"<?php 
    echo $opt['dir'] == 'horizontal' && $opt['style'] == 'date' ? ' style="width:' . 100 / $opt['posts_on_page'] . '%"' : '';
    ?>
>
开发者ID:WestBayResidential,项目名称:wbrsorg,代码行数:31,代码来源:post-layout-blogger.php


示例2: themerex_compose_styles

 function themerex_compose_styles()
 {
     global $wp_styles, $concatenate_scripts, $compress_css, $THEMEREX_styles_collector;
     if (is_admin() || get_theme_option('compose_scripts') != 'yes' || !is_object($wp_styles)) {
         return;
     }
     //$concatenate_scripts = $compress_css = true;
     $theme_url = get_template_directory_uri();
     foreach ($wp_styles->queue as $style) {
         if (isset($wp_styles->registered[$style]) && themerex_strpos($wp_styles->registered[$style]->src, $theme_url) === 0 && themerex_strpos($wp_styles->registered[$style]->ver, 'no-compose') === false) {
             //$dir = dirname(themerex_substr($wp_styles->registered[$style]->src, themerex_strlen($wp_styles->base_url))).'/';
             $dir = dirname($wp_styles->registered[$style]->src) . '/';
             if (file_exists($file = get_template_directory() . themerex_substr($wp_styles->registered[$style]->src, themerex_strlen($theme_url)))) {
                 $css = file_get_contents($file);
                 if (isset($wp_styles->registered[$style]->extra['after'])) {
                     foreach ($wp_styles->registered[$style]->extra['after'] as $add) {
                         $css .= "\n" . $add . "\n";
                     }
                 }
                 $pos = -1;
                 while (($pos = themerex_strpos($css, 'url(', $pos + 1)) !== false) {
                     if (themerex_substr($css, $pos, 9) == 'url(data:') {
                         continue;
                     }
                     $shift = 0;
                     if (($ch = themerex_substr($css, $pos + 4, 1)) == '"' || $ch == "'") {
                         $shift = 1;
                     }
                     $css = themerex_substr($css, 0, $pos + 4 + $shift) . $dir . themerex_substr($css, $pos + 4 + $shift);
                 }
                 $THEMEREX_styles_collector .= "\n" . $css . "\n";
                 $wp_styles->done[] = $style;
             }
         }
     }
     if ($THEMEREX_styles_collector) {
         echo "\n<!-- Stylesheets composer -->\n<style type=\"text/css\">\n" . $THEMEREX_styles_collector . "\n</style>\n<!-- /Stylesheets composer -->\n";
     }
 }
开发者ID:eq0rip,项目名称:Hamroreview.com,代码行数:39,代码来源:functions.php


示例3: getSelectorPropertyFromCSS

function getSelectorPropertyFromCSS($css, $selector, $prop)
{
    $rez = '';
    if (!file_exists($css)) {
        return $rez;
    }
    $file = file($css);
    foreach ($file as $row) {
        if (($pos = themerex_strpos($row, $selector)) === false) {
            continue;
        }
        if (($pos2 = themerex_strpos($row, $prop . ':', $pos)) !== false && ($pos3 = themerex_strpos($row, ';', $pos2)) !== false && $pos2 < $pos3) {
            $rez = trim(chop(themerex_substr($row, $pos2 + themerex_strlen($prop) + 1, $pos3 - $pos2 - themerex_strlen($prop) - 1)));
            break;
        }
    }
    return $rez;
}
开发者ID:eq0rip,项目名称:Hamroreview.com,代码行数:18,代码来源:_utils.php


示例4: get_theme_option

							</div>
							<script type="text/javascript">
								var reviews_max_level = <?php 
        echo $maxLevel;
        ?>
;
								var reviews_levels = "<?php 
        echo get_theme_option('reviews_criterias_levels');
        ?>
";
								var reviews_vote = "<?php 
        echo isset($_COOKIE['reviews_vote']) ? $_COOKIE['reviews_vote'] : '';
        ?>
";
								var allowUserReviews = <?php 
        echo (!$reviews_first_author || !$reviews_second_hide) && (!isset($_COOKIE['reviews_vote']) || themerex_strpos($_COOKIE['reviews_vote'], ',' . $post_id . ',') === false) && (get_theme_option('reviews_can_vote') == 'all' || is_user_logged_in()) ? 'true' : 'false';
        ?>
;
								jQuery(document).ready(function () {
									<?php 
        if ($use_tabs) {
            ?>
									jQuery('.post_reviews').tabs();
									<?php 
        }
        ?>
									initReviews(true);
									
									// Save user's marks
									if (allowUserReviews) {
										jQuery('.reviews_users_accept').click(function(e) {
开发者ID:eq0rip,项目名称:Hamroreview.com,代码行数:31,代码来源:single.php


示例5: getUploadsDirFromURL

function getUploadsDirFromURL($url)
{
    $upload_info = wp_upload_dir();
    $upload_dir = $upload_info['basedir'];
    $upload_url = $upload_info['baseurl'];
    $http_prefix = "http://";
    $https_prefix = "https://";
    if (!strncmp($url, $https_prefix, themerex_strlen($https_prefix))) {
        //if url begins with https:// make $upload_url begin with https:// as well
        $upload_url = str_replace($http_prefix, $https_prefix, $upload_url);
    } else {
        if (!strncmp($url, $http_prefix, themerex_strlen($http_prefix))) {
            //if url begins with http:// make $upload_url begin with http:// as well
            $upload_url = str_replace($https_prefix, $http_prefix, $upload_url);
        }
    }
    // Check if $img_url is local.
    if (false === themerex_strpos($url, $upload_url)) {
        return false;
    }
    // Define path of image.
    $rel_path = str_replace($upload_url, '', $url);
    $img_path = $upload_dir . $rel_path;
    return $img_path;
}
开发者ID:eq0rip,项目名称:Hamroreview.com,代码行数:25,代码来源:_wp_utils.php


示例6: themerex_callback_view_more_posts

 function themerex_callback_view_more_posts()
 {
     global $_REQUEST, $post, $wp_query;
     if (!wp_verify_nonce($_REQUEST['nonce'], 'ajax_nonce')) {
         die;
     }
     $response = array('error' => '', 'data' => '', 'no_more_data' => 0);
     $page = $_REQUEST['page'];
     $args = unserialize(stripslashes($_REQUEST['data']));
     $vars = unserialize(stripslashes($_REQUEST['vars']));
     if ($page > 0 && is_array($args) && is_array($vars)) {
         extract($vars);
         $args['page'] = $page;
         $args['paged'] = $page;
         $args['ignore_sticky_posts'] = 1;
         if (!isset($wp_query)) {
             $wp_query = new WP_Query($args);
         } else {
             query_posts($args);
         }
         $per_page = count($wp_query->posts);
         $response['no_more_data'] = $page >= $wp_query->max_num_pages;
         //$per_page < $ppp;
         $post_number = 0;
         $accent_color = '';
         $response['data'] = '';
         $flt_ids = array();
         while (have_posts()) {
             the_post();
             $post_number++;
             $post_args = array('layout' => in_array(themerex_substr($vars['blog_style'], 0, 7), array('classic', 'masonry', 'portfol')) ? themerex_substr($vars['blog_style'], 0, 7) : $vars['blog_style'], 'number' => $post_number, 'add_view_more' => false, 'posts_on_page' => $per_page, 'thumb_size' => $vars['blog_style'], 'thumb_crop' => themerex_strpos($vars['blog_style'], 'masonry') === false, 'strip_teaser' => false, 'parent_cat_id' => $vars['parent_cat_id'], 'sidebar' => !in_array($vars['show_sidebar_main'], array('none', 'fullwidth')), 'filters' => $vars['filters'], 'hover' => $vars['hover'], 'show' => false);
             $post_data = getPostData($post_args);
             $response['data'] .= showPostLayout($post_args, $post_data);
             if ($vars['filters'] == 'tags') {
                 if (count($post_data['post_tags_list']) > 0) {
                     foreach ($post_data['post_tags_list'] as $tag) {
                         $flt_ids[$tag->term_id] = $tag->name;
                     }
                 }
             }
         }
         $response['filters'] = $flt_ids;
     } else {
         $response['error'] = __('Wrong query arguments', 'themerex');
     }
     echo json_encode($response);
     die;
 }
开发者ID:amankatoch,项目名称:wp-plugin,代码行数:48,代码来源:functions.php


示例7: form

    /**
     * Displays the widget settings controls on the widget panel.
     * Make use of the get_field_id() and get_field_name() function
     * when creating your form elements. This handles the confusing stuff.
     */
    function form($instance)
    {
        /* Set up some default widget settings. */
        $defaults = array('title' => '', 'post_type' => 'post', 'description' => __('Posts and Events Calendar', 'themerex'));
        $instance = wp_parse_args((array) $instance, $defaults);
        $title = isset($instance['title']) ? $instance['title'] : '';
        $post_type = isset($instance['post_type']) ? $instance['post_type'] : 'post';
        //$types = getPostsTypesList();
        $types = array('post' => __('Posts', 'themerex'));
        if (class_exists('TribeEvents')) {
            $types['tribe_events'] = __('Events', 'themerex');
        }
        ?>

		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('title'));
        ?>
"><?php 
        _e('Widget title:', 'themerex');
        ?>
</label>
			<input id="<?php 
        echo esc_attr($this->get_field_id('title'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('title'));
        ?>
" value="<?php 
        echo esc_attr($title);
        ?>
" style="width:100%;" />
		</p>

		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('post_type'));
        ?>
_1"><?php 
        _e('Post type:', 'themerex');
        ?>
</label>
			<?php 
        $i = 0;
        foreach ($types as $type => $type_title) {
            $i++;
            echo '<input type="checkbox" id="' . esc_attr($this->get_field_id('post_type')) . '_' . esc_attr($i) . '" name="' . esc_attr($this->get_field_name('post_type')) . '[]" value="' . esc_attr($type) . '"' . (themerex_strpos($post_type, $type) !== false ? ' checked="checked"' : '') . '><label for="' . esc_attr($this->get_field_id('post_type')) . '_' . esc_attr($i) . '">' . esc_html($type_title) . '</label> ';
        }
        ?>
			</select>
			<br><span class="description"><?php 
        _e('Attention! If you check both post types, please check also "Include events in main blog loop" in the menu "Events - Settings"', 'themerex');
        ?>
</span>
		</p>

	<?php 
    }
开发者ID:WestBayResidential,项目名称:wbrsorg,代码行数:63,代码来源:widget-calendar.php


示例8: getPostLikes

    } else {
        if ($show_counters == 'likes') {
            $post_counters = getPostLikes($post_id);
            $post_counters_icon = 'heart-1';
        } else {
            if ($show_counters == 'stars' || $show_counters == 'rating') {
                $post_counters = marksToDisplay(get_post_meta($post_id, $post_rating, true));
                $post_counters_icon = 'star-1';
            } else {
                $post_counters = get_comments_number($post_id);
                $post_counters_icon = 'comment-1';
            }
        }
    }
    if ($show_counters == 'stars' && $post_counters > 0) {
        if (themerex_strpos($post_counters, '.') === false) {
            $post_counters .= '.0';
        }
        if (get_custom_option('show_reviews') == 'yes') {
            $output .= '<div class="summaryRating">' . getReviewsSummaryStars($post_counters, false, false) . '</div>';
        }
    }
}
if ($show_date || $show_counters || $show_author) {
    $output .= '
			<div class="post_info">
	';
    if ($show_date) {
        $output .= '
				<span class="post_date">' . $post_date . '</span>
				';
开发者ID:derwegas,项目名称:strubbelkinder,代码行数:31,代码来源:page-part-widgets-posts.php


示例9: sc_testimonials_item

function sc_testimonials_item($atts, $content = null)
{
    if (in_shortcode_blogger()) {
        return '';
    }
    extract(shortcode_atts(array("id" => "", "name" => "", "position" => "", "photo" => "", "email" => ""), $atts));
    global $THEMEREX_sc_testimonials_count, $THEMEREX_sc_testimonials_width, $THEMEREX_sc_testimonials_height;
    $THEMEREX_sc_testimonials_count++;
    $photo = getAttachmentID($photo);
    if (empty($photo)) {
        if (!empty($email)) {
            $photo = get_avatar($email, 50);
        }
    } else {
        $photo = getResizedImageTag($photo, 50, 50);
    }
    $author_show = $position . $photo . $email != '';
    $s = (!empty($THEMEREX_sc_testimonials_width) ? 'width:' . $THEMEREX_sc_testimonials_width . (themerex_strpos($THEMEREX_sc_testimonials_width, '%') !== false ? '' : 'px') . ';' : '') . (!empty($THEMEREX_sc_testimonials_height) ? 'height:' . $THEMEREX_sc_testimonials_height . (themerex_strpos($THEMEREX_sc_testimonials_height, '%') !== false ? '' : 'px') . ';' : '');
    $c = $author_show ? ' sc_testimonials_item_author_show' : '';
    //if (empty($photo)) $photo = '<img src="'.get_template_directory_uri().'/images/no-ava.png" alt="">';
    return '<li' . ($id ? ' id="sc_testimonials_item_' . $id . '"' : '') . ' class="sc_testimonials_item swiper-slide' . $c . '" ' . ($s != '' ? 'style="' . $s . '"' : '') . '>' . '<div class="sc_testimonials_item_content">' . '<div class="sc_testimonials_item_quote"><span class="sc_testimonials_item_text"><span class="sc_testimonials_item_text_before">' . do_shortcode(strip_tags($content)) . '</span></span></div>' . ($author_show ? '<div class="sc_testimonials_item_author">' . ($photo != '' ? '<div class="sc_testimonials_item_avatar">' . $photo . '</div>' : '') . '<div class="sc_testimonials_item_user">' . ($name != '' ? '<span class="sc_testimonials_item_name">' . $name . '</span>' : '') . ($position != '' ? '<span class="sc_testimonials_item_position">' . $position . '</span>' : '') . '</div>' . '</div>' : '') . '</div>' . '</li>';
}
开发者ID:riaface,项目名称:GrowBeyond,代码行数:22,代码来源:shortcodes.php


示例10: themerex_substr

<?php

global $THEMEREX_usermenu, $THEMEREX_usermenu_show;
if (empty($THEMEREX_usermenu) || !$THEMEREX_usermenu_show) {
    ?>
	<ul id="usermenu" class="usermenu_list">
    <?php 
} else {
    $menu = themerex_substr($THEMEREX_usermenu, 0, themerex_strlen($THEMEREX_usermenu) - 5);
    $pos = themerex_strpos($menu, '<ul');
    if ($pos !== false) {
        $menu = themerex_substr($menu, 0, $pos + 3) . ' class="usermenu_list"' . themerex_substr($menu, $pos + 3);
    }
    echo str_replace('class=""', '', $menu);
}
?>

<?php 
if (is_woocommerce_page() && get_custom_option('show_currency') == 'yes') {
    ?>
	<li class="usermenu_currency">
		<a href="#">$</a>
		<ul>
			<li><a href="#"><b>&#36;</b> <?php 
    _e('Dollar', 'themerex');
    ?>
</a></li>
			<li><a href="#"><b>&euro;</b> <?php 
    _e('Euro', 'themerex');
    ?>
</a></li>
开发者ID:derwegas,项目名称:strubbelkinder,代码行数:31,代码来源:page-part-user-panel.php


示例11: do_shortcode

    $post_content_full = $post->post_content;
    //get_the_content() not used, because it trim content up to <!-- more --> in each case!
    $post_content_prepared = do_shortcode($post_content_full);
} else {
    // ----------------- New way to get title, excerpt and content -----------------------
    $post_title = get_the_title();
    global $more;
    $old_more = $more;
    $more = -1;
    $post_content_full = get_the_content();
    $post_content_prepared = do_shortcode($post_content_full);
    $more = $old_more;
    $post_content = get_the_content('<span class="readmore">' . __('Read more', 'themerex') . '</span>');
    $post_excerpt = has_excerpt() || $post_protected ? get_the_excerpt() : '';
    if (empty($post_excerpt)) {
        if (($more_pos = themerex_strpos($post_content_full, '<span id="more-')) !== false) {
            $post_excerpt = themerex_substr($post_content_full, 0, $more_pos);
        } else {
            $post_excerpt = in_array($post_format, array('quote', 'link')) ? $post_content : get_the_excerpt();
        }
    }
    $post_excerpt = $post_descr = str_replace('[&hellip;]', '', force_balance_tags($post_excerpt));
}
// Substitute WP [gallery] shortcode
if (get_custom_option('substitute_gallery') == 'yes') {
    $post_excerpt = substituteGallery($post_excerpt, $post_id, $thumb_size[$blog_style]['w'], $thumb_size[$blog_style]['h']);
    $post_descr = substituteGallery($post_descr, $post_id, $thumb_size[$blog_style]['w'], $thumb_size[$blog_style]['h']);
    $post_content = substituteGallery($post_content, $post_id, $thumb_size[$blog_style]['w'], $thumb_size[$blog_style]['h'], 'none', true);
}
$post_title = apply_filters('the_title', $post_title);
$post_descr = apply_filters(in_array($post_format, array('quote', 'link')) ? 'the_content' : 'the_excerpt', $post_descr);
开发者ID:eq0rip,项目名称:Hamroreview.com,代码行数:31,代码来源:template-blog-loop.php


示例12: strip_tags

    }
    // Author marks
    $output .= '<div class="sc_tabs_array">';
    if ($reviews_first_author || !$reviews_second_hide) {
        $field["id"] = "reviews_marks_author";
        $field["descr"] = strip_tags($post_data['post_excerpt']);
        $field["accept"] = false;
        $marks = marksToDisplay(marksPrepare(get_custom_option('reviews_marks'), count($field['options'])));
        $output .= '<div class="reviewTab" id="author-tabs">' . getReviewsMarkup($field, $marks, false, false, $reviews_first_author) . '</div>';
    }
    // Users marks
    if (!$reviews_first_author || !$reviews_second_hide) {
        $marks = marksToDisplay(marksPrepare(get_post_meta($post_data['post_id'], 'reviews_marks2', true), count($field['options'])));
        $users = max(0, get_post_meta($post_data['post_id'], 'reviews_users', true));
        $field["id"] = "reviews_marks_users";
        $field["descr"] = sprintf(__("Summary rating from <b>%s</b> user's marks.", 'themerex'), $users) . ' ' . (!isset($_COOKIE['reviews_vote']) || themerex_strpos($_COOKIE['reviews_vote'], ',' . $post_data['post_id'] . ',') === false ? __('You can set own marks for this article - just click on stars above and press "Accept".', 'themerex') : __('Thanks for your vote!', 'themerex'));
        $field["accept"] = $allowUserReviews;
        $output .= '<div class="reviewTab" id="users-tabs"' . (!$output ? ' style="display: block;"' : '') . '>' . getReviewsMarkup($field, $marks, $allowUserReviews, false, !$reviews_first_author) . '</div>';
    }
    $output .= '</div>';
    $THEMEREX_REVIEWS_RATING .= $output . '</div>';
    if ($allowUserReviews) {
        $THEMEREX_REVIEWS_RATING .= '
			<script type="text/javascript">
				var reviews_max_level = ' . $maxLevel . ';
				var reviews_levels = "' . get_theme_option('reviews_criterias_levels') . '";
				var reviews_vote = "' . (isset($_COOKIE['reviews_vote']) ? $_COOKIE['reviews_vote'] : '') . '";
				var marks = "' . $marks . '".split(",");
				var users = ' . max(0, $users) . ';
				var post_id = ' . $post_data['post_id'] . ';
				allowUserReviews = ' . ($allowUserReviews ? 'true' : 'false') . ';
开发者ID:riaface,项目名称:GrowBeyond,代码行数:31,代码来源:page-part-reviews-block.php


示例13: sc_title

function sc_title($atts, $content = null)
{
    extract(shortcode_atts(array("id" => "", "type" => "1", "style" => "regular", "icon" => "", "bubble_color" => "", "weight" => "", "top" => "", "bottom" => "", "left" => "", "right" => ""), $atts));
    $s = ($top !== '' ? 'margin-top:' . $top . 'px;' : '') . ($bottom !== '' ? 'margin-bottom:' . $bottom . 'px;' : '') . ($left !== '' ? 'margin-left:' . $left . 'px;' : '') . ($right !== '' ? 'margin-right:' . $right . 'px;' : '') . ($weight ? 'font-weight:' . $weight . ';' : '');
    $type = min(6, max(1, $type));
    $icon_file = $icon != '' && file_exists(get_template_directory() . '/images/icons/' . $icon . '.png');
    return '<h' . $type . ($id ? ' id="' . $id . '"' : '') . ($style == 'underline' ? ' class="sc_title_underline"' : (themerex_strpos($style, 'bubble') !== false ? ' class="sc_title_bubble sc_title_' . $style . '"' : (themerex_strpos($style, 'icon') !== false ? ' class="sc_title_icon sc_title_' . $style . '"' : ''))) . ($s != '' ? ' style="' . $s . '"' : '') . '>' . (themerex_substr($style, 0, 6) == 'bubble' ? '<span class="sc_title_bubble_icon ' . ($icon != '' && !$icon_file ? ' icon-' . $icon : '') . '"' . ($bubble_color != '' ? ' style="background-color:' . $bubble_color . '"' : '') . '>' . ($icon_file ? '<img src="' . get_template_directory_uri() . '/images/icons/' . $icon . '.png" />' : '') . '</span>' : (themerex_substr($style, 0, 4) == 'icon' ? '<img src="' . get_template_directory_uri() . '/images/icons/' . $icon . '.png" />' . ($style == 'icon_top' ? '<br />' : '') : '')) . do_shortcode($content) . '</h' . $type . '>';
}
开发者ID:eq0rip,项目名称:Hamroreview.com,代码行数:8,代码来源:shortcodes.php


示例14: is_themerex_options_used

function is_themerex_options_used()
{
    return is_admin() && (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'themerex_options_save' || $_REQUEST['action'] == 'themerex_options_import') || themerex_strpos($_SERVER['REQUEST_URI'], 'themerex_options') !== false || themerex_strpos($_SERVER['REQUEST_URI'], 'post-new.php') !== false || themerex_strpos($_SERVER['REQUEST_URI'], 'post.php') !== false || themerex_strpos($_SERVER['REQUEST_URI'], 'edit-tags.php') !== false && themerex_strpos($_SERVER['REQUEST_URI'], 'taxonomy=category') !== false || isset($_POST['meta_box_category_nonce']) || isset($_REQUEST['action']) && $_REQUEST['action'] == 'add-tag' && isset($_REQUEST['_wp_http_referer']) && themerex_strpos($_REQUEST['_wp_http_referer'], 'edit-tags.php') !== false && themerex_strpos($_REQUEST['_wp_http_referer'], 'taxonomy=category') !== false) || !is_admin() && (get_theme_option("allow_editor") == 'yes' && (is_single() && current_user_can('edit_posts', get_the_ID()) || is_page() && current_user_can('edit_pages', get_the_ID())));
}
开发者ID:derwegas,项目名称:strubbelkinder,代码行数:4,代码来源:theme-settings.php


示例15: themerex_get_file_dir

<?php

$post_title_tag = $opt['style'] == 'list' ? 'li' : 'h4';
require themerex_get_file_dir('/templates/page-part-reviews-summary.php');
$title = '<' . $post_title_tag . ' class="sc_blogger_title sc_title' . (in_array($opt['style'], array('accordion_1', 'accordion_2')) ? ' sc_accordion_title' : '') . '">' . ((!isset($opt['links']) || $opt['links']) && !in_array($opt['style'], array('accordion_1', 'accordion_2')) ? '<a href="' . $post_data['post_link'] . '">' : '') . (themerex_substr($opt['style'], 0, 6) == 'bubble' ? '<span class="sc_title_bubble_icon ' . ($post_data['post_icon'] != '' ? ' ' . $post_data['post_icon'] : '') . '"' . ($post_data['bubble_color'] != '' ? ' style="background-color:' . $post_data['bubble_color'] . '"' : '') . '></span>' : '') . (in_array($opt['style'], array('accordion_1', 'accordion_2')) ? '<span class="sc_accordion_icon"></span>' : '') . $post_data['post_title'] . ((!isset($opt['links']) || $opt['links']) && !in_array($opt['style'], array('accordion_1', 'accordion_2')) ? '</a>' : '') . '</' . $post_title_tag . '>' . (in_array($opt['style'], array('accordion_1', 'accordion_2', 'list')) ? '' : $reviewsBlock);
if ($opt['style'] == 'list') {
    echo $title;
} else {
    $thumb = $post_data['post_thumb'] && themerex_strpos($opt['style'], 'image') !== false ? '<div class="thumb">' . ($post_data['post_link'] != '' ? '<a href="' . $post_data['post_link'] . '">' . $post_data['post_thumb'] . '</a>' : $post_data['post_thumb']) . '</div>' : '';
    $info = sc_param_is_on($opt['info']) ? '<div class="sc_blogger_info">' . (themerex_strpos($opt['style'], 'image') !== false || themerex_strpos($opt['style'], 'accordion') !== false ? '<div class="squareButton light ico sc_blogger_more"><a class="icon-link" title="" href="' . $post_data['post_link'] . '">' . ($opt['readmore'] ? $opt['readmore'] : __('More', 'themerex')) . '</a></div><div class="sc_blogger_author">' . __('Posted by', 'themerex') : __('by', 'themerex')) . ' <a href="' . $post_data['post_author_url'] . '" class="post_author">' . $post_data['post_author'] . '</a>' . ($opt['counters'] != 'none' ? ' <span class="separator">|</span> ' . ($opt['orderby'] == 'comments' || $opt['counters'] == 'comments' ? __('Comments', 'themerex') : __('Views', 'themerex')) . ' <span class="comments_number">' . ($opt['orderby'] == 'comments' || $opt['counters'] == 'comments' ? $post_data['post_comments'] : $post_data['post_views']) . '</span>' : '') . (themerex_strpos($opt['style'], 'image') !== false || themerex_strpos($opt['style'], 'accordion') !== false ? '</div>' : '') . '</div>' : '';
    if ($opt['dir'] == 'horizontal' && $opt['style'] != 'date') {
        ?>
		<div class="columns1_<?php 
        echo $opt['posts_visible'];
        ?>
 column_item_<?php 
        echo $opt['number'];
        echo ($opt['number'] % 2 == 1 ? ' odd' : ' even') . ($opt['number'] == 1 ? ' first' : '') . ($opt['number'] == $opt['posts_on_page'] ? ' columns_last' : '');
        //. (sc_param_is_on($opt['scroll']) ? ' sc_scroll_slide swiper-slide' : '');
        ?>
">

		<?php 
    }
    ?>
<article class="sc_blogger_item<?php 
    echo (in_array($opt['style'], array('accordion_1', 'accordion_2')) ? ' sc_accordion_item' : '') . ($opt['number'] == $opt['posts_on_page'] && !sc_param_is_on($opt['loadmore']) ? ' sc_blogger_item_last' : '');
    //. (sc_param_is_on($opt['scroll']) && ($opt['dir'] == 'vertical' || $opt['style'] == 'date') ? ' sc_scroll_slide swiper-slide' : '');
    ?>
"<?php 
    echo $opt['dir'] == 'horizontal' && $opt['style'] == 'date' ? ' style="width:' . 100 / $opt['posts_on_page'] . '%"' : '';
开发者ID:amankatoch,项目名称:wp-plugin,代码行数:31,代码来源:post-layout-blogger.php


示例16: is_themerex_options_used

function is_themerex_options_used()
{
    return is_admin() && (isset($_REQUEST['action']) && $_REQUEST['action'] == 'themerex_options_save' || themerex_strpos($_SERVER['REQUEST_URI'], 'themerex_options') !== false || themerex_strpos($_SERVER['REQUEST_URI'], 'post-new.php') !== false || themerex_strpos($_SERVER['REQUEST_URI'], 'post.php') !== false || themerex_strpos($_SERVER['REQUEST_URI'], 'edit-tags.php') !== false && themerex_strpos($_SERVER['REQUEST_URI'], 'taxonomy=category') !== false);
}
开发者ID:nickandersonr,项目名称:FriedMagazine,代码行数:4,代码来源:theme-settings.php


示例17: replace_uploads

 function replace_uploads($str)
 {
     if (is_array($str)) {
         foreach ($str as $k => $v) {
             $str[$k] = $this->replace_uploads($v);
         }
     } else {
         if (is_string($str)) {
             while (($pos = themerex_strpos($str, "/{$this->options['uploads_folder']}/")) !== false) {
                 $pos0 = $pos;
                 while ($pos0) {
                     if (themerex_substr($str, $pos0, 5) == 'http:') {
                         break;
                     }
                     $pos0--;
                 }
                 $str = ($pos0 > 0 ? themerex_substr($str, 0, $pos0) : '') . $this->uploads_url . themerex_substr($str, $pos + themerex_strlen($this->options['uploads_folder']) + 1);
             }
         }
     }
     return $str;
 }
开发者ID:WestBayResidential,项目名称:wbrsorg,代码行数:22,代码来源:importer.php


示例18: prepareThemeCustomStyles

function prepareThemeCustomStyles()
{
    // Custom fonts
    if (get_custom_option('typography_custom') == 'yes') {
        $s = '';
        $fonts = getThemeFontsList(false);
        $fname = get_custom_option('typography_p_font');
        if (isset($fonts[$fname])) {
            $fstyle = explode(',', get_custom_option('typography_p_style'));
            $fname2 = ($pos = themerex_strpos($fname, ' (')) !== false ? themerex_substr($fname, 0, $pos) : $fname;
            $i = in_array('i', $fstyle);
            $u = in_array('u', $fstyle);
            $c = get_custom_option('typography_p_color');
            $s .= "\n\t\t\t\tbody, button, input, select, textarea {\n\t\t\t\t\tfont-family: '" . $fname2 . "'" . (isset($fonts[$fname]['family']) ? ", " . $fonts[$fname]['family'] : '') . ";\n\t\t\t\t}\n\t\t\t\tbody {\n\t\t\t\t\tfont-size: " . get_custom_option('typography_p_size') . "px;\n\t\t\t\t\tfont-weight: " . get_custom_option('typography_p_weight') . ";\n\t\t\t\t\tline-height: " . get_custom_option('typography_p_lineheight') . "px;\n\t\t\t\t\t" . ($c ? "color: " . $c . ";" : '') . "\n\t\t\t\t\t" . ($i ? "font-style: italic;" : '') . "\n\t\t\t\t\t" . ($u ? "text-decoration: underline;" : '') . "\n\t\t\t\t}\n\t\t\t";
        }
        for ($h = 1; $h <= 6; $h++) {
            $fname = get_custom_option('typography_h' . $h . '_font');
            if (isset($fonts[$fname])) {
                $fstyle = explode(',', get_custom_option('typography_h' . $h . '_style'));
                $fname2 = ($pos = themerex_strpos($fname, ' (')) !== false ? themerex_substr($fname, 0, $pos) : $fname;
                $i = in_array('i', $fstyle);
                $u = in_array('u', $fstyle);
                $c = get_custom_option('typography_h' . $h . '_color');
                $s .= "\n\t\t\t\t\th" . $h . ", .h" . $h . " {\n\t\t\t\t\t\tfont-family: '" . $fname2 . "'" . (isset($fonts[$fname]['family']) ? ", " . $fonts[$fname]['family'] : '') . ";\n\t\t\t\t\t\tfont-size: " . get_custom_option('typography_h' . $h . '_size') . "px;\n\t\t\t\t\t\tfont-weight: " . get_custom_option('typography_h' . $h . '_weight') . ";\n\t\t\t\t\t\tline-height: " . get_custom_option('typography_h' . $h . '_lineheight') . "px;\n\t\t\t\t\t\t" . ($c ? "color: " . $c . ";" : '') . "\n\t\t\t\t\t\t" . ($i ? "font-style: italic;" : '') . "\n\t\t\t\t\t\t" . ($u ? "text-decoration: underline;" : '') . "\n\t\t\t\t\t}\n\t\t\t\t\th" . $h . " a, .h" . $h . " a {\n\t\t\t\t\t\t" . ($c ? "color: " . $c . ";" : '') . "\n\t\t\t\t\t}\n\t\t\t\t";
            }
        }
        if (!empty($s)) {
            addThemeCustomStyle($s);
        }
    }
    // Submenu width
    $menu_width = (int) get_theme_option('menu_width');
    if ($menu_width > 50) {
        addThemeCustomStyle("\n\t\t\t.topWrap .topMenuStyleFon > ul > li ul,\n\t\t\t.topWrap .topMenuStyleLine > ul > li ul {\n\t\t\t\twidth: {$menu_width}px;\n\t\t\t}\n\t\t\t.topWrap .topMenuStyleFon > ul > li ul li ul {\n\t\t\t\tleft: " . ($menu_width + 10) . "px;\n\t\t\t}\n\t\t\t.menu_right .topWrap .topMenuStyleFon ul.submenu_left {\n\t\t\t\tleft: -" . ($menu_width + 10) . "px !important;\n\t\t\t}\n\n\t\t\t.topWrap .topMenuStyleLine > ul > li ul li ul {\n\t\t\t\tleft: " . ($menu_width + 2) . "px;\n\t\t\t}\n\t\t\t.menu_right .topWrap .topMenuStyleLine ul.submenu_left {\n\t\t\t\tleft: -" . ($menu_width + 4) . "px !important;\n\t\t\t}\n\t\t\tul#mainmenu .menu-panel ul.columns > li ul {\n\t\t\t\tmax-width: " . $menu_width . "px;\n\t\t\t}\n\n\t\t");
    }
    // Logo height
    $logo_height = (int) get_custom_option('logo_height');
    $logo_offset = (int) get_custom_option('logo_offset');
    if ($logo_height > 10) {
        if (empty($logo_offset)) {
            $logo_offset = max(20, round((100 - $logo_height) / 2));
        }
        $add = max(0, round(($logo_offset * 2 + $logo_height - 100) / 2));
        addThemeCustomStyle("\n\t\t\theader.noFixMenu .topWrap .logo {\n\t\t\t\theight: " . $logo_height . "px;\n\t\t\t}\n\t\t\theader.noFixMenu .topWrap .logo img {\n\t\t\t\theight: " . $logo_height . "px;\n\t\t\t}\n\t\t\theader.noFixMenu .topWrap .logo .logo_text {\n\t\t\t\tline-height: " . $logo_height . "px;\n\t\t\t}\n\t\t\theader.noFixMenu.menu_right .topWrap .openRightMenu,\n\t\t\theader.noFixMenu.menu_right .topWrap .search {\n\t\t\t\tmargin-top: " . (33 + $add) . "px;\n\t\t\t\tmargin-bottom: " . (37 + $add) . "px;\n\t\t\t}\n\t\t\theader.noFixMenu.menu_right .topWrap .topMenuStyleLine > ul > li,\n\t\t\theader.noFixMenu.menu_right .topWrap .topMenuStyleFon > ul > li {\n\t\t\t\tpadding-top: " . (30 + $add) . "px;\n\t\t\t\tpadding-bottom: " . (30 + $add) . "px;\n\t\t\t}\n\t\t\theader.noFixMenu.menu_right .topWrap .topMenuStyleFon > ul#mainmenu > li > .menu-panel,\n\t\t\theader.noFixMenu.menu_right .topWrap .topMenuStyleFon > ul > li > ul {\n\t\t\t\ttop: " . (67 + $add) . "px;\n\t\t\t}\n\t\t\theader.noFixMenu.menu_right .topWrap .topMenuStyleLine > ul#mainmenu > li > .menu-panel,\n\t\t\theader.noFixMenu.menu_right .topWrap .topMenuStyleLine > ul > li > ul {\n\t\t\t\ttop: " . (100 + $add) . "px;\n\t\t\t}\n\t\t");
    }
    // Logo top offset
    if ($logo_offset > 0) {
        addThemeCustomStyle("\n\t\t\theader.noFixMenu .topWrap .logo {\n\t\t\t\tpadding: " . $logo_offset . "px 0 0 0;\n\t\t\t}\n\t\t");
    }
    $logo_height = (int) get_theme_option('logo_image_footer_height');
    if ($logo_height > 10) {
        addThemeCustomStyle("\n\t\t\tfooter .logo img {\n\t\t\t\theight: " . $logo_height . "px;\n\t\t\t}\n\t\t");
    }
    // Main Slider height
    $slider_height = (int) get_custom_option('slider_height');
    if ($slider_height > 10) {
        addThemeCustomStyle("\n\t\t\t.sliderHomeBullets {\n\t\t\t\theight: " . $slider_height . "px;\n\t\t\t}\n\t\t");
    }
    // Custom css from theme options
    $css = get_custom_option('custom_css');
    if (!empty($css)) {
        addThemeCustomStyle($css);
    }
    $custom_style = '';
    $customizer = get_theme_option('show_theme_customizer') == 'yes';
    // Theme color from customizer
    $clr = '';
    if ($customizer) {
        $clr = getValueGPC('theme_color', '');
    }
    if (empty($clr)) {
        $clr = get_custom_option('theme_color');
    }
    if (!empty($clr)) {
        $rgb = hex2rgb($clr);
        $custom_style .= '
a:hover,
.theme_accent,
.topTabsWrap .speedBar a:hover,
.topWrap .topMenuStyleFon > ul li a:hover,
.topWrap .topMenuStyleFon > ul > li.sfHover > a,
.topWrap .topMenuStyleFon > ul > li > a.sf-with-ul:hover,
.topWrap .topMenuStyleFon > ul > li ul a.sf-with-ul:after,
.topWrap .topMenuStyleLine > ul > li ul li a:hover,
.topMenuStyleFon ul#m 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP themerex_substr函数代码示例发布时间:2022-05-23
下一篇:
PHP themerex_get_file_url函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap