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

PHP foundation_get_settings函数代码示例

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

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



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


示例16: foundation_featured_slider

function foundation_featured_slider()
{
    global $foundation_featured_data;
    $args = foundation_featured_get_args();
    $settings = foundation_get_settings();
    if (count($foundation_featured_data) >= FOUNDATION_FEATURED_MIN_NUM) {
        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'];
    }
}
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:26,代码来源:featured.php


示例17: foundation_featured_settings

function foundation_featured_settings($page_options)
{
    $settings = foundation_get_settings();
    if ($settings->featured_enabled) {
        $featured_settings = array(wptouch_add_setting('range', 'featured_max_number_of_posts', __('Maximum number of posts', 'wptouch-pro'), '', WPTOUCH_SETTING_ADVANCED, '2.0', array('min' => 1, 'max' => 10, 'step' => 1)), wptouch_add_setting('checkbox', 'featured_autoslide', __('Automatically slide', 'wptouch-pro'), '', WPTOUCH_SETTING_BASIC, '1.0.2'), wptouch_add_pro_setting('checkbox', 'featured_continuous', __('Continuously slide', 'wptouch-pro'), '', WPTOUCH_SETTING_BASIC, '1.0.2'), wptouch_add_setting('checkbox', 'featured_grayscale', __('Grayscale images (CSS 3 effect)', 'wptouch-pro'), __('Featured slider images will be in grayscale for devices that support CSS filters.', 'wptouch-pro'), WPTOUCH_SETTING_ADVANCED, '1.0'), wptouch_add_setting('checkbox', 'featured_filter_posts', __('Featured slider posts also show in listings', 'wptouch-pro'), '', WPTOUCH_SETTING_BASIC, '1.0.3'), wptouch_add_setting('list', 'featured_speed', __('Slide transition speed', 'wptouch-pro'), '', WPTOUCH_SETTING_ADVANCED, '1.0.2', array('slow' => __('Slow', 'wptouch-pro'), 'normal' => __('Normal', 'wptouch-pro'), 'fast' => __('Fast', 'wptouch-pro'))), wptouch_add_setting('list', 'featured_type', '', '', WPTOUCH_SETTING_BASIC, '1.0', array('latest' => __('Show latest posts', 'wptouch-pro'), 'tag' => __('Show posts from a specific tag', 'wptouch-pro'), 'category' => __('Show posts from a specific category', 'wptouch-pro'), 'post_type' => __('Show posts from a specific post type', 'wptouch-pro'), 'posts' => __('Show only specific posts or pages', 'wptouch-pro'))), wptouch_add_setting('text', 'featured_tag', __('Only this tag', 'wptouch-pro'), __('Enter the tag/category slug name', 'wptouch-pro'), WPTOUCH_SETTING_BASIC, '1.0'), wptouch_add_setting('text', 'featured_tag', __('Only this tag', 'wptouch-pro'), __('Enter the tag/category slug name', 'wptouch-pro'), WPTOUCH_SETTING_BASIC, '1.0', false), wptouch_add_setting('text', 'featured_category', __('Only this category', 'wptouch-pro'), __('Enter the tag/category slug name', 'wptouch-pro'), WPTOUCH_SETTING_BASIC, '1.0', false), wptouch_add_setting('list', 'featured_post_type', __('Only this post type', 'wptouch-pro'), '', WPTOUCH_SETTING_BASIC, '3.5.3', array_merge(array('Select Post Type'), wptouch_custom_posts_get_list())), wptouch_add_setting('text', 'featured_post_ids', __('Comma-separated list of post/page IDs', 'wptouch-pro'), '', WPTOUCH_SETTING_BASIC, '1.0'));
    } else {
        $featured_settings = array();
    }
    wptouch_add_page_section(FOUNDATION_PAGE_GENERAL, __('Featured Slider', 'wptouch-pro'), 'foundation-featured-settings', array_merge(array(wptouch_add_setting('checkbox', 'featured_enabled', __('Enable featured slider', 'wptouch-pro'), __('Requires at least 2 entries to contain featured images', 'wptouch-pro'), WPTOUCH_SETTING_BASIC, '1.0')), $featured_settings), $page_options, FOUNDATION_SETTING_DOMAIN, true);
    return $page_options;
}
开发者ID:ahua,项目名称:www,代码行数:11,代码来源:featured.php


示例18: foundation_featured_settings

function foundation_featured_settings($page_options)
{
    $settings = foundation_get_settings();
    global $wptouch_pro;
    $posts_to_show_label = false;
    if (defined('WPTOUCH_IS_FREE')) {
        $posts_to_show_label = 'Posts to display';
    }
    if ($wptouch_pro->get_current_theme() == 'bauhaus' || $wptouch_pro->is_child_theme() && $wptouch_pro->get_parent_theme_info()->base == 'bauhaus') {
        $featured_enhanced_setting = array(wptouch_add_setting('list', 'featured_style', __('Featured slider style', 'wptouch-pro'), false, WPTOUCH_SETTING_BASIC, '2.0', array('enhanced' => __('Enhanced', 'wptouch-pro'), 'streamlined' => __('Streamlined', 'wptouch-pro'))));
    } else {
        $featured_enhanced_setting = array();
    }
    $featured_settings = array(wptouch_add_pro_setting('range', 'featured_max_number_of_posts', __('Number of posts in slider', 'wptouch-pro'), false, WPTOUCH_SETTING_BASIC, '2.0', array('min' => 1, 'max' => 10, 'step' => 1)), wptouch_add_setting('checkbox', 'featured_comments', __('Show # of comments', 'wptouch-pro'), false, WPTOUCH_SETTING_BASIC, '2.0'), wptouch_add_pro_setting('checkbox', 'featured_autoslide', __('Slide automatically', 'wptouch-pro'), false, WPTOUCH_SETTING_BASIC, '2.0'), wptouch_add_pro_setting('checkbox', 'featured_continuous', __('Slides repeat', 'wptouch-pro'), false, WPTOUCH_SETTING_BASIC, '2.0'), wptouch_add_pro_setting('checkbox', 'featured_grayscale', __('Make images grayscale', 'wptouch-pro'), false, WPTOUCH_SETTING_BASIC, '2.0'), wptouch_add_setting('checkbox', 'featured_filter_posts', __('Slider posts also show in listings', 'wptouch-pro'), false, WPTOUCH_SETTING_BASIC, '2.0'), wptouch_add_pro_setting('list', 'featured_speed', __('Slide transition speed', 'wptouch-pro'), false, WPTOUCH_SETTING_BASIC, '2.0', array('slow' => __('Slow', 'wptouch-pro'), 'normal' => __('Normal', 'wptouch-pro'), 'fast' => __('Fast', 'wptouch-pro'))), wptouch_add_setting('list', 'featured_type', $posts_to_show_label, false, WPTOUCH_SETTING_BASIC, '2.0', array('latest' => __('Show latest posts', 'wptouch-pro'), 'tag' => __('Show posts from a specific tag', 'wptouch-pro'), 'category' => __('Show posts from a specific category', 'wptouch-pro'), 'post_type' => __('Show posts from a specific post type', 'wptouch-pro'), 'posts' => __('Show only specific posts or pages', 'wptouch-pro'))), wptouch_add_setting('text', 'featured_tag', __('Only this tag', 'wptouch-pro'), __('Enter the tag/category slug name', 'wptouch-pro'), WPTOUCH_SETTING_BASIC, '2.0', false), wptouch_add_setting('text', 'featured_category', __('Only this category', 'wptouch-pro'), __('Enter the tag/category slug name', 'wptouch-pro'), WPTOUCH_SETTING_BASIC, '2.0', false), wptouch_add_setting('text', 'featured_post_ids', __('Comma-separated list of post/page IDs', 'wptouch-pro'), false, WPTOUCH_SETTING_BASIC, '2.0'));
    if (function_exists('wptouch_custom_posts_get_list')) {
        $featured_settings[] = wptouch_add_pro_setting('list', 'featured_post_type', __('Only this post type', 'wptouch-pro'), false, WPTOUCH_SETTING_BASIC, '2.0', array_merge(array('Select Post Type'), wptouch_custom_posts_get_list()));
    }
    wptouch_add_page_section(FOUNDATION_PAGE_GENERAL, __('Featured Slider', 'wptouch-pro'), 'foundation-featured-settings', array_merge(array(wptouch_add_setting('checkbox', 'featured_enabled', __('Enable featured slider', 'wptouch-pro'), false, WPTOUCH_SETTING_BASIC, '2.0')), $featured_enhanced_setting, apply_filters('wptouch_featured_slider_settings', $featured_settings)), $page_options, FOUNDATION_SETTING_DOMAIN, true, false, 30);
    return $page_options;
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:20,代码来源:featured.php


示例19: foundation_exclude_categories_tags

function foundation_exclude_categories_tags($query)
{
    if (wptouch_is_mobile_theme_showing()) {
        $settings = foundation_get_settings();
        if ($settings->excluded_categories) {
            $new_cats = _foundation_explode_and_trim_taxonomy($settings->excluded_categories, 'category');
            if (!$query->is_single()) {
                $query->set('category__not_in', $new_cats);
            }
        }
        if ($settings->excluded_tags) {
            $new_tags = _foundation_explode_and_trim_taxonomy($settings->excluded_tags, 'post_tag');
            if (!$query->is_single()) {
                $query->set('tag__not_in', $new_tags);
            }
        }
    }
    return $query;
}
开发者ID:sb-xs,项目名称:que-pour-elle,代码行数:19,代码来源:root-functions.php


示例20: wptouch_canonical_link

function wptouch_canonical_link()
{
    $settings = foundation_get_settings();
    $wordpress_posts_page = get_option('page_for_posts');
    $wptouch_posts_page = $settings->latest_posts_page;
    $on_wptouch_posts_page = false;
    if ($wptouch_posts_page != 'none') {
        $on_wptouch_posts_page = get_permalink() == get_permalink($wptouch_posts_page);
    }
    if (is_home() && !$on_wptouch_posts_page) {
        if ($wordpress_posts_page != 0) {
            $permalink = get_permalink($wordpress_posts_page);
        } else {
            $permalink = site_url() . '/';
        }
    } else {
        $permalink = get_permalink();
    }
    echo '<link rel="canonical" href="' . $permalink . '" />';
}
开发者ID:jamesfacts,项目名称:gissler_wp_touch,代码行数:20,代码来源:theme.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP foundationpress_entry_meta函数代码示例发布时间:2022-05-15
下一篇:
PHP foundation_get_base_module_url函数代码示例发布时间: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