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


PHP has_site_icon函数代码示例

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


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

示例1: get_css

    /**
     * @return string Inline CSS
     * @since 0.0.1-dev
     */
    private function get_css()
    {
        if (has_post_thumbnail() && !post_password_required()) {
            $thumb = esc_url(get_the_post_thumbnail_url(null, 'push7ssb-sbz-thumbnail'));
        } elseif (has_site_icon()) {
            $thumb = esc_url(get_site_icon_url());
        } else {
            $thumb = '';
        }
        return <<<EOI
.push7-sb-sbz-with-thumb {
\tbackground-image: url({$thumb});
}
.push7-sb-sbz-with-thumb-subscribe {
\tbackground-color: rgba(43,43,43, 0.7);
\tcolor: #ffffff;
}
@media only screen and (min-width : 415px) {
\t.push7-sb-sbz-with-thumb-thumbnail {
\t\tbackground-image: url({$thumb});
\t}
\t.push7-sb-sbz-with-thumb-subscribe {
\t\tbackground-color: rgba(43,43,43, 1);
\t}
}
EOI;
    }
开发者ID:hinaloe,项目名称:push7-subscribe-button,代码行数:31,代码来源:class.withthumb.php

示例2: cruxstore_add_site_icon

/**
 * Add custom favicon
 *
 * @since 1.0
 */
function cruxstore_add_site_icon()
{
    if (!function_exists('has_site_icon') || !has_site_icon()) {
        $custom_favicon = cruxstore_option('custom_favicon');
        $custom_favicon_iphone = cruxstore_option('custom_favicon_iphone');
        $custom_favicon_iphone_retina = cruxstore_option('custom_favicon_iphone_retina');
        $custom_favicon_ipad = cruxstore_option('custom_favicon_ipad');
        $custom_favicon_ipad_retina = cruxstore_option('custom_favicon_ipad_retina');
        if ($custom_favicon['url']) {
            printf('<link rel="shortcut icon" href="%s"/>', esc_url($custom_favicon['url']));
        }
        if ($custom_favicon_iphone['url']) {
            printf('<link rel="apple-touch-icon" href="%s"/>', esc_url($custom_favicon_iphone['url']));
        }
        if ($custom_favicon_ipad['url']) {
            printf('<link rel="apple-touch-icon" sizes="72x72" href="%s"/>', esc_url($custom_favicon_ipad['url']));
        }
        if ($custom_favicon_iphone_retina['url']) {
            printf('<link rel="apple-touch-icon" sizes="114x114" href="%s"/>', esc_url($custom_favicon_iphone_retina['url']));
        }
        if ($custom_favicon_ipad_retina['url']) {
            printf('<link rel="apple-touch-icon" sizes="144x144" href="%s"/>', esc_url($custom_favicon_ipad_retina['url']));
        }
    }
}
开发者ID:websideas,项目名称:Mondova,代码行数:30,代码来源:functions.php

示例3: register_hooks

 /**
  * Register our actions and filters
  * @return null
  */
 public function register_hooks()
 {
     add_action('jetpack_modules_loaded', array($this, 'jetpack_modules_loaded'));
     add_action('admin_menu', array($this, 'admin_menu_upload_site_icon'));
     add_filter('display_media_states', array($this, 'add_media_state'));
     add_action('admin_init', array($this, 'admin_init'));
     add_action('admin_init', array($this, 'delete_site_icon_hook'));
     add_action('admin_print_styles-options-general.php', array($this, 'add_general_options_styles'));
     // Add the favicon to the front end and backend if Core's site icon not used.
     /**
      * As of WP 4.3 and JP 3.6, both are outputting the same icons so no need to fire these.
      * This is a temporary solution until Jetpack's module primary function is deprecated.
      * In the future, Jetpack's can output other sizes using Core's icon.
      */
     if (function_exists('has_site_icon') && !has_site_icon() || !function_exists('has_site_icon')) {
         add_action('wp_head', array($this, 'site_icon_add_meta'));
         add_action('admin_head', array($this, 'site_icon_add_meta'));
         add_action('atom_head', array($this, 'atom_icon'));
         add_action('rss2_head', array($this, 'rss2_icon'));
     }
     // Check if site icon is available in core, and if so convert Jetpack's to use it.
     add_action('admin_init', array('Jetpack', 'jetpack_site_icon_available_in_core'));
     add_action('delete_option', array('Jetpack_Site_Icon', 'delete_temp_data'), 10, 1);
     // used to clean up after itself.
     add_action('delete_attachment', array('Jetpack_Site_Icon', 'delete_attachment_data'), 10, 1);
     // in case user deletes the attachment via
     add_filter('get_post_metadata', array('Jetpack_Site_Icon', 'delete_attachment_images'), 10, 4);
 }
开发者ID:annbransom,项目名称:techishowl_prod_backup,代码行数:32,代码来源:jetpack-site-icon.php

示例4: __construct

 function __construct()
 {
     $this->options = array('custom_css_enable' => array('name' => 'custom_css_enable', 'title' => __('Custom CSS', "news-magazine"), 'type' => 'checkbox_open', 'show' => array("custom_css_text"), 'hide' => array(), 'description' => __('Custom CSS will change the visual style of the website. The CSS code in this box is being applied to any page or post.', "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'custom_css_text' => array('name' => 'custom_css_text', 'title' => '', 'type' => 'textarea', "sanitize_type" => "css", 'valid_options' => '', 'description' => __('Custom CSS code.', "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => '', 'customizer' => array()), 'latest_posts_enable' => array('name' => 'latest_posts_enable', 'title' => __('Latest posts', "news-magazine"), 'type' => 'checkbox_open', 'show' => array("latest_posts_text", "latest_posts_count", "latest_post_categories"), 'hide' => array(), 'description' => __('Latest posts.', "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'latest_posts_text' => array('name' => 'latest_posts_text', 'title' => '', 'type' => 'text', "sanitize_type" => "sanitize_text_field", 'valid_options' => '', 'description' => __('Latest posts text.', "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => 'Latest:', 'customizer' => array()), 'latest_posts_count' => array('name' => 'latest_posts_count', 'title' => '', 'type' => 'text', "sanitize_type" => "sanitize_text_field", 'inpus_size' => 2, 'valid_options' => '', 'description' => __('Latest posts count.', "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => get_option('posts_per_page'), 'customizer' => array()), "latest_post_categories" => array("name" => "latest_post_categories", "title" => "", 'type' => 'select', 'multiple' => "true", "valid_options" => $this->get_all_categories(), "description" => __("Show posts only from these categories.", "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => array(''), 'customizer' => array()), 'logo_type' => array("name" => "logo_type", "title" => __("Logo type", "news-magazine"), 'type' => 'radio_open', "description" => "", 'valid_options' => array('none' => __("None", "news-magazine"), 'image' => __("Image", "news-magazine"), 'text' => __("Text", "news-magazine")), 'show' => array('image' => 'logo_img'), 'hide' => array(), 'section' => 'general_main', 'tab' => 'general', 'default' => 'image', 'customizer' => array()), 'logo_img' => array('name' => 'logo_img', 'title' => __('Logo', "news-magazine"), "sanitize_type" => "esc_url_raw", 'type' => 'upload_single', 'description' => __('Upload custom logo image.', "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => WDWT_IMG . 'logo1.png', 'customizer' => array()), 'show_desc' => array('name' => 'show_desc', 'title' => __('Show description', "news-magazine"), 'type' => 'checkbox', 'description' => __('Check the box to show site description.', "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'blog_style' => array('name' => 'blog_style', 'title' => __('Blog Style post format', "news-magazine"), 'type' => 'checkbox', 'description' => __('Check the box to have short previews for the homepage/index posts.', "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'grab_image' => array('name' => 'grab_image', 'title' => __('Grab the first post image', "news-magazine"), 'type' => 'checkbox', 'description' => __('Enable this option if you want to use the images that are already in your post to create a thumbnail without using custom fields. In this case thumbnail images will be generated automatically using the first image of the post. Note that the image needs to be hosted on your own server.', "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'date_enable' => array("name" => "date_enable", "title" => __("Display post meta information", "news-magazine"), 'type' => 'checkbox', "description" => __("Choose whether to display the post meta information such as date, author and etc.", "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'footer_text_enable' => array("name" => "footer_text_enable", "title" => __("Information in the Footer", "news-magazine"), 'type' => 'checkbox_open', 'show' => array("footer_text"), 'hide' => array(), "description" => __("Check the box to display custom HTML for the footer.", "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'footer_text' => array("name" => "footer_text", "title" => __("Information in the Footer", "news-magazine"), 'type' => 'textarea', "sanitize_type" => "sanitize_footer_html_field", "description" => __("Here you can provide the HTML code to be inserted in the footer of your web site.", "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => '<span id="copyright">WordPress Themes by <a href="' . WDWT_HOMEPAGE . '"  target="_blank" title="Web-Dorado">Web-Dorado</a></span>', 'customizer' => array()), 'show_facebook_icon' => array("name" => "show_facebook_icon", "title" => __("Show Facebook Icon", "news-magazine"), 'type' => 'checkbox_open', 'show' => array("facebook_url"), 'hide' => array(), "description" => __("Check the box to display Facebook icon.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'facebook_url' => array("name" => "facebook_url", "title" => "", 'type' => 'text', "sanitize_type" => "esc_url_raw", "description" => __("Enter your Facebook Profile URL below.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => '#', 'customizer' => array()), 'show_twitter_icon' => array("name" => "show_twitter_icon", "title" => __("Show Twitter Icon", "news-magazine"), 'type' => 'checkbox_open', 'show' => array("twitter_url"), 'hide' => array(), "description" => __("Check the box to display Twitter icon.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'twitter_url' => array("name" => "twitter_url", "title" => "", 'type' => 'text', "sanitize_type" => "esc_url_raw", "description" => __("Enter your Twitter Profile URL below.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => '#', 'customizer' => array()), 'show_google_icon' => array("name" => "show_google_icon", "title" => __("Show Google+ Icon", "news-magazine"), 'type' => 'checkbox_open', 'show' => array("google_url"), 'hide' => array(), "description" => __("Check the box to display Google + icon.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'google_url' => array("name" => "google_url", "title" => "", 'type' => 'text', "sanitize_type" => "esc_url_raw", "description" => __("Enter your Google+ Profile URL below.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => '#', 'customizer' => array()), 'show_rss_icon' => array("name" => "show_rss_icon", "title" => __("Show RSS Icon", "news-magazine"), 'type' => 'checkbox_open', 'show' => array("rss_url"), 'hide' => array(), "description" => __("Check the box to display RSS feed icon.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'rss_url' => array("name" => "rss_url", "title" => "", 'type' => 'text', "sanitize_type" => "esc_url_raw", "description" => __("Enter your RSS URL below.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => '#', 'customizer' => array()), 'show_instagram_icon' => array("name" => "show_instagram_icon", "title" => __("Show instagram Icon", "news-magazine"), 'type' => 'checkbox_open', 'show' => array("instagram_url"), 'hide' => array(), "description" => __("Check the box to display Instagram icon.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'instagram_url' => array("name" => "instagram_url", "title" => "", 'type' => 'text', "sanitize_type" => "esc_url_raw", "description" => __("Enter your Instagram Profile URL below.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => '#', 'customizer' => array()), 'show_linkedin_icon' => array("name" => "show_linkedin_icon", "title" => __("Show linkedin Icon", "news-magazine"), 'type' => 'checkbox_open', 'show' => array("linkedin_url"), 'hide' => array(), "description" => __("Check the box to display LinkedIn icon.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'linkedin_url' => array("name" => "linkedin_url", "title" => "", 'type' => 'text', "sanitize_type" => "esc_url_raw", "description" => __("Enter your LinkedIn Profile URL below.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => '#', 'customizer' => array()), 'show_pinterest_icon' => array("name" => "show_pinterest_icon", "title" => __("Show pinterest Icon", "news-magazine"), 'type' => 'checkbox_open', 'show' => array("pinterest_url"), 'hide' => array(), "description" => __("Check the box to display Pinterest icon.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'pinterest_url' => array("name" => "pinterest_url", "title" => "", 'type' => 'text', "sanitize_type" => "esc_url_raw", "description" => __("Enter your Pinterest Profile URL below.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => '#', 'customizer' => array()), 'show_youtube_icon' => array("name" => "show_youtube_icon", "title" => __("Show youtube Icon", "news-magazine"), 'type' => 'checkbox_open', 'show' => array("youtube_url"), 'hide' => array(), "description" => __("Check the box to display Youtube icon.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => true, 'customizer' => array()), 'youtube_url' => array("name" => "youtube_url", "title" => "", 'type' => 'text', "sanitize_type" => "esc_url_raw", "description" => __("Enter your Youtube profile URL below.", "news-magazine"), 'section' => 'general_links', 'tab' => 'general', 'default' => '#', 'customizer' => array()));
     if (!function_exists('has_site_icon') || !has_site_icon()) {
         $this->options['favicon_enable'] = array('name' => 'favicon_enable', 'title' => __('Show Favicon', "news-magazine"), 'type' => 'checkbox_open', 'show' => array("favicon_img"), 'hide' => array(), 'description' => __('Check the box to display the favicon.', "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => false, 'customizer' => array());
         $this->options['favicon_img'] = array('name' => 'favicon_img', 'title' => '', 'type' => 'upload_single', "sanitize_type" => "esc_url_raw", 'valid_options' => '', 'description' => __('Click on the Upload Image button to upload the favicon image.', "news-magazine"), 'section' => 'general_main', 'tab' => 'general', 'default' => WDWT_IMG . 'favico.ico', 'customizer' => array());
     }
 }
开发者ID:jimdough,项目名称:Roadmaster,代码行数:8,代码来源:page_general_settings.php

示例5: test_has_site_icon_returns_false_when_called_for_other_site_without_site_icon_set

 /**
  * @group site_icon
  * @group multisite
  */
 function test_has_site_icon_returns_false_when_called_for_other_site_without_site_icon_set()
 {
     if (!is_multisite()) {
         $this->markTestSkipped('This test requires multisite.');
     }
     $blog_id = $this->factory->blog->create();
     $this->assertFalse(has_site_icon($blog_id));
 }
开发者ID:pbearne,项目名称:contrib2core,代码行数:12,代码来源:template.php

示例6: test_has_site_icon

 /**
  * @group site_icon
  */
 function test_has_site_icon()
 {
     $this->assertFalse(has_site_icon());
     $this->_set_site_icon();
     $this->assertTrue(has_site_icon());
     $this->_remove_site_icon();
     $this->assertFalse(has_site_icon());
 }
开发者ID:rclilly,项目名称:wordpress-develop,代码行数:11,代码来源:template.php

示例7: beans_favicon

/**
 * Echo head favicon if no icon was added via the customizer.
 *
 * @since 1.0.0
 */
function beans_favicon()
{
    // Stop here if and icon was added via the customizer.
    if (function_exists('has_site_icon') && has_site_icon()) {
        return;
    }
    $url = file_exists(get_stylesheet_directory() . '/favicon.ico') ? get_stylesheet_directory_uri() . '/favicon.ico' : BEANS_URL . 'favicon.ico';
    beans_selfclose_markup_e('beans_favicon', 'link', array('rel' => 'Shortcut Icon', 'href' => $url, 'type' => 'image/x-icon'));
}
开发者ID:Getbeans,项目名称:Beans,代码行数:14,代码来源:header.php

示例8: load_new_favicons

function load_new_favicons()
{
    // Use WP site icon, if available
    if (function_exists('has_site_icon') && has_site_icon()) {
        return;
    }
    $output = '<link rel="favicon" sizes="57x57" href="/content/themes/foodgroup-child/images/favicons/favicon.ico"><link rel="apple-touch-icon" sizes="57x57" href="/content/themes/foodgroup-child/images/favicons/apple-touch-icon-57x57.png"><link rel="apple-touch-icon" sizes="60x60" href="/content/themes/foodgroup-child/images/favicons/apple-touch-icon-60x60.png"><link rel="apple-touch-icon" sizes="72x72" href="/content/themes/foodgroup-child/images/favicons/apple-touch-icon-72x72.png"><link rel="apple-touch-icon" sizes="76x76" href="/content/themes/foodgroup-child/images/favicons/apple-touch-icon-76x76.png"><link rel="apple-touch-icon" sizes="114x114" href="/content/themes/foodgroup-child/images/favicons/apple-touch-icon-114x114.png"><link rel="apple-touch-icon" sizes="120x120" href="/content/themes/foodgroup-child/images/favicons/apple-touch-icon-120x120.png"><link rel="apple-touch-icon" sizes="144x144" href="/content/themes/foodgroup-child/images/favicons/apple-touch-icon-144x144.png"><link rel="apple-touch-icon" sizes="152x152" href="/content/themes/foodgroup-child/images/favicons/apple-touch-icon-152x152.png"><link rel="apple-touch-icon" sizes="180x180" href="/content/themes/foodgroup-child/images/favicons/apple-touch-icon-180x180.png"><link rel="icon" type="image/png" href="/content/themes/foodgroup-child/images/favicons/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/content/themes/foodgroup-child/images/favicons/favicon-194x194.png" sizes="194x194"><link rel="icon" type="image/png" href="/content/themes/foodgroup-child/images/favicons/favicon-96x96.png" sizes="96x96"><link rel="icon" type="image/png" href="/content/themes/foodgroup-child/images/favicons/android-chrome-192x192.png" sizes="192x192"><link rel="icon" type="image/png" href="/content/themes/foodgroup-child/images/favicons/favicon-16x16.png" sizes="16x16"><link rel="manifest" href="/content/themes/foodgroup-child/images/favicons/manifest.json"><link rel="mask-icon" href="/content/themes/foodgroup-child/images/favicons/safari-pinned-tab.svg" color="#ffffff"><meta name="apple-mobile-web-app-title" content="The Food Group"><meta name="application-name" content="The Food Group"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-TileImage" content="/mstile-144x144.png"><meta name="theme-color" content="#ffffff">';
    echo $output;
}
开发者ID:arobbins,项目名称:foodgroup,代码行数:9,代码来源:theme-defaults.php

示例9: beans_favicon

/**
 * Echo head favicon if no icon was added via the customizer.
 *
 * @since 1.0.0
 */
function beans_favicon()
{
    // Stop here if and icon was added via the customizer.
    if (function_exists('has_site_icon') && has_site_icon()) {
        return;
    }
    $path = file_exists(get_template_directory() . 'favicon.ico') ? get_template_directory() . 'favicon.ico' : BEANS_URL . 'favicon.ico';
    echo beans_selfclose_markup('beans_favicon', 'link', array('rel' => 'Shortcut Icon', 'href' => $path, 'type' => 'image/x-icon'));
}
开发者ID:JoomPassion,项目名称:Beans,代码行数:14,代码来源:header.php

示例10: catchflames_is_site_icon_active

 /**
  * Return true if no core site icon is present
  *
  * @since Catch Flames 2.7
  */
 function catchflames_is_site_icon_active($control)
 {
     //Check if has_site_icon function exists. If it does not, WP version is less than 4.3
     if (function_exists('has_site_icon')) {
         //Return true if core site icon is not present, else return false
         return !has_site_icon();
     } else {
         return true;
     }
 }
开发者ID:ilke-zilci,项目名称:newcomers-wp,代码行数:15,代码来源:customizer-active-callbacks.php

示例11: ci_favicon

        function ci_favicon()
        {
            if (function_exists('has_site_icon') && has_site_icon()) {
                return;
            }
            if (ci_setting('favicon')) {
                ?>
<link rel="shortcut icon" type="image/x-icon" href="<?php 
                echo esc_attr(ci_setting('favicon'));
                ?>
" /><?php 
            }
        }
开发者ID:nickolasnikolic,项目名称:wordpress-heroku-php,代码行数:13,代码来源:favicon.php

示例12: inspiry_generate_favicon

    /**
     * Generate favicon
     */
    function inspiry_generate_favicon()
    {
        if (!function_exists('has_site_icon') || !has_site_icon()) {
            global $inspiry_options;
            if (!empty($inspiry_options['inspiry_favicon']) && !empty($inspiry_options['inspiry_favicon']['url'])) {
                ?>
                <!-- favicon -->
                <link rel="shortcut icon" href="<?php 
                echo esc_url($inspiry_options['inspiry_favicon']['url']);
                ?>
"/>
                <?php 
            }
        }
    }
开发者ID:Juni4567,项目名称:mycashflow,代码行数:18,代码来源:header-functions.php

示例13: omega_customize_logo_register

/**
 * Registers custom sections, settings, and controls for the $wp_customize instance.
 *
 * @since 0.3.2
 * @access private
 * @param object $wp_customize
 */
function omega_customize_logo_register($wp_customize)
{
    /* Add the footer section. */
    $wp_customize->add_section('title_tagline', array('title' => esc_html__('Branding', 'omega'), 'priority' => 1, 'capability' => 'edit_theme_options'));
    /* Add the 'custom_logo' setting. */
    $wp_customize->add_setting("custom_logo", array('default' => '', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
    /* Add the textarea control for the 'custom_css' setting. */
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'custom_logo', array('label' => esc_html__('Logo', 'omega'), 'section' => 'title_tagline', 'settings' => "custom_logo")));
    if (!function_exists('has_site_icon') || !has_site_icon()) {
        /* Add the 'custom_favicon' setting. */
        $wp_customize->add_setting("custom_favicon", array('default' => '', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field'));
        /* Add the textarea control for the 'custom_css' setting. */
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'custom_favicon', array('label' => esc_html__('Favicon', 'omega'), 'section' => 'title_tagline', 'settings' => "custom_favicon")));
    }
}
开发者ID:davidgilman,项目名称:Live2Give,代码行数:22,代码来源:custom-logo.php

示例14: get_thumbnail

 /**
  * Get thumbnail image url
  *
  * @param null|\WP_Post $_post Post data object.
  *
  * @return string
  */
 public static function get_thumbnail($_post = null)
 {
     $thumb = apply_filters(VA_SOCIALBUZZ_PREFIX . 'default_thumbnail', 'none');
     if (empty($_post)) {
         global $post;
         $_post = $post;
     }
     if (!empty($_post) && has_post_thumbnail($_post) && !post_password_required($_post)) {
         $thumb = get_the_post_thumbnail_url($_post, VA_SOCIALBUZZ_PREFIX . 'thumbnail');
     } elseif ('none' === $thumb && has_header_image()) {
         $thumb = get_header_image();
     } elseif ('none' === $thumb && has_site_icon()) {
         $thumb = get_site_icon_url();
     }
     return $thumb;
 }
开发者ID:visualive,项目名称:va-social-buzz,代码行数:23,代码来源:trait-functions.php

示例15: wen_corporate_add_favicon_webclip

 function wen_corporate_add_favicon_webclip()
 {
     if (function_exists('has_site_icon') && has_site_icon()) {
         return;
     }
     $site_favicon = wen_corporate_get_option('site_favicon');
     if (!empty($site_favicon)) {
         $wen_corporate_favicon = '<link rel="shortcut icon" href="' . esc_url($site_favicon) . '" type="image/x-icon" />';
         echo $wen_corporate_favicon;
     }
     $site_web_clip_icon = wen_corporate_get_option('site_web_clip_icon');
     if (!empty($site_web_clip_icon)) {
         $wen_corporate_web_clip_icon = '<link rel="apple-touch-icon-precomposed" href="' . esc_url($site_web_clip_icon) . '" />';
         echo $wen_corporate_web_clip_icon;
     }
 }
开发者ID:diptigandhi24,项目名称:Trade-Bucket-Global,代码行数:16,代码来源:theme-hooks.php


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