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

PHP mom_option函数代码示例

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

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



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

示例1: gd_mn_replace_breadcrums

/**
 * Multi News replace breadcrumb.
 *
 * @since 1.0.0
 * @package GeoDirectory
 */
function gd_mn_replace_breadcrums()
{
    if (mom_option('breadcrumb') != 0) {
        ?>
        <?php 
        if (mom_option('cats_bread')) {
            $cclass = '';
            if (mom_option('cat_slider') == false) {
                $cclass = 'post-crumbs ';
            }
            ?>
            <div class="<?php 
            echo $cclass;
            ?>
entry-crumbs" xmlns:v="http://rdf.data-vocabulary.org/#">

                <?php 
            mom_breadcrumb();
            ?>


            </div>
        <?php 
        }
        ?>
    <?php 
    }
}
开发者ID:jefferose,项目名称:geodirectory,代码行数:34,代码来源:Multi_News.php


示例2: mom_pagination

function mom_pagination($pages = '', $range = 4)
{
    global $wp_query;
    if (get_query_var('paged')) {
        $paged = get_query_var('paged');
    } elseif (get_query_var('page')) {
        $paged = get_query_var('page');
    } else {
        $paged = 1;
    }
    if (mom_option('pagi_type') == false) {
        $showitems = $range * 2 + 1;
        if (empty($paged)) {
            $paged = 1;
        }
        if ($pages == '') {
            global $wp_query;
            $pages = $wp_query->max_num_pages;
            if (!$pages) {
                $pages = 1;
            }
        }
        if (1 != $pages) {
            echo "<div class='pagination'>";
            if ($paged > 2 && $paged > $range + 1 && $showitems < $pages) {
                echo "<a href='" . get_pagenum_link(1) . "'>&laquo;</a>";
            }
            if ($paged > 1 && $showitems < $pages) {
                echo "<a href='" . get_pagenum_link($paged - 1) . "'>&lsaquo;</a>";
            }
            for ($i = 1; $i <= $pages; $i++) {
                if (1 != $pages && (!($i >= $paged + $range + 1 || $i <= $paged - $range - 1) || $pages <= $showitems)) {
                    echo $paged == $i ? "<span class='current'>" . $i . "</span>" : "<a href='" . get_pagenum_link($i) . "' class='inactive' >" . $i . "</a>";
                }
            }
            if ($paged < $pages && $showitems < $pages) {
                echo "<a href='" . get_pagenum_link($paged + 1) . "'>&rsaquo;</a>";
            }
            if ($paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages) {
                echo "<a href='" . get_pagenum_link($pages) . "'>&raquo;</a>";
            }
            echo "</div>\n";
        }
    } else {
        $big = 999999999;
        // need an unlikely integer
        echo "<div class='pagination'>";
        echo paginate_links(array('base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), 'format' => '?paged=%#%', 'current' => max(1, $paged), 'total' => $wp_query->max_num_pages));
        echo "</div>\n";
    }
}
开发者ID:justinwool,项目名称:vortago,代码行数:51,代码来源:pagination.php


示例3: mom_search_in_wp_ticker

function mom_search_in_wp_ticker($items, $args)
{
    if ($args->theme_location == 'breaking') {
        ob_start();
        ?>
  <li class="top-search breaking-search menu-item-iconsOnly"><a href="#"><i class="icon_only fa-icon-search"></i></a>
<div class="search-dropdown">
  <form class="mom-search-form" method="get" action="<?php 
        echo home_url();
        ?>
/">
      <input type="text" id="tb-search" class="sf" name="s" placeholder="<?php 
        _e('Enter keywords and press enter', 'framework');
        ?>
" required="" autocomplete="off">
    <?php 
        if (mom_option('ajax_search_disable')) {
            ?>
<span class="sf-loading"><img src="<?php 
            echo MOM_IMG;
            ?>
/ajax-search-nav.png" alt="search" width="16" height="16"></span><?php 
        }
        ?>
    <?php 
        if (defined('ICL_LANGUAGE_CODE')) {
            ?>
<input type="hidden" name="lang" value="<?php 
            echo ICL_LANGUAGE_CODE;
            ?>
"/><?php 
        }
        ?>
  </form>
  <?php 
        if (mom_option('ajax_search_disable')) {
            ?>
  <div class="ajax-search-results"></div>
  <?php 
        }
        ?>
</div>
</li>

<?php 
        $output = ob_get_contents();
        ob_end_clean();
        $items .= $output;
    }
    return $items;
}
开发者ID:justinwool,项目名称:vortago,代码行数:51,代码来源:functions.php


示例4: mom_layout_sidebar

function mom_layout_sidebar($atts, $content = null)
{
    extract(shortcode_atts(array('sidebar' => ''), $atts));
    $swstyle = mom_option('swstyle');
    if ($swstyle == 'style2') {
        $swclass = ' sws2';
    } else {
        $swclass = '';
    }
    $output = '</div><aside class="sidebar' . $swclass . '" itemtype="http://schema.org/WPSideBar" itemscope="itemscope" role="complementary">';
    ob_start();
    if (!function_exists('dynamic_sidebar') || !dynamic_sidebar($sidebar)) {
    }
    $output .= ob_get_contents();
    ob_end_clean();
    $output .= "</aside>";
    return $output;
}
开发者ID:justinwool,项目名称:vortago,代码行数:18,代码来源:layouts.php


示例5: mom_youtube_duration

function mom_youtube_duration($id)
{
    delete_option('mom_yotube3_video_duration_' . $id);
    $key = mom_option('youtube_api_key');
    if ($key != '') {
        $duration = get_transient('mom_yotube3_video_duration_' . $id);
        $duration = 0;
        $data = wp_remote_get('https://www.googleapis.com/youtube/v3/videos?id=' . $id . '&part=contentDetails&key=' . $key);
        if (!is_wp_error($data)) {
            $json = json_decode($data['body'], true);
            $duration = isset($json['items'][0]['contentDetails']['duration']) ? $json['items'][0]['contentDetails']['duration'] : '';
            $duration = mom_youtube_covtime($duration);
            set_transient('mom_yotube3_video_duration_' . $id, $duration, 60 * 60 * 24);
            return $duration;
        } else {
            return 'error';
        }
    } else {
        return false;
    }
}
开发者ID:justinwool,项目名称:vortago,代码行数:21,代码来源:media.php


示例6: do_shortcode

    ?>
                                					        <?php 
    if (mom_option('post_bottom_ad') != '' && $disable_ads == 0) {
        echo do_shortcode('[ad id="' . mom_option('post_bottom_ad') . '"]');
        echo do_shortcode('[gap height="20"]');
    }
    ?>

                            </div>

                    <?php 
    if ($layout != 'fullwidth') {
        ?>
                        </div><!--Main Content-->
                    	<?php 
        $swstyle = mom_option('swstyle');
        if ($swstyle == 'style2') {
            $swclass = ' sws2';
        } else {
            $swclass = '';
        }
        if ($site_width != 'wide' || strpos($layout, 'both') !== false) {
            if ($cat_ssidebar != '') {
                ?>
	                    <aside class="secondary-sidebar<?php 
                echo $swclass;
                ?>
" role="complementary" itemscope="itemscope" itemtype="http://schema.org/WPSideBar"><!--secondary sidebar-->
	                    	<?php 
                dynamic_sidebar($cat_ssidebar);
                ?>
开发者ID:justinwool,项目名称:vortago,代码行数:31,代码来源:single-program.php


示例7: elseif

                } elseif (is_account_page()) {
                    $woo_page_id = get_option('woocommerce_myaccount_page_id');
                } else {
                    $woo_page_id = get_option('woocommerce_shop_page_id');
                }
                if (mom_option('woo_lsidebar') != '') {
                    $archivesidebar = mom_option('woo_lsidebar');
                } else {
                    $archivesidebar = get_post_meta($woo_page_id, 'mom_left_sidebar', TRUE);
                }
            }
            if (function_exists('is_bbpress') && is_bbpress()) {
                $archivesidebar = mom_option('bbpress_left_sidebar');
            }
            if (function_exists('is_buddypress') && is_buddypress()) {
                $archivesidebar = mom_option('buddypress_left_sidebar');
            }
            if (!empty($archivesidebar)) {
                dynamic_sidebar($archivesidebar);
            } else {
                dynamic_sidebar('Secondary sidebar');
            }
        } else {
            dynamic_sidebar('Secondary sidebar');
        }
        ?>
</aside><!--secondary sidebar-->
<?php 
    }
}
// if hide in the mobiles
开发者ID:justinwool,项目名称:vortago,代码行数:31,代码来源:sidebar-left.php


示例8: get_header

Template Name: People List
*/
get_header();
global $post;
$pagebreadcrumb = get_post_meta($post->ID, 'mom_hide_breadcrumb', true);
$icon = get_post_meta($post->ID, 'mom_page_icon', true);
$layout = get_post_meta(get_the_ID(), 'mom_page_layout', true);
$PS = get_post_meta(get_the_ID(), 'mom_page_share', true);
$PC = get_post_meta(get_the_ID(), 'mom_page_comments', true);
?>


<div class="main-container"><!--container-->                  
     
    <?php 
if (mom_option('breadcrumb') != 0) {
    ?>
    <?php 
    if ($pagebreadcrumb != true) {
        ?>
    
    <div class="post-crumbs archive-page entry-crumbs" xmlns:v="http://rdf.data-vocabulary.org/#">
                    	<?php 
        if ($icon != '') {
            if (0 === strpos($icon, 'http')) {
                echo '<div class="crumb-icon"><i class="img_icon" style="background-image: url(' . $icon . ')"></i></div>';
            } else {
                echo '<div class="crumb-icon"><i class="' . $icon . '"></i></div>';
            }
        } else {
            ?>
开发者ID:justinwool,项目名称:vortago,代码行数:31,代码来源:people-temp.php


示例9: mom_option

<?php

global $personPosts;
$dateformat = mom_option('date_format');
?>

<?php 
?>

        <ul class="mom-related-posts clearfix">
                <?php 
if (1 == 1) {
    //				$query = new WP_Query( array( 'post_type' => 'appearance', 'post__in' => array( 4,6,7,8,9,10 ) ) );
    $query = new WP_Query(array('post_type' => 'appearance', 'post__in' => $personPosts));
    update_post_thumbnail_cache($query);
    if ($query->have_posts()) {
        while ($query->have_posts()) {
            $query->the_post();
            ?>
                <li itemscope="" itemtype="http://schema.org/Article">
                		<?php 
            if (mom_post_image() != false) {
                ?>
                        <figure class="post-thumbnail"><a href="<?php 
                the_permalink();
                ?>
">
                        <?php 
                mom_post_image_full('related-thumb');
                ?>
                        </a></figure>
开发者ID:justinwool,项目名称:vortago,代码行数:31,代码来源:page_jw.php


示例10: mom_google_fonts

function mom_google_fonts()
{
    $cutomfont = mom_option('font-name');
    $safe_fonts = array('' => 'Default', 'arial' => 'Arial', 'georgia' => 'Georgia', 'arial' => 'Arial', 'verdana' => 'Verdana, Geneva', 'trebuchet' => 'Trebuchet', 'times' => 'Times New Roman', 'tahoma' => 'Tahoma, Geneva', 'palatino' => 'Palatino', 'helvetica' => 'Helvetica', 'Archivo Narrow' => 'Archivo Narrow', $cutomfont => $cutomfont);
    return $safe_fonts;
}
开发者ID:justinwool,项目名称:vortago,代码行数:6,代码来源:main.php


示例11: get_post_meta

						'<span class="enotype-icon-uniE6D8"></span>'
					],
		});
	        });
			</script>
			
		</div>
		
<?php 
} else {
    $mom_post_layout = get_post_meta($post->ID, 'mom_post_layout', true);
    if ($mom_post_layout == '') {
        $mom_post_layout = mom_option('post_layout');
    }
    if ($mom_post_layout == 'layout5') {
        if (mom_option('post_feaimage') == 1) {
            if (mom_post_image() != false) {
                ?>
								<figure class="post-thumbnail" itemprop="associatedMedia" itemscope="" itemtype="http://schema.org/ImageObject">
								<?php 
                echo '<img class="post_layout_5_img" src="' . mom_post_image('full') . '" alt="' . get_the_title() . '">';
                ?>
</figure><?php 
                if ($PCT != '') {
                    ?>
<div class="photo-credit img-pct"><i class="momizat-icon-camera"></i><?php 
                    _e('Photo Credit To ', 'framework');
                    echo $PCT;
                    ?>
</div><?php 
                }
开发者ID:justinwool,项目名称:vortago,代码行数:31,代码来源:post-formats.php


示例12: bloginfo

        <meta itemprop="name" content="<?php 
    bloginfo('name');
    ?>
">
    </div>
<?php 
}
?>
           <?php 
if ($logo_left_banner) {
    echo '<div class="logo_left_banner">' . do_shortcode('[ad id="' . $logo_left_banner . '"]') . '</div>';
}
if ($logo_right_banner) {
    echo '<div class="logo_right_banner">' . do_shortcode('[ad id="' . $logo_right_banner . '"]') . '</div>';
}
?>
     
<?php 
if (mom_option('h_banner_type') == 'ads') {
    ?>
    <div class="header-banner">
		<?php 
    echo do_shortcode('[ad id="' . $header_banner . '"]');
    ?>
    </div>
<?php 
} else {
    if (mom_option('header_custom_content') != '' && mom_option('h_banner_type') == 'custom') {
        echo '<div class="header-right header-right_custom-content">' . do_shortcode(mom_option('header_custom_content')) . '</div>';
    }
}
开发者ID:justinwool,项目名称:vortago,代码行数:31,代码来源:header-content.php


示例13: mom_posts_share

function mom_posts_share($id, $url, $style = null)
{
    $url = esc_url($url);
    $desc = esc_attr(wp_html_excerpt(strip_shortcodes(get_the_content()), 160));
    $img = esc_url(mom_post_image('large'));
    $title = esc_attr(get_the_title());
    $window_title = __('Share This', 'framework');
    $window_width = 600;
    $window_height = 455;
    ?>
<script>
    jQuery(document).ready(function($) {
        var url = '<?php 
    echo $url;
    ?>
'; 
        <?php 
    if (mom_option('sharee_tw') != 0) {
        // twitter
        /* jQuery.getJSON(
                 'ht'+'tp://urls.api.twitter.com/1/urls/count.json?url='+url+'&callback=?',
                 function (data) {
           //console.log(data.count);
           $('.share-twitter .count').text(data.count);
                     }
             ); */
        //delete_transient('mom_share_twitter_'.$id);
        $twitter = get_transient('mom_share_twitter_' . $id);
        if ($twitter == null) {
            $twitter_url = wp_remote_get('http://urls.api.twitter.com/1/urls/count.json?url=' . $url);
            if (!is_wp_error($twitter_url)) {
                $twitter = json_decode($twitter_url['body'], true);
                $twitter = $twitter['count'];
                set_transient('mom_share_twitter_' . $id, $twitter, 1800);
            } else {
                $twitter = 0;
            }
        }
    }
    ?>
		<?php 
    if (mom_option('sharee_fb') != 0) {
        //facebook
        delete_transient('mom_share_facebook_' . $id);
        $facebook = get_transient('mom_share_facebook_' . $id);
        if ($facebook == null) {
            $facebook_url = wp_remote_get('http://api.facebook.com/method/links.getStats?urls=' . $url . '&format=json');
            if (!is_wp_error($facebook_url)) {
                $facebook = json_decode($facebook_url['body'], true);
                $share_count = isset($facebook[0]['total_count']) ? $facebook[0]['total_count'] : 0;
                //$like_count = isset($facebook[0]['like_count']) ? $facebook[0]['like_count'] : 0;
                $facebook = $share_count;
                set_transient('mom_share_facebook_' . $id, $facebook, 2000);
            } else {
                $facebook = 0;
            }
        }
        // facebook
        /* jQuery.getJSON(
                   'ht'+'tp://api.facebook.com/method/links.getStats?urls='+url+'&format=json',
                   function (data) {
                       //console.log(data[0].like_count);
        			if( data[0] !== undefined ){
                        $('.share-facebook .count').text(data[0].like_count);
                       // console.log(data);
                       }
                   }
               ); */
    }
    ?>
		<?php 
    if (mom_option('sharee_lin') != 0) {
        ?>
        // linkedin
        jQuery.getJSON(
	    'http://www.linkedin.com/countserv/count/share?format=jsonp&url='+url+'&callback=?',
            function (data) {

                //console.log(data.count);
                $('.share-linkedin .count').text(data.count);
            }
        );
        <?php 
    }
    ?>
		<?php 
    if (mom_option('sharee_pin') != 0) {
        ?>
        // Pintrest
        jQuery.getJSON(
	    'http://api.pinterest.com/v1/urls/count.json?url='+url+'&callback=?',
            function (data) {
                //console.log(data.count);
                $('.share-pin .count').text(data.count);
            }
        );
        <?php 
    }
    ?>
	
//.........这里部分代码省略.........
开发者ID:justinwool,项目名称:vortago,代码行数:101,代码来源:posts_share.php


示例14: comments_number

    comments_number(__('Leave a comment', 'framework'), __('(1) Comment', 'framework'), __('(%) Comments', 'framework'));
    ?>
</a></div>
    <?php 
}
?>
    <?php 
if (mom_option('post_head_views') != 0) {
    ?>
    <div class="post-views"><?php 
    echo getPostViews(get_the_ID());
    ?>
</div>
    <?php 
}
?>
    <?php 
//edit_post_link( __( 'Edit', 'framework' ), '<div class="edit-link">', '</div>' );
?>
</div>
<div class="top-share-icons">
<?php 
if (mom_option('share_position') == 'top' || mom_option('share_position') == 'both') {
    if (mom_option('post_sharee')) {
        if ($DPS != 1) {
            mom_posts_share(get_the_ID(), get_permalink());
        }
    }
}
?>
</div>
开发者ID:justinwool,项目名称:vortago,代码行数:31,代码来源:post-head.php


示例15: mom_option

<?php

if (mom_option('top_banner') == 1) {
    if (mom_display_logic('top_banner_display_logic') == true) {
        $auto_close = mom_option('top_banner_close_timeout');
        ?>
<div class="top_banner" data-timeout="<?php 
        echo $auto_close;
        ?>
">
 <div class="inner">
   <?php 
        if (mom_option('top_banner_close') == 1) {
            $save_state = 'tb_save_close';
            if (mom_option('top_banner_close_save') == 1) {
                $save_state = 'tb_save_close';
            }
            echo '<a class="tob_banner_close ' . $save_state . '" href="#" data-exp="7"><i class="fa-icon-remove"></i></a>';
        }
        if (mom_option('top_banner_content') == 1) {
            echo do_shortcode('[ad id="' . mom_option('top_banner_ad') . '"]');
        } else {
            echo do_shortcode(mom_option('top_banner_custom'));
        }
        ?>
 </div>
</div>
 <?php 
    }
}
开发者ID:justinwool,项目名称:vortago,代码行数:30,代码来源:topbanner.php


示例16: esc_url

if ($sticky_logo) {
    ?>
	<a href="<?php 
    echo esc_url(home_url());
    ?>
" class="sticky_logo"><img src="<?php 
    echo $sticky_logo;
    ?>
" alt="<?php 
    bloginfo('name');
    ?>
" width="<?php 
    echo mom_option('sticky_navigation_logo', 'width');
    ?>
" height="<?php 
    echo mom_option('sticky_navigation_logo', 'height');
    ?>
"></a>
    <?php 
}
?>
		<?php 
if (has_nav_menu('main')) {
    if ($menu != '') {
        wp_nav_menu(array('menu_class' => 'main-menu main-default-menu', 'container' => 'ul', 'menu' => $menu, 'walker' => new mom_custom_Walker()));
    } else {
        $main_menu_query = get_transient('main_menu_query' . get_queried_object_id() . $lang . $user);
        if (function_exists('is_buddypress')) {
            $main_menu_query = false;
        }
        if ($main_menu_query === false) {
开发者ID:justinwool,项目名称:vortago,代码行数:31,代码来源:navigation.php


示例17: mom_feature_slider

function mom_feature_slider($atts, $content = null)
{
    global $unique_posts;
    global $do_unique_posts;
    extract(shortcode_atts(array('id' => '', 'type' => 'def', 'display' => 'latest', 'cats' => '', 'tag' => '', 'specific' => '', 'orderby' => '', 'number_of_posts' => '', 'animation' => '', 'animationin' => '', 'animationout' => '', 'autoplay' => '', 'timeout' => '4000', 'cap' => 'yes', 'exc' => '', 'class' => '', 'num_bullets' => '', 'bullets_event' => ''), $atts));
    if ($id == '') {
        static $id = 75;
        $id++;
    }
    $specific = explode(',', $specific);
    if ($type == 'cat') {
        wp_enqueue_script('cycle');
        wp_enqueue_script('nicescroll');
    }
    if ($cats == 'Select a Category') {
        $cats = '';
    }
    if ($tag == 'Select a Tag') {
        $tag = '';
    }
    $output = get_transient('mom_feature_sliders' . $id . $type . $display . $cats . $tag . $class . $orderby);
    if ($orderby == 'rand') {
        $output = false;
    }
    if ($output == false) {
        ob_start();
        if ($num_bullets == 'yes') {
            $class .= ' numbers_bullets';
        }
        if (is_rtl()) {
            $rtl = 'true';
        } else {
            $rtl = 'false';
        }
        if ($animation == 'fade') {
            $animationout = 'fadeOut';
            $animationin = '';
        } elseif ($animation == 'slide') {
            $animationout = '';
            $animationin = '';
        } elseif ($animation == 'flip') {
            $animationout = 'slideOutDown';
            $animationin = 'flipInX';
        }
        if ($autoplay == 'no') {
            $autoplay = 'false';
        } else {
            $autoplay = 'true';
        }
        $post_meta_hp = mom_option('post_meta_hp');
        if ($post_meta_hp == 1) {
            $post_head = mom_option('post_head');
            $post_head_date = mom_option('post_head_date');
        } else {
            $post_head = 1;
            $post_head_date = 1;
        }
        ?>
							<?php 
        if ($type == 'slider2') {
            ?>
 <!-- Full width Slider 2 -->
									
							<section class="section <?php 
            echo $class;
            ?>
 feature_slider_<?php 
            echo $id;
            ?>
"><!--def slider-->
				                    	<div class="slider2 clearfix"> <!-- slider2 wrap -->
					                    	<?php 
            if ($display == 'cat') {
                $query = new WP_Query(array('post_type' => 'post', 'post_status' => 'publish', 'cat' => $cats, 'posts_per_page' => 2, 'orderby' => $orderby, 'no_found_rows' => true, 'cache_results' => false, 'post__not_in' => $do_unique_posts));
            } elseif ($display == 'tag') {
                $query = new WP_Query(array('post_type' => 'post', 'post_status' => 'publish', 'tag' => $tag, 'posts_per_page' => 2, 'orderby' => $orderby, 'no_found_rows' => true, 'cache_results' => false, 'post__not_in' => $do_unique_posts));
            } elseif ($display == 'specific') {
                $query = new WP_Query(array('post_type' => 'post', 'post_status' => 'publish', 'post__in' => $specific, 'posts_per_page' => 2, 'orderby' => $orderby, 'no_found_rows' => true, 'cache_results' => false, 'post__not_in' => $do_unique_posts));
            } else {
                $query = new WP_Query(array('post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 2, 'orderby' => $orderby, 'no_found_rows' => true, 'cache_results' => false, 'post__not_in' => $do_unique_posts));
            }
            if ($query->have_posts()) {
                while ($query->have_posts()) {
                    $query->the_post();
                    if ($unique_posts) {
                        $do_unique_posts[] = get_the_ID();
                    }
                    ?>
				                            <?php 
                    if (mom_post_image() != false) {
                        ?>
					                    	<div class="def-slider-item big-slider2" itemscope="" itemtype="http://schema.org/Article">
					                            <a itemprop="url" href="<?php 
                        the_permalink();
                        ?>
">
					                            	<?php 
                        mom_post_image_full('catslider-thumb');
                        ?>
					                            </a>
//.........这里部分代码省略.........
开发者ID:justinwool,项目名称:vortago,代码行数:101,代码来源:feature-slider.php


示例18: mom_get_pageLayout

function mom_get_pageLayout()
{
    if (is_singular()) {
        $layout = get_post_meta(get_queried_object_id(), 'mom_page_layout', TRUE);
        if (is_single()) {
            if ($layout == '') {
                $layout = mom_option('post_page_layout');
            }
        }
        if ($layout == '') {
            $layout = mom_option('main_layout');
        }
        if (is_page()) {
            if ($layout == '') {
                $layout = mom_option('page_layout');
            }
        }
        if (function_exists('is_bbpress') && is_bbpress()) {
            if ($layout == '') {
                $layout = mom_option('bbpress_layout');
            }
            if (function_exists('is_buddypress') && is_buddypress()) {
                if (get_post_meta(get_queried_object_id(), 'mom_page_layout', true) == '') {
                    $layout = mom_option('buddypress_layout');
                }
            }
        } elseif (function_exists('is_buddypress') && is_buddypress()) {
            if ($layout == '') {
                $layout = mom_option('buddypress_layout');
            }
        } else {
            if ($layout == '') {
                $layout = mom_option('main_layout');
            }
        }
    } elseif (function_exists('is_bbpress') && is_bbpress()) {
        $layout = mom_option('bbpress_layout');
        if ($layout == '') {
            $layout = mom_option('main_layout');
        }
    } elseif (function_exists('is_buddypress') && is_buddypress()) {
        $layout = mom_option('buddypress_layout');
        if ($layout == '') {
            $layout = mom_option('main_layout');
        }
    } elseif (is_archive()) {
        $layout = mom_option('category_layout');
        if ($layout == '') {
            $layout = mom_option('main_layout');
        }
    } else {
        $layout = mom_option('main_layout');
    }
    $site_width = mom_option('site_width');
    if (function_exists('is_woocommerce') && is_woocommerce()) {
        $woo_page_id = '';
        if (is_shop()) {
            $woo_page_id = get_option('woocommerce_shop_page_id');
        } elseif (is_cart()) {
            $woo_page_id = get_option('woocommerce_cart_page_id');
        } elseif (is_checkout()) {
            $woo_page_id = get_option('woocommerce_checkout_page_id');
        } elseif (is_account_page()) {
            $woo_page_id = get_option('woocommerce_myaccount_page_id');
        } else {
            $woo_page_id = get_option('woocommerce_shop_page_id');
        }
        $layout = get_post_meta($woo_page_id, 'mom_page_layout', true);
        if ($layout == '') {
            $layout = mom_option('main_layout');
        }
        return $layout;
    }
}
开发者ID:justinwool,项目名称:vortago,代码行数:74,代码来源:multinews.php


示例19: _e

                <h2><?php 
_e('Related posts', 'framework');
?>
</h2>
        </header>

        <ul class="mom-related-posts clearfix">
                <?php 
global $post;
$cats = get_the_category($post->ID);
if ($cats) {
    $cat_ids = array();
    foreach ($cats as $individual_cat) {
        $cat_ids[] = $individual_cat->cat_ID;
    }
    $args = array('category__in' => $cat_ids, 'post__not_in' => array($post->ID), 'showposts' => mom_option('related_count'), 'ignore_sticky_posts' => 1, 'no_found_rows' => true, 'cache_results' => false);
    $query = new WP_Query($args);
    update_post_thumbnail_cache($query);
    if ($query->have_posts()) {
        while ($query->have_posts()) {
            $query->the_post();
            ?>
                <li itemscope="" itemtype="http://schema.org/Article">
                		<?php 
            if (mom_post_image() != false) {
                ?>
                        <figure class="post-thumbnail"><a href="<?php 
                the_permalink();
                ?>
">
                        <?php 
开发者ID:justinwool,项目名称:vortago,代码行数:31,代码来源:page_jw.php


示例20: mom_scrollers

function mom_scrollers($atts, $content = null)
{
    global $unique_posts;
    global $do_unique_posts;
    extract(shortcode_atts(array('style' => 'sc1', 'title' => '', 'title_size' => '17', 'sub_title' => '', 'display' => 'latest', 'cats' => '', 'tags' => '', 'orderby' => '', 'number_of_posts' => '5', 'auto_play' => '3000', 'speed' => '300', 'items' => '4'), $atts));
    static $id = 75;
    $id++;
    if ($cats == 'Select a Category') {
        $cats = '';
    }
    if ($tags == 'Select a Tag') {
        $tags = '';
    }
    $output = get_transient('mom_scroller_' . $id . $style . $display . $cats . $tags . $items . $orderby);
    if ($orderby == 'rand') {
        $output = false;
    }
    if ($output == false) {
        ob_start();
        //wp_enqueue_script('owl');
        $dateformat = mom_option('date_format');
        $post_meta_hp = mom_option('post_meta_hp');
        if ($post_meta_hp == 1) {
            $post_head = mom_option('post_head');
            $post_head_author = mom_option('post_head_author');
            $post_head_date = mom_option('post_head_date');
            $post_head_cat = mom_option('post_head_cat');
            $post_head_commetns = mom_option('post_head_commetns');
            $post_head_views = mom_option('post_head_views');
        } else {
            $post_head = 1;
            $post_head_author = 1;
            $post_head_date = 1;
            $post_head_cat = 1;
            $post_head_commetns = 1;
            $post_head_views = 1;
        }
        $authormeta = mom_option('post_head_author');
        $rndn = rand(0, 100);
        global $wpdb;
        $tag_ID = $wpdb->get_var("SELECT * FROM " . $wpdb->terms . " WHERE 'name' = '" . $tags . "'");
        $nb_link = '';
        if ($display == 'cats') {
            if ($title == '') {
                $nb_title = get_cat_name($cats);
                $nb_link = get_category_link($cats);
            } else {
                $nb_title = $title;
            }
        } elseif ($display == 'tags') {
            if ($title == '') {
                $nb_title = $tags;
                $nb_link = get_tag_link($tag_ID);
            } else {
                $nb_title = $title;
            }
        } else {
            $nb_title = $title;
            $nb_link = '';
        }
        if ($auto_play != '') {
            $autoplay = 'true';
        } else {
            $autoplay = 'false';
        }
        if (is_rtl()) {
            $rtl = 'true';
        } else {
            $rtl = 'false';
        }
        $link_start = '';
        $link_end = '';
        if ($nb_link != '') {
            $link_start = '<a href="' . $nb_link . '">';
            $link_end = '</a>';
        }
        ?>
                
                <?php 
        if ($style == 'sc1') {
            ?>
                                
                    <section class="section scroller-section scroller-<?php 
            echo $id;
            ?>
">
                        
                        <header class="section-header">
                        	<?php 
            if ($title_size == '17') {
                ?>
                            <h2 class="section-title"><?php 
                echo $link_start . $nb_title . $link_end;
                ?>
</h2>
                            <?php 
            } else {
                ?>
                            <h1 class="section-title2"><?php 
                echo $link_start . $nb_title . $link_end;
//.........这里部分代码省略.........
开发者ID:justinwool,项目名称:vortago,代码行数:101,代码来源:scroller.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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