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


PHP mom_option函数代码示例

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


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


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