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


PHP miss_get_setting函数代码示例

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


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

示例1: twitter

 /**
  *
  */
 public static function twitter($atts = null)
 {
     if ($atts == 'generator') {
         $numbers = range(1, 20);
         foreach ($numbers as $val) {
             $number[$val] = $val;
         }
         $option = array('name' => __('Twitter', MISS_ADMIN_TEXTDOMAIN), 'value' => 'twitter', 'options' => array(array('name' => __('Username', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Paste your twitter username here.  You can find your username by going to your settings page within twitter.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'id', 'default' => '', 'type' => 'text'), array('name' => __('Count', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Select how many tweets you want to be displayed.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'number', 'default' => '', 'options' => $number, 'type' => 'select'), 'shortcode_has_atts' => true));
         return $option;
     }
     $defaults = array('id' => '', 'number' => '1', 'title' => ' ');
     if (isset($atts['count'])) {
         $atts['number'] = $atts['count'];
     }
     if (isset($atts['username'])) {
         $atts['id'] = $atts['username'];
     }
     if (empty($atts['id'])) {
         $atts['id'] = miss_get_setting('twitter_id');
     }
     $atts = wp_parse_args($atts, $defaults);
     $instance = http_build_query($atts);
     $args = array('widget_name' => 'IrishMissW_Twitter_Widget', 'instance' => $instance);
     $widget = new missWidgets();
     return $widget->_widget_generator($args);
 }
开发者ID:schiz,项目名称:scrollax,代码行数:29,代码来源:widgets.php

示例2: widget

 /**
  *
  */
 function widget($args, $instance)
 {
     global $wpdb, $shortname, $irish_framework_params;
     $prefix = MISS_PREFIX;
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts', MISS_TEXTDOMAIN) : $instance['title'], $instance, $this->id_base);
     $tagline = apply_filters('widget_tagline', empty($instance['tagline']) ? '' : '<h6>' . $instance['tagline'] . '</h6>', $instance, $this->id_base);
     if (!($number = (int) $instance['number'])) {
         $number = 3;
     } else {
         if ($number < 1) {
             $number = 1;
         } else {
             if ($number > 15) {
                 $number = 15;
             }
         }
     }
     $out = $before_widget;
     $out .= $before_title . $title . $after_title . $tagline;
     $disable_thumb = $instance['disable_thumb'] ? '1' : '0';
     $show_rating = isset($instance['show_rating']) ? '1' : '0';
     $recent_query = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'post_status' => 'publish', 'category__not_in' => array(miss_exclude_category_string($minus = false)), 'ignore_sticky_posts' => 1));
     if ($recent_query->have_posts()) {
         $out .= '<ul class="post_list small_post_list">';
         while ($recent_query->have_posts()) {
             $recent_query->the_post();
             $out .= '<li class="post_list_module">';
             /*				
             					$out .= miss_get_post_image( $filter_args );
             				$get_year = get_the_time( 'Y', get_the_ID() );
             				$get_month = get_the_time( 'm', get_the_ID() );
              else {
             					$out .= '<div class="month pull-left">';
             					$out .= '<span class="day">';
             					$out .= get_the_date('d');
             					$out .= '</span>';
             					$out .= get_the_date('M');
             					$out .= '</div>';
             				}
             */
             if (!$disable_thumb) {
                 $widget_thumb_img = $irish_framework_params->layout['big_sidebar_images']['small_post_list'];
                 $out .= miss_get_post_image(array('width' => $widget_thumb_img[0], 'height' => $widget_thumb_img[1], 'img_class' => 'image', 'preload' => false, 'placeholder' => true, 'echo' => false, 'wp_resize' => miss_get_setting('image_resize_type') == 'wordpress' ? true : false));
             }
             $out .= '<p class="post_title">';
             $out .= '<a rel="bookmark" href="' . esc_url(get_permalink()) . '" title="' . esc_attr(get_the_title()) . '">' . get_the_title() . '</a>';
             $out .= '</p>';
             $out .= '<div class="post_excerpt">';
             $out .= miss_excerpt(get_the_excerpt(), apply_filters('miss_home_spotlight_excerpt', 60), apply_filters('miss_excerpt', THEME_ELLIPSIS));
             $out .= '</div>';
             $out .= '<div class="clearboth"></div>';
             $out .= '</li>';
         }
         $out .= '</ul>';
     }
     $out .= $after_widget;
     wp_reset_postdata();
     echo $out;
 }
开发者ID:schiz,项目名称:scrollax,代码行数:63,代码来源:widget-recent.php

示例3: im_partners

 /**
  *
  */
 public static function im_partners($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array('name' => __('Partners', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_partners', 'icon' => 'im-icon-trophy-star', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array("type" => "dropdown", "heading" => __("Viewport Animation", "js_composer"), "param_name" => "animation", "value" => miss_js_composer_css_animation(), "description" => __("Viewport animation will be triggered when this element is being viewed when you scroll page down. you only need to choose the animation style from this option. please note that this only works in moderns. We have disabled this feature in touch devices to increase browsing speed.", "js_composer"))));
     }
     extract(shortcode_atts(array('animation' => ''), $atts));
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $out = '';
     $empty_cell = "";
     if (miss_get_setting('disable_partners_section') == 'display_all' || miss_get_setting('disable_partners_section') == 'only_front_page' && is_front_page()) {
         $out .= '	<section class="row our-partners">';
         if (miss_partners_shortcuts() != false) {
             $out .= '               <header class="section-header span12">
                                     <h1 class="header">
                                         <span>' . miss_get_setting('partners_caption') . '</span>
                                     </h1>
                                 </header>';
             $out .= '               <div class="inner-wrapp span12">';
             $partners = miss_get_setting('partners');
             if ($partners['keys'] != '#' and $partners != '') {
                 $partners_keys = explode(',', $partners['keys']);
                 if (array_key_exists('#', $partners)) {
                     unset($partners['#']);
                     unset($partners['keys']);
                 }
                 $spans_in_row = miss_get_setting('partners_on_one_slide') ? miss_get_setting('partners_on_one_slide') : 6;
                 $span_walk = 0;
                 $row_walk = 1;
                 $flag = false;
                 $span_width = 100 / $spans_in_row;
                 $counter_item = count($partners);
                 $counter_row = $counter_item / $spans_in_row;
                 if (!is_int($counter_row)) {
                     $counter_row = ceil($counter_row);
                     $counter_residue = $counter_item - ($counter_row - 1) * $spans_in_row;
                     $counter_empty_cell = floor(($spans_in_row - $counter_residue) / 2);
                 } else {
                     $counter_residue = $counter_item - $counter_row * $spans_in_row;
                     $counter_empty_cell = 0;
                 }
                 $counter_total_cell = $counter_item + $counter_empty_cell;
                 foreach ($partners as $key => $value) {
                     if (isset($partners[$key]['custom'])) {
                         $out .= '<div class="content-item ' . $animation . '">';
                         $out .= '<a href="' . esc_url($partners[$key]['link']) . '"><img src="' . esc_url($partners[$key]['custom']) . '" alt="' . esc_url($partners[$key]['link']) . '" /></a>';
                         $out .= '</div>';
                     }
                 }
             }
             $out .= '               </div>';
         }
         $out .= '	</section><!-- /.region partners-->';
     }
     return $out;
 }
开发者ID:schiz,项目名称:scrollax,代码行数:60,代码来源:im_partners.php

示例4: form

 function form($instance)
 {
     $default = array();
     $defaults = array('title' => 'Footer Logo Widget', 'SubPages' => miss_get_setting('retina_SubPages_url'));
     $instance = wp_parse_args((array) $instance, $defaults);
     $SubPages = miss_get_setting('retina_SubPages_url');
     if (empty($SubPages)) {
         //  $SubPages = "http://cdn.irishmiss.com/i/bm/footerlogo.png";
     }
 }
开发者ID:schiz,项目名称:scrollax,代码行数:10,代码来源:widget-subpages.php

示例5: form

 function form($instance)
 {
     $default = array();
     $defaults = array('title' => 'Footer Logo Widget', 'footer_logo' => miss_get_setting('retina_footer_logo_url'));
     $instance = wp_parse_args((array) $instance, $defaults);
     $footer_logo = miss_get_setting('retina_footer_logo_url');
     if (empty($footer_logo)) {
         $footer_logo = "http://cdn.irishmiss.com/i/bm/footerlogo.png";
     }
     echo '<a href="' . home_url() . '" title="' . get_bloginfo('name') . '"><img src="' . $footer_logo . '" alt="' . get_bloginfo('name') . '" class="image-resize w" style="width: 300px; height: auto;" /></a>';
     echo '<p><a href="' . home_url() . '/wp-admin/themes.php?page=miss-options">Change logo</a> &rarr; Branding &rarr; upload "Custom Footer Logo"</p>';
 }
开发者ID:schiz,项目名称:scrollax,代码行数:12,代码来源:widget-footer-logo.php

示例6: widget

    /**
     *
     */
    function widget($args, $instance)
    {
        global $shortname;
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Tweets', MISS_TEXTDOMAIN) : $instance['title'], $instance, $this->id_base);
        $tagline = apply_filters('widget_tagline', empty($instance['tagline']) ? __('Recent Tweets', MISS_TEXTDOMAIN) : $instance['tagline'], $instance, $this->id_base);
        $id = $instance['id'];
        if (!($number = (int) $instance['number'])) {
            $number = 5;
        } else {
            if ($number < 1) {
                $number = 1;
            } else {
                if ($number > 40) {
                    $number = 40;
                }
            }
        }
        $username = isset($instance['id']) ? trim($instance['id']) : miss_get_setting('twitter_id');
        $type = 'widget';
        $miss_get_user_timeline = new miss_timeline_store($oauth_access_token = !empty($instance['oauth_access_token']) ? $instance['oauth_access_token'] : miss_get_setting('oauth_access_token'), $oauth_access_token_secret = !empty($instance['oauth_access_token_secret']) ? $instance['oauth_access_token_secret'] : miss_get_setting('oauth_access_token_secret'), $consumer_key = !empty($instance['consumer_key']) ? $instance['consumer_key'] : miss_get_setting('consumer_key'), $consumer_secret = !empty($instance['consumer_secret']) ? $instance['consumer_secret'] : miss_get_setting('consumer_secret'), $screen_name = $username, $count = $number);
        $results = $miss_get_user_timeline->returnTweet();
        ?>
            <?php 
        echo $before_widget;
        ?>
                <?php 
        echo $before_title . $title . $after_title . '<h6>' . $tagline . '</h6>';
        ?>
<ul><?php 
        if (isset($results) && is_array($results) && !empty($results)) {
            foreach ($results as $key => $tweet) {
                if ($key == "errors") {
                    echo '';
                    /*
                                                echo '<li>';
                                                echo $tweet[0]['message'];
                                                echo '</li>';
                    */
                } else {
                    echo '<li>';
                    echo '<a class="target_blank" target="_BLANK" href="http://twitter.com/1/status/' . $tweet['id_str'] . '" title="' . sprintf(esc_attr__('%1$s&nbsp;ago', MISS_TEXTDOMAIN), miss_relative_time(strtotime($tweet['created_at']))) . '">' . '<i class="im-icon-twitter pull-left"></i>' . miss_filter_tweet($tweet['text']) . '</a>';
                    echo '</li>';
                }
            }
        } else {
            echo '<li>' . __('Tweets not found.', MISS_TEXTDOMAIN) . '</li>';
        }
        ?>
</ul><?php 
        echo $after_widget;
    }
开发者ID:schiz,项目名称:scrollax,代码行数:55,代码来源:widget-twitter.php

示例7: widget

 /**
  *
  */
 function widget($args, $instance)
 {
     global $wpdb, $shortname, $irish_framework_params;
     $prefix = MISS_PREFIX;
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Top Rated', MISS_TEXTDOMAIN) : $instance['title'], $instance, $this->id_base);
     if (!($number = (int) $instance['number'])) {
         $number = 3;
     } else {
         if ($number < 1) {
             $number = 1;
         } else {
             if ($number > 15) {
                 $number = 15;
             }
         }
     }
     $out = $before_widget;
     $out .= $before_title . $title . $after_title;
     $disable_thumb = $instance['disable_thumb'] ? '1' : '0';
     $show_rating = $instance['show_rating'] ? '1' : '0';
     $top_query = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'meta_key' => '_review_0', 'orderby' => 'meta_value', 'order' => 'DESC', 'post_status' => 'publish', 'category__not_in' => array(miss_exclude_category_string($minus = false)), 'ignore_sticky_posts' => 1));
     if ($top_query->have_posts()) {
         $out .= '<ul class="post_list small_post_list">';
         while ($top_query->have_posts()) {
             $top_query->the_post();
             $out .= '<li class="post_list_module">';
             if (!$disable_thumb) {
                 $widget_thumb_img = $irish_framework_params->layout['big_sidebar_images']['small_post_list'];
                 $out .= miss_get_post_image(array('width' => $widget_thumb_img[0], 'height' => $widget_thumb_img[1], 'img_class' => 'post_list_image', 'preload' => false, 'placeholder' => true, 'echo' => false, 'wp_resize' => miss_get_setting('image_resize_type') == 'wordpress' ? true : false));
             }
             $out .= '<div class="post_list_content">';
             $out .= '<p class="post_title">';
             $out .= '<a rel="bookmark" href="' . esc_url(get_permalink()) . '" title="' . esc_attr(get_the_title()) . '">' . get_the_title() . '</a>';
             $out .= '</p>';
             $get_year = get_the_time('Y', get_the_ID());
             $get_month = get_the_time('m', get_the_ID());
             if ($show_rating && score_value(get_the_ID()) != 0) {
                 $postid = get_the_ID();
                 $score = score_value($postid);
                 $out .= '<div class="rating_box">' . score_output($score, 'small') . '</div>';
             }
             $out .= '</div>';
             $out .= '</li>';
         }
         $out .= '</ul>';
     }
     $out .= $after_widget;
     wp_reset_postdata();
     echo $out;
 }
开发者ID:schiz,项目名称:scrollax,代码行数:54,代码来源:widget-top_rated.php

示例8: miss_nav_search_box

 /**
  * Navigation Search Box
  * @since 1.5
  */
 function miss_nav_search_box($items, $args)
 {
     $disable_searchbox = apply_atomic('disable_searchbox', miss_get_setting('disable_searchbox'));
     if (!empty($disable_searchbox)) {
         return $items;
     }
     if ($args->theme_location == 'primary-menu') {
         ob_start();
         get_search_form();
         $searchform = ob_get_contents();
         ob_end_clean();
         $items .= '<li class="nav-search-box">' . $searchform . '<a class="search-button inactive" data-state="inactive">' . __("Search", MISS_TEXTDOMAIN) . '</a></li>';
     }
     return $items;
 }
开发者ID:schiz,项目名称:scrollax,代码行数:19,代码来源:function.php

示例9: widget

 /**
  *
  */
 function widget($args, $instance)
 {
     global $wpdb, $irish_framework_params;
     $prefix = MISS_PREFIX;
     $title = apply_filters('widget_title', empty($instance['title']) ? __('In Focus', MISS_TEXTDOMAIN) : $instance['title'], $instance, $this->id_base);
     extract($args);
     $post_id = array($instance['post_id']) ? array($instance['post_id']) : false;
     $args = array('showposts' => 1, 'post_status' => 'publish');
     if (isset($post_id) && $post_id) {
         $args['post__in'] = $post_id;
     }
     $infocus_query = new WP_Query($args);
     $out = '';
     echo $before_widget;
     $out .= '<div class="in_focus">';
     while ($infocus_query->have_posts()) {
         $infocus_query->the_post();
         if (!isset($disable_thumb)) {
             $widget_thumb_img = $irish_framework_params->layout['images']['blog_layout5'];
             $out .= miss_get_post_image(array('width' => $widget_thumb_img[0], 'height' => $widget_thumb_img[1], 'img_class' => 'in_focus_image', 'preload' => false, 'placeholder' => true, 'echo' => false, 'wp_resize' => miss_get_setting('image_resize_type') == 'wordpress' ? true : false));
         }
         $out .= '<div class="in_focus_bottom">';
         $out .= '	<div class="bottom_bulk_box_field">';
         $out .= '		<div class="box">';
         $out .= '			<div class="post_title">';
         $out .= '				<a rel="bookmark" href="' . esc_url(get_permalink()) . '" title="' . esc_attr(get_the_title()) . '">' . get_the_title() . '</a>';
         $out .= '			</div>';
         $out .= '		</div>';
         /*
         			$out .= '		<div class="bulk">';
         			$out .= '		</div>';
         			$out .= '		<div class="shadow">';
         			$out .= '		</div>';
         */
         $out .= '	</div><!--  class="bottom_bulk_box_field" -->';
         $out .= '</div><!--  class="in_focus_bottom" -->';
     }
     $out .= '</div><!--  class="in_focus" -->';
     echo $out;
     echo $after_widget;
 }
开发者ID:schiz,项目名称:scrollax,代码行数:44,代码来源:widget-in-focus.php

示例10: image_frame

 /**
  *
  */
 public static function image_frame($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         $option = array('name' => __('Image Frames', MISS_ADMIN_TEXTDOMAIN), 'value' => 'image_frame', 'options' => array(array('name' => __('Type', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Choose which type of frame you wish to use.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'style', 'default' => '', 'options' => array('border' => __('Transparent Border', MISS_ADMIN_TEXTDOMAIN), 'reflect' => __('Reflection', MISS_ADMIN_TEXTDOMAIN), 'shadow' => __('Shadow', MISS_ADMIN_TEXTDOMAIN), 'reflect_shadow' => __('Reflection + Shadow', MISS_ADMIN_TEXTDOMAIN), 'framed_shadow' => __('Framed + Shadow', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'select'), array('name' => __('Image URL', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('You can upload your image that you wish to use here.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'content', 'default' => '', 'type' => 'upload'), array('name' => __('Align <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Set the alignment for your image here.<br /><br />Your image will float along the center, left or right hand sides depending on your choice.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'align', 'default' => '', 'options' => array('left' => __('left', MISS_ADMIN_TEXTDOMAIN), 'right' => __('right', MISS_ADMIN_TEXTDOMAIN), 'center' => __('center', MISS_ADMIN_TEXTDOMAIN)), 'type' => 'select'), array('name' => __('Alt Attribute <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type the alt text that you would like to display with your image here.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'alt', 'default' => '', 'type' => 'text'), array('name' => __('Title Attribute <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Type the title text that you would like to display with your image here.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'title', 'default' => '', 'type' => 'text'), array('name' => __('Image Height <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('You can set the image height here.  Leave this blank if you do not want to resize your image.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'height', 'default' => '', 'type' => 'text'), array('name' => __('Image Width <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('You can set the image width here.  Leave this blank if you do not want to resize your image.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'width', 'default' => '', 'type' => 'text'), 'shortcode_has_atts' => true));
         return $option;
     }
     extract(shortcode_atts(array('style' => '', 'align' => '', 'alt' => '', 'title' => '', 'height' => '', 'width' => '', 'link_to' => 'true', 'prettyphoto' => 'true'), $atts));
     global $wp_query, $irish_framework_params;
     $out = '';
     $effect = trim($style);
     $effect = !empty($effect) ? $effect : 'framed';
     $align = $align == 'left' ? ' alignleft' : ($align == 'right' ? ' alignright' : ($align == 'center' ? ' aligncenter' : ' alignleft'));
     $class = $effect == 'reflect' ? "reflect{$align}" : ($effect == 'reflect_shadow' ? 'reflect' : ($effect == 'framed' ? "framed{$align}" : ($effect == 'framed_shadow' ? 'framed' : '')));
     $width = !empty($width) ? trim(str_replace(' ', '', str_replace('px', '', $width))) : '';
     $height = !empty($height) ? trim(str_replace(' ', '', str_replace('px', '', $height))) : '';
     if (preg_match('!http://.+\\.(?:jpe?g|png|gif)!Ui', $content, $matches)) {
         $out .= miss_display_image(array('src' => $matches[0], 'alt' => $alt, 'title' => $title, 'class' => $class, 'height' => $height, 'width' => $width, 'link_to' => $link_to == 'true' ? $matches[0] : false, 'prettyphoto' => $prettyphoto == 'true' ? true : false, 'align' => $align, 'effect' => $effect, 'wp_resize' => miss_get_setting('image_resize_type') == 'wordpress' ? true : false));
     }
     //return '[raw]' . $out . '[/raw]';
     return $out;
 }
开发者ID:schiz,项目名称:scrollax,代码行数:24,代码来源:frames.php

示例11: miss_short_url

/**
 *
 */
function miss_short_url($id, $format = 'txt', $history = 1)
{
    $enable_bitly = miss_get_setting('url_shortening');
    $bitly_login = miss_get_setting('bitly_login');
    $bitly_api = miss_get_setting('bitly_api');
    $url = get_post_meta($id, '_bitly_trim', true);
    $post_url = get_permalink($id);
    if (!$enable_bitly) {
        if ($url) {
            return $url;
        }
        $url = sprintf('%s?p=%s', home_url() . '/', $id);
        add_post_meta($id, '_bitly_trim', $url);
        return $url;
    }
    if (!empty($enable_bitly) && !empty($bitly_login) && !empty($bitly_api)) {
        if (!stristr($url, 'bit.ly')) {
            $bitly = 'http://api.bit.ly/v3/shorten?login=' . $bitly_login . '&apiKey=' . $bitly_api . '&uri=' . urlencode($post_url) . '&format=' . $format . '&history=' . $history;
            $response = wp_remote_retrieve_body(wp_remote_get($bitly));
            if (is_wp_error($response)) {
                $url = sprintf('%s?p=%s', home_url() . '/', $id);
                add_post_meta($id, '_bitly_trim', $url);
                return $url;
            }
            $url = trim($response);
            delete_post_meta($id, '_bitly_trim');
            add_post_meta($id, '_bitly_trim', $url);
            return $url;
        }
        return $url;
    }
    if ($url) {
        return $url;
    }
    $url = sprintf('%s?p=%s', home_url() . '/', $id);
    add_post_meta($id, '_bitly_trim', $url);
    return $url;
}
开发者ID:schiz,项目名称:scrollax,代码行数:41,代码来源:bookmarks.php

示例12: miss_get_gwf

 /**
  * Return active Google Web Fonts
  * @since 1.8
  */
 function miss_get_gwf()
 {
     $fonts = array();
     $gwf = miss_get_setting('google_web_fonts');
     if ($gwf['keys'] != '#' and $gwf != '') {
         $gwf_keys = explode(',', $gwf['keys']);
         if (array_key_exists('#', $gwf)) {
             unset($gwf['#']);
             unset($gwf['keys']);
         }
         foreach ($gwf as $key => $value) {
             if (isset($gwf[$key]['gwf_face_name'])) {
                 $font_safe_key = $gwf[$key]['gwf_face_name'];
                 // Set font
                 $fonts[$font_safe_key] = $font_safe_key;
             }
         }
     }
     return $fonts;
 }
开发者ID:schiz,项目名称:scrollax,代码行数:24,代码来源:core.php

示例13: miss_render_page_layout

 function miss_render_page_layout()
 {
     if ($this->layout == 'full_width') {
         echo '<div class="primary_content ' . miss_get_setting('blog_layout') . '">';
         get_template_part($this->template_part, $this->template, $this->template);
         echo '</div>';
     } else {
         if ($this->layout == 'left_sidebar') {
             /*echo '<div class="blog-section '. miss_get_setting('blog_layout') .'">';
               echo '<div class="container">';
               echo '<div class="row">';
               echo '<header class="section-header span12">
                         <h1 class="header">
                           <span>'.single_cat_title('', 0).'</span>
                         </h1>
                    </header>';
               echo '<div class="span12"><div class="row">';*/
             //$this->local_sidebar();
             $this->local_content();
             /*echo '</div></div>';
             		echo'</div>';
             		echo'</div>';
             		echo'</div>';*/
         } else {
             /*echo '<div class="blog-section '. miss_get_setting('blog_layout') .'">';
               echo '<div class="container">';
               echo '<div class="row">';
               if(is_category())
               {
                   echo '<header class="section-header span12">
                         <h1 class="header">
                           <span>';
                   echo single_cat_title('', 0);
                   echo '</span>
                         </h1>
                    </header>';
               }
               elseif(is_archive())
               {
                   echo '<div class="span12"><div class="bread-container">
                           <div class="bread-wrapper">
                           <div class="blog-title">'.post_type_archive_title('', false).'</div>';
                           dimox_breadcrumbs();
                                                  
                   echo '</div>
                       </div></div>';
               }
               else
               {
                   echo '<div class="span12"><div class="bread-container">
                           <div class="bread-wrapper">
                           <div class="blog-title">'.get_the_title().'</div>';
                           dimox_breadcrumbs();
                                                  
                   echo '</div>
                       </div></div>';
               }
               
               echo '<div class="span12"><div class="row">';*/
             $this->local_content();
             //$this->local_sidebar();
             /*echo '</div></div>';
             		echo'</div>';
             		echo'</div>';
             		echo'</div>';*/
         }
     }
 }
开发者ID:schiz,项目名称:scrollax,代码行数:68,代码来源:layout.php

示例14: miss_get_setting

        $more_clases .= 'span6';
        $spans_in_row = 2;
        break;
    case "blog_layout4":
        $excerpt_length = 80;
        $more_clases .= 'span4';
        $spans_in_row = 3;
        break;
    case "blog_layout5":
        $excerpt_length = 145;
        $more_clases .= 'span3';
        $spans_in_row = 4;
        break;
}
$animation = miss_get_setting('blog_layout_animation') ? '  im-animate-element ' . miss_get_setting('blog_layout_animation') : '';
$setings = miss_get_setting('disable_meta_options') ? miss_get_setting('disable_meta_options') : array();
$without_date = in_array('date_meta', $setings) ? ' without_date' : '';
$more_clases .= $without_date;
$filter_args = array('width' => 200, 'height' => 228, 'img_class' => '', 'link_class' => 'sc_image_load', 'preload' => true, 'disable' => '', 'column' => $column, 'type' => $posttype, 'shortcode' => true, 'echo' => false, 'wraptitle' => false);
?>
<!-- Blog Section - Start -->
<section class="news-section">
<div class="container">
  <div class="row">
    <!-- Section Header - Start -->
    <header class="section-header span12">
      <h1 class="header">
        <span><?php 
post_type_archive_title('', true);
?>
</span>
开发者ID:schiz,项目名称:scrollax,代码行数:31,代码来源:loop-news.php

示例15: im_woocommerce

 /**
  *
  */
 public static function im_woocommerce($atts, $content = null, $code = null)
 {
     $classes = array(__('Grid', MISS_ADMIN_TEXTDOMAIN) => 'grid', __('Comments Slider', MISS_ADMIN_TEXTDOMAIN) => 'comslider', __('List', MISS_ADMIN_TEXTDOMAIN) => 'list', __('more-links', MISS_ADMIN_TEXTDOMAIN) => 'more-links', __('Portfolio small', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-small', __('Portfolio fullwidth', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-fullwidth');
     $entries = get_categories('orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $categories[$entry->name] = $entry->term_id;
     }
     $entries = get_terms('portfolio_category', 'orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $portfolio_categories[$entry->name] = $entry->slug;
     }
     if ($atts == 'generator') {
         return array('name' => __('WooCommerce Layout', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_woocommerce', 'icon' => 'im-icon-grid-5', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Caption <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Here you can add section title (leave blank to hide).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'caption', 'type' => 'textfield', 'value' => ''), array('heading' => __('Number of Columns', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Set number of columns in a row.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'column', 'min' => 1, 'max' => 4, 'step' => 1, 'unit' => __('columns', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range', 'value' => 3), array('heading' => __('Number of Posts', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select the number of posts you wish to have displayed on each page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'showposts', 'min' => 1, 'value' => 5, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Offset Posts <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('This will skip a number of posts at the beginning.<br /><br />Useful if you are using multiple blog shortcodes on the same page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'offset', 'min' => 0, 'value' => 0, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array("type" => "dropdown", "heading" => __("Viewport Animation", MISS_ADMIN_TEXTDOMAIN), "param_name" => "animation", "value" => miss_js_composer_css_animation(), "description" => __("Viewport animation will be triggered when this element is being viewed when you scroll page down. you only need to choose the animation style from this option. please note that this only works in moderns. We have disabled this feature in touch devices to increase browsing speed.", MISS_ADMIN_TEXTDOMAIN))));
     }
     global $post, $wp_rewrite, $wp_query, $irish_framework_params, $woocommerce;
     $defaults = array('caption' => '', 'tagline' => '', 'posttype' => 'post', 'class' => 'grid', 'column' => '', 'showposts' => '', 'offset' => '', 'disable' => '', 'category_in' => '', 'portfolio_terms' => '', 'animation' => '');
     extract(shortcode_atts($defaults, $atts));
     $out = '';
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $class = array_search($class, $classes) != false ? $class : 'grid';
     $query_args = array('post_type' => 'product', 'showposts' => $showposts, 'offset' => $offset, 'nopaging' => 0, 'ignore_sticky_posts' => 1);
     if (is_front_page()) {
         $_layout = miss_get_setting('homepage_layout') ? miss_get_setting('homepage_layout') : 'full_width';
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } elseif ($wp_query->get_queried_object()) {
         $post_obj = $wp_query->get_queried_object();
         $_layout = get_post_meta($post_obj->ID, '_layout', true);
         $template = get_post_meta($post_obj->ID, '_wp_page_template', true);
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } else {
         $_layout = 'full_width';
         $images = 'images';
     }
     $sc_post_query = new WP_Query();
     $sc_post_query->query($query_args);
     if ($sc_post_query->have_posts()) {
         $img_sizes = $irish_framework_params->layout[$images];
         $width = '';
         $height = '';
         if ($class == 'list') {
             $column_class = 'span12 content-item';
             $excerpt_lenth = 180;
             $width = $img_sizes['small_post_list'][0];
             $height = $img_sizes['small_post_list'][1];
         } else {
             $column = $column > 0 || $column < 4 ? $column : 4;
             switch ($column) {
                 case 1:
                     $column_class = 'content-item span12';
                     $excerpt_lenth = 400;
                     $width = $img_sizes['blog_layout1'][0];
                     $height = $img_sizes['blog_layout1'][1];
                     break;
                 case 2:
                     $column_class = 'content-item span6';
                     $excerpt_lenth = 150;
                     $width = $img_sizes['blog_layout3'][0];
                     $height = $img_sizes['blog_layout3'][1];
                     break;
                 case 3:
                     $column_class = 'content-item span4';
                     $excerpt_lenth = 138;
                     $width = $img_sizes['blog_layout4'][0];
                     $height = $img_sizes['blog_layout4'][1];
                     break;
                 case 4:
                     $column_class = 'content-item span3';
                     $excerpt_lenth = 115;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
                 default:
                     $column_class = 'content-item span3';
                     $excerpt_lenth = 115;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
             }
         }
         $img_class = 'image';
         $filter_args = array('width' => 220, 'height' => 220, 'img_class' => $img_class, 'link_class' => 'sc_image_load', 'preload' => true, 'disable' => $disable, 'column' => $column, 'type' => 'product', 'shortcode' => true, 'echo' => false, 'wraptitle' => false);
         $spans_in_row = $column;
         $span_walk = 0;
         $row_walk = 1;
         /**
          * ¬озвращение контента в зависимости от класса
          * 
          * */
         if (is_user_logged_in()) {
             $linkprofile = '<a class="nav-item text small-text" href=' . get_permalink(get_option('woocommerce_myaccount_page_id')) . ' title="My Account">My Account</a>';
         } else {
             $linkprofile = '<a class="nav-item text small-text" href="' . get_permalink(get_option('woocommerce_myaccount_page_id')) . '" title="My Account">My Account</a>';
         }
         if (sizeof($woocommerce->cart->cart_contents) > 0) {
             $linkcheck = '<a href="' . $woocommerce->cart->get_checkout_url() . '" class="nav-item text small-text">Checkout</a>';
//.........这里部分代码省略.........
开发者ID:schiz,项目名称:scrollax,代码行数:101,代码来源:im_woocommerce.php


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