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


PHP foundation_get_settings函数代码示例

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


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

示例1: foundation_social_links

function foundation_social_links()
{
    $settings = foundation_get_settings();
    do_action('foundation_social_pre_output');
    if ($settings->social_twitter_url) {
        foundation_social_show_one_link($settings->social_twitter_url, 'twitter', 'Twitter');
    }
    if ($settings->social_facebook_url) {
        foundation_social_show_one_link($settings->social_facebook_url, 'facebook-sign', 'Facebook');
    }
    if ($settings->social_google_url) {
        foundation_social_show_one_link($settings->social_google_url, 'google-plus', 'Google+');
    }
    if ($settings->social_pinterest_url) {
        foundation_social_show_one_link($settings->social_pinterest_url, 'pinterest-sign', 'Pinterest');
    }
    if ($settings->social_vimeo_url) {
        foundation_social_show_one_link($settings->social_vimeo_url, 'ticket', 'Vimeo');
    }
    if ($settings->social_youtube_url) {
        foundation_social_show_one_link($settings->social_youtube_url, 'youtube', 'YouTube');
    }
    if ($settings->social_linkedin_url) {
        foundation_social_show_one_link($settings->social_linkedin_url, 'linkedin-sign', 'LinkedIn');
    }
    if ($settings->social_email_url) {
        foundation_social_show_one_link('mailto:' . $settings->social_email_url, 'envelope-alt', 'Mail');
    }
    if ($settings->social_rss_url) {
        foundation_social_show_one_link($settings->social_rss_url, 'rss-sign', 'RSS');
    }
    do_action('foundation_social_post_output');
}
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:33,代码来源:social-links.php

示例2: wptouch_geolocation_set_coords

function wptouch_geolocation_set_coords()
{
    $settings = foundation_get_settings();
    if (wptouch_has_geolocation() && $settings->geolocation_html) {
        echo '<input type="hidden" id="wptouch_geolocation_coords" value="' . $settings->geolocation_geocoded . '">';
        echo '<input type="hidden" id="wptouch_geolocation_radius" value="' . $settings->geolocation_radius . '">';
        echo '<div id="wptouch_geolocation_text" style="background: rgba( 0, 0, 0, 0.5 ); display: none; padding: 30px; text-align: center; font-size: 1.3em; line-height: 1.4; color: #fff"><i class="wptouch-icon-compass"></i> ' . $settings->geolocation_html . '</div>';
    }
}
开发者ID:jamesfacts,项目名称:gissler_wp_touch,代码行数:9,代码来源:geolocation.php

示例3: foundation_media_init

function foundation_media_init()
{
    $settings = foundation_get_settings();
    if ($settings->new_video_handling) {
        // Load FitVids
        wp_enqueue_script('foundation_media_fitvids', foundation_get_base_module_url() . '/media/fitvids.js', array('foundation_base'), md5(FOUNDATION_VERSION), true);
        wp_enqueue_script('foundation_media_handling', foundation_get_base_module_url() . '/media/media.js', false, md5(FOUNDATION_VERSION), true);
    }
}
开发者ID:sumwander,项目名称:unyil,代码行数:9,代码来源:media.php

示例4: wptouch_custom_posts_pre_get_posts

function wptouch_custom_posts_pre_get_posts($query)
{
    // Only modify the custom post type information when a mobile theme is showing
    $settings = foundation_get_settings();
    if (!$settings->enable_custom_post_types) {
        return $query;
    }
    if (is_attachment()) {
        return $query;
    }
    // Right now only support custom post types on the home page and single post pages
    if (is_single() && !is_page() || is_home()) {
        // Only employ this logic for when the mobile theme is showing
        if (wptouch_is_mobile_theme_showing()) {
            $settings = foundation_get_settings();
            $post_types = wptouch_custom_posts_get_list(true);
            if ($post_types && count($post_types)) {
                $post_type_array = array();
                foreach ($post_types as $post_type) {
                    $setting_name = wptouch_custom_posts_get_name_for_post_type($post_type);
                    if (isset($settings->{$setting_name}) && $settings->{$setting_name}) {
                        $post_type_array[] = $post_type;
                    }
                }
            }
            if (count($post_type_array)) {
                // Determine the original post type in the query
                $original_post_type = false;
                if (isset($query->queried_object)) {
                    $original_post_type = $query->queried_object->post_type;
                } else {
                    if (isset($query->query_vars['post_type'])) {
                        $original_post_type = $query->query_vars['post_type'];
                    }
                }
                if ($original_post_type) {
                    $page_for_posts = get_option('page_for_posts');
                    if (isset($query->queried_object_id) && $query->queried_object_id == $page_for_posts) {
                        // we're on the posts page
                        $custom_post_types = apply_filters('wptouch_custom_posts_pre_get', array_merge(array('post'), $post_type_array));
                    } else {
                        if (!is_array($original_post_type)) {
                            $original_post_type = array($original_post_type);
                        }
                        $custom_post_types = apply_filters('wptouch_custom_posts_pre_get', array_merge($original_post_type, $post_type_array));
                    }
                    $query->set('post_type', $custom_post_types);
                } else {
                    // We're on the home page or possibly another page for a normal site
                    $custom_post_types = apply_filters('wptouch_custom_posts_pre_get', array_merge(array('post'), $post_type_array));
                    $query->set('post_type', $custom_post_types);
                }
            }
        }
    }
    return $query;
}
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:57,代码来源:custom-posts.php

示例5: wptouch_fdn_show_login_links

function wptouch_fdn_show_login_links()
{
    $settings = foundation_get_settings();
    if ($settings->show_login_links) {
        return true;
    } else {
        return false;
    }
}
开发者ID:sb-xs,项目名称:que-pour-elle,代码行数:9,代码来源:login.php

示例6: wptouch_fdn_show_login_links

function wptouch_fdn_show_login_links()
{
    $settings = foundation_get_settings();
    if (apply_filters('wptouch_show_login_links', $settings->show_login_links)) {
        return true;
    } else {
        return false;
    }
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:9,代码来源:login.php

示例7: wptouch_fdn_is_custom_latest_posts_page

function wptouch_fdn_is_custom_latest_posts_page()
{
    global $post;
    $settings = foundation_get_settings();
    if ($settings->latest_posts_page == 'none') {
        return false;
    } else {
        rewind_posts();
        wptouch_the_post();
        rewind_posts();
        return apply_filters('foundation_is_custom_latest_posts_page', $settings->latest_posts_page == $post->ID);
    }
}
开发者ID:yarylo,项目名称:cerkva.pp.ua,代码行数:13,代码来源:custom-latest-posts.php

示例8: wptouch_fdn_custom_latest_posts_query

function wptouch_fdn_custom_latest_posts_query()
{
    if (get_query_var('paged')) {
        $paged = get_query_var('paged');
    } elseif (get_query_var('page')) {
        $paged = get_query_var('page');
    } else {
        $paged = 1;
    }
    $settings = foundation_get_settings();
    $args = array('paged' => $paged, 'posts_per_page' => $settings->posts_per_page);
    query_posts($args);
}
开发者ID:sb-xs,项目名称:que-pour-elle,代码行数:13,代码来源:custom-latest-posts.php

示例9: foundation_sharing_content

function foundation_sharing_content()
{
    $settings = foundation_get_settings();
    $content = '';
    if ($settings->share_on_pages == true) {
        $is_page = is_page();
    } else {
        $is_page = '';
    }
    if ($settings->show_share && (is_single() || $is_page)) {
        $content = wptouch_capture_include_file(dirname(__FILE__) . '/sharing-html.php');
    }
    return $content;
}
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:14,代码来源:sharing.php

示例10: foundation_media_init

function foundation_media_init()
{
    $settings = foundation_get_settings();
    if ($settings->video_handling_type == 'fitvids') {
        // Load FitVids
        wp_enqueue_script('foundation_media_fitvids', foundation_get_base_module_url() . '/media/fitvids.js', array('foundation_base'), FOUNDATION_VERSION, true);
    } elseif ($settings->video_handling_type == 'fluidvids') {
        // Load Fluid Width Videos
        wp_enqueue_script('foundation_media_fluidvids', foundation_get_base_module_url() . '/media/fluid-width-videos.js', array('foundation_base'), FOUNDATION_VERSION, true);
    }
    if ($settings->video_handling_type != 'none') {
        wp_enqueue_script('foundation_media_handling', foundation_get_base_module_url() . '/media/media.js', false, FOUNDATION_VERSION, true);
    }
}
开发者ID:liangwei1988,项目名称:wordpress,代码行数:14,代码来源:media.php

示例11: foundation_sharing_content

function foundation_sharing_content()
{
    $settings = foundation_get_settings();
    $content = '';
    if ($settings->share_on_pages == true) {
        $is_page = is_page();
    } else {
        $is_page = '';
    }
    if ($settings->show_share && (is_single() || $is_page)) {
        $content = wptouch_capture_template_part('sharing');
    }
    return $content;
}
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:14,代码来源:sharing.php

示例12: foundation_base_get_script_deps

function foundation_base_get_script_deps()
{
    $settings = foundation_get_settings();
    $script_deps = array('jquery');
    if (defined('WPTOUCH_MODULE_SPINJS_INSTALLED')) {
        $script_deps[] = 'foundation_spinjs_jquery';
    }
    if (defined('WPTOUCH_MODULE_FEATURED_INSTALLED') && $settings->featured_enabled) {
        $script_deps[] = 'foundation_featured';
    }
    if (defined('WPTOUCH_MODULE_MENU_INSTALLED')) {
        $script_deps[] = 'foundation_menu';
    }
    if (defined('WPTOUCH_MODULE_INFINITE_SCROLL_INSTALLED')) {
        $script_deps[] = 'foundation_infinite_scroll';
    }
    if (defined('WPTOUCH_MODULE_WEBAPP_INSTALLED') && $settings->webapp_mode_enabled) {
        $script_deps[] = 'foundation_webapp';
    }
    return $script_deps;
}
开发者ID:sb-xs,项目名称:que-pour-elle,代码行数:21,代码来源:base.php

示例13: foundation_featured_slider

function foundation_featured_slider($manual = false, $manual_html = false)
{
    $settings = foundation_get_settings();
    $args = foundation_featured_get_args();
    if ($manual == false && $settings->featured_enabled) {
        $slides = foundation_featured_get_slides();
        $slide_count = 0;
        if ($slides->post_count > 0) {
            echo $args['before'];
            echo "<div id='slider' class='" . implode(' ', foundation_featured_get_slider_classes()) . "'>\n";
            echo "<div class='swipe-wrap'>\n";
            while ($slides->have_posts() && $slide_count < $args['num']) {
                $slides->the_post();
                $image = foundation_featured_has_image();
                if ($image) {
                    $slide_count++;
                    get_template_part('featured-slider');
                }
            }
            echo "</div>\n";
            echo "</div>\n";
            echo $args['after'];
        }
    } else {
        // Private for now, we'll improve manual mode for customer use in 3.2
        echo $args['before'];
        echo "<div id='slider' class='" . implode(' ', foundation_featured_get_slider_classes()) . "'>\n";
        echo "<div class='swipe-wrap'>\n";
        echo $manual_html;
        echo "</div>\n";
        echo "</div>\n";
        echo $args['after'];
    }
}
开发者ID:shieldsdesignstudio,项目名称:forefield,代码行数:34,代码来源:featured.php

示例14: foundation_featured_slider

function foundation_featured_slider($manual = false, $manual_html = false)
{
    global $foundation_featured_data;
    $args = foundation_featured_get_args();
    $settings = foundation_get_settings();
    if ($manual == false && count($foundation_featured_data) >= FOUNDATION_FEATURED_MIN_NUM && $settings->featured_enabled) {
        echo $args['before'];
        echo "<div id='slider' class='" . implode(' ', foundation_featured_get_slider_classes()) . "'>\n";
        echo "<div class='swipe-wrap'>\n";
        foreach ($foundation_featured_data as $image_data) {
            echo "<div class='one-swipe-image' style='visibility: hidden;'>";
            echo "<a href='" . $image_data->link . "' class='needsclick'>";
            echo "<div class='comments-number'><span>" . $image_data->comments_number . "</span></div>";
            echo "<img src='" . $image_data->image . "' alt='" . $image_data->title . "' / >";
            if ($settings->featured_title_date) {
                echo "<p class='featured-date'>" . $image_data->date . "</p>";
                echo "<p class='featured-title'><span>" . $image_data->title . "</span></p>";
            }
            echo "</a>";
            echo "</div>";
        }
        echo "</div>\n";
        echo "</div>\n";
        echo $args['after'];
        // Private for now, we'll improve manual mode for customer use in 3.2
    } elseif ($manual == true) {
        echo $args['before'];
        echo "<div id='slider' class='" . implode(' ', foundation_featured_get_slider_classes()) . "'>\n";
        echo "<div class='swipe-wrap'>\n";
        echo $manual_html;
        echo "</div>\n";
        echo "</div>\n";
        echo $args['after'];
    }
}
开发者ID:sb-xs,项目名称:que-pour-elle,代码行数:35,代码来源:featured.php

示例15: foundation_webapp_body_classes

function foundation_webapp_body_classes($classes)
{
    $settings = foundation_get_settings();
    if (wptouch_fdn_is_web_app_mode() && isset($_COOKIE[WPTOUCH_WEBAPP_COOKIE . '-' . foundation_webapp_get_persistence_salt()])) {
        $classes[] = 'web-app-mode';
    }
    return $classes;
}
开发者ID:satoshishimazaki,项目名称:mknowhere,代码行数:8,代码来源:webapp.php


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