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

PHP icl_get_home_url函数代码示例

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

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



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

示例1: wpml_get_home_url

function wpml_get_home_url(){
    if(function_exists('icl_get_home_url')){
        return icl_get_home_url();
    }else{
        return rtrim(get_bloginfo('url') , '/') . '/';
    }
}
开发者ID:polaris610,项目名称:medicalhound,代码行数:7,代码来源:wpml.php


示例2: searchBar

    /**
     * Function to format and display the search bar in the main menu
     *
     * @return string
     * @added 2.0
     */
    static function searchBar()
    {
        /* Added for WPML Compatibility in 2.2
         * Thanks to miguelcortereal for this */
        $action = function_exists('icl_get_home_url') ? icl_get_home_url() : get_home_url();
        ?>

        <form action="<?php 
        echo $action;
        ?>
" id="responsiveSearch" method="get" role="search">
            <span class="icon-buscador">
                <img src="<?php 
        echo get_home_url();
        ?>
/wp-content/themes/quidus/img/lupa.png" alt="Lupa">
            </span>
            <span class="caja-texto">
                <input type="search" name="s" class="form-control" value="" placeholder="Buscar">
            </span>
            <input type="submit" id="responsiveSearchSubmit" />
            
        </form>
                        
   <?php 
    }
开发者ID:Telemedellin,项目名称:empleados,代码行数:32,代码来源:View.php


示例3: getWpUrl

 public function getWpUrl()
 {
     if (function_exists("icl_get_home_url")) {
         return icl_get_home_url();
     }
     return get_bloginfo("wpurl");
 }
开发者ID:Nodonisko,项目名称:WP-Framework,代码行数:7,代码来源:kt_wp_info.inc.php


示例4: filter_options

 function filter_options()
 {
     global $bfa_ata;
     $bfa_ata['get_option_home'] = rtrim(icl_get_home_url(), '/');
     foreach ($this->translatable_strings as $string) {
         $bfa_ata[$string] = icl_t('theme ' . $this->name, $this->make_title($string), $bfa_ata[$string]);
     }
 }
开发者ID:winyatasenjaya,项目名称:sitepress-multilingual-cms,代码行数:8,代码来源:load.php


示例5: presscore_wpml_get_home_url

function presscore_wpml_get_home_url()
{
    if (function_exists('icl_get_home_url')) {
        return icl_get_home_url();
    } else {
        return rtrim(home_url(), '/') . '/';
    }
}
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:8,代码来源:wpml-integration.php


示例6: base_wpml_home_page_url

function base_wpml_home_page_url()
{
    if (function_exists('icl_get_home_url')) {
        $base_home_url = icl_get_home_url();
    } else {
        $base_home_url = get_site_url();
    }
    return $base_home_url;
}
开发者ID:powleeno,项目名称:wordpressBase,代码行数:9,代码来源:wpml-support.php


示例7: smc_wpcs_correct_domain_in_url

function smc_wpcs_correct_domain_in_url($url)
{
    if (function_exists('icl_get_home_url')) {
        // Use the language switcher object, because that contains WPML settings, and it's available globally
        global $icl_language_switcher;
        // Only make the change if we're using the languages-per-domain option
        if (isset($icl_language_switcher->settings['language_negotiation_type']) && $icl_language_switcher->settings['language_negotiation_type'] == 2) {
            return str_replace(untrailingslashit(get_option('home')), untrailingslashit(icl_get_home_url()), $url);
        }
    }
    return $url;
}
开发者ID:javierdlahoz,项目名称:paella-development,代码行数:12,代码来源:smc_widget.php


示例8: add_thematic_blogtitle

    function add_thematic_blogtitle()
    {
        ?>
		<div id="blog-title"><span><a href="<?php 
        echo icl_get_home_url();
        ?>
" title="<?php 
        bloginfo('name');
        ?>
" rel="home"><?php 
        bloginfo('name');
        ?>
</a></span></div>
		<?php 
    }
开发者ID:winyatasenjaya,项目名称:sitepress-multilingual-cms,代码行数:15,代码来源:load.php


示例9: is_swp_registered

function is_swp_registered()
{
    // Fetch the User's Options Array
    $swp_user_options = get_option('socialWarfareOptions');
    // Create a Registration Code from the Domain Name
    if (function_exists('icl_get_home_url')) {
        $domain = icl_get_home_url();
    } else {
        $domain = get_home_url();
    }
    $regCode = md5($domain);
    // If the Premium Code is currently set....
    if (isset($swp_user_options['premiumCode']) && md5($regCode) == $swp_user_options['premiumCode']) {
        // It's registered
        return true;
        // IF the premium code doesn't match....
    } else {
        // It's not registered
        return 0;
    }
}
开发者ID:warfare-plugins,项目名称:social-warfare,代码行数:21,代码来源:registration.php


示例10: searchBar

    /**
     * Function to format and display the search bar in the main menu
     *
     * @return string
     * @added 2.0
     */
    static function searchBar()
    {
        /* Added for WPML Compatibility in 2.2
         * Thanks to miguelcortereal for this */
        $action = function_exists('icl_get_home_url') ? icl_get_home_url() : get_home_url();
        ?>

        <form action="<?php 
        echo $action;
        ?>
" id="responsiveSearch" method="get" role="search">

            <input type="search" name="s" value="" placeholder="<?php 
        _e('Search', 'responsive-menu');
        ?>
" id="responsiveSearchInput">
            <input type="submit" id="responsiveSearchSubmit" />
            
        </form>                        
                        
   <?php 
    }
开发者ID:JulieKuehl,项目名称:auburn-agency,代码行数:28,代码来源:View.php


示例11: suffusion_display_header

function suffusion_display_header()
{
    global $suf_sub_header_vertical_alignment, $suf_header_fg_image_type, $suf_header_fg_image, $suf_header_alignment, $suf_sub_header_alignment;
    $display = apply_filters('suffusion_can_display_header', true);
    if (!$display) {
        return;
    }
    if ($suf_header_alignment == 'right') {
        suffusion_display_widgets_in_header();
    }
    if (!is_singular()) {
        $header_tag = "h1";
    } else {
        $header_tag = "h2";
    }
    ?>
	<header id="header" class="fix">
	<?php 
    $header = $suf_header_fg_image_type == 'image' && trim($suf_header_fg_image) != '' ? "<img src='{$suf_header_fg_image}' alt='" . esc_attr(get_bloginfo('name')) . "'/>" : get_bloginfo('name', 'display');
    $home_link = home_url();
    if (function_exists('icl_get_home_url')) {
        $home_link = icl_get_home_url();
    }
    if ($suf_sub_header_vertical_alignment == "above") {
        ?>
		<div class="description <?php 
        echo $suf_sub_header_alignment;
        ?>
"><?php 
        bloginfo('description');
        ?>
</div>
		<<?php 
        echo $header_tag;
        ?>
 class="blogtitle <?php 
        echo $suf_header_alignment;
        ?>
"><a href="<?php 
        echo $home_link;
        ?>
"><?php 
        echo $header;
        ?>
</a></<?php 
        echo $header_tag;
        ?>
>
	<?php 
    } else {
        ?>
		<<?php 
        echo $header_tag;
        ?>
 class="blogtitle <?php 
        echo $suf_header_alignment;
        ?>
"><a href="<?php 
        echo $home_link;
        ?>
"><?php 
        echo $header;
        ?>
</a></<?php 
        echo $header_tag;
        ?>
>
		<div class="description <?php 
        echo $suf_sub_header_alignment;
        ?>
"><?php 
        bloginfo('description');
        ?>
</div>
<?php 
    }
    ?>
    </header><!-- /header -->
<?php 
    if ($suf_header_alignment != 'right') {
        suffusion_display_widgets_in_header();
    }
}
开发者ID:jpsutton,项目名称:suffusion,代码行数:83,代码来源:actions.php


示例12: us_get_option

 *
 * @action Before the template: 'us_before_template:templates/widgets/contacts'
 * @action After the template: 'us_after_template:templates/widgets/contacts'
 */
$class_name = '';
if (us_get_option('logo_type', 'text') == 'text') {
    $class_name .= ' with_title';
    $logo_text = us_get_option('logo_text') ? us_get_option('logo_text') : bloginfo('name');
} else {
    if (us_get_option('logo_image_transparent')) {
        $class_name = ' with_transparent';
    }
    $default_logo_url = us_get_option('logo_image');
    $transparent_logo_url = us_get_option('logo_image_transparent');
}
$home_url = function_exists('icl_get_home_url') ? icl_get_home_url() : esc_url(home_url('/'));
?>

<div class="w-logo <?php 
echo $class_name;
?>
">
	<a class="w-logo-link" href="<?php 
echo $home_url;
?>
">
<?php 
if (us_get_option('logo_type', 'text') == 'img') {
    ?>
		<span class="w-logo-img">
<?php 
开发者ID:afquinterog,项目名称:zephyr,代码行数:31,代码来源:logo.php


示例13: arjuna_print_page_menu

function arjuna_print_page_menu()
{
    $arjunaOptions = arjuna_get_options();
    $html = '';
    $html .= '<ul id="headerMenu2">';
    if ($arjunaOptions['menus']['2']['displayHome']) {
        $html .= '<li><a href="' . (function_exists('icl_get_home_url') ? icl_get_home_url() : home_url('/')) . '" class="homeIcon">' . __('Home', 'Arjuna') . '</a></li>';
    }
    $html .= wp_list_pages('title_li=&echo=0&depth=' . $arjunaOptions['menus']['2']['depth']);
    $html .= '</ul>';
    print $html;
}
开发者ID:howardlei82,项目名称:IGSM-Website,代码行数:12,代码来源:functions.php


示例14: term_link_filter

 /**
  * Fix "get_term_link" for this taxonomy.
  */
 public function term_link_filter($termlink, $term, $taxonomy)
 {
     // check if the post type is handle
     if (isset($this->taxonomies[$taxonomy])) {
         if (!is_object($term)) {
             if (is_int($term)) {
                 $term = get_term($term, $taxonomy);
             } else {
                 $term = get_term_by('slug', $term, $taxonomy);
             }
         }
         if (!is_object($term)) {
             $term = new WP_Error('invalid_term', __('Empty Term'));
         }
         if (empty($term) || is_wp_error($term)) {
             return $term;
         }
         // get the term language
         if ($this->plugin === 'Polylang') {
             $lang = $this->get_term_language($term->term_id);
         } else {
             $lang = $this->get_term_language($term->term_taxonomy_id);
         }
         // check if the language is handle
         if (isset($this->taxonomies[$taxonomy]->translated_slugs[$lang])) {
             $taxonomy = $term->taxonomy;
             $slug = $term->slug;
             $t = get_taxonomy($taxonomy);
             if (empty($termlink)) {
                 if ($taxonomy == 'category') {
                     $termlink = '?cat=' . $term->term_id;
                 } elseif ($t->query_var) {
                     $termlink = "?{$t->query_var}={$slug}";
                 } else {
                     $termlink = "?taxonomy={$taxonomy}&term={$slug}";
                 }
                 $termlink = esc_url(icl_get_home_url() . $termlink);
             } else {
                 // @TODO: replace default home url with current lang home url?
                 if ($this->plugin === 'Polylang') {
                     // $termlink = str_replace( untrailingslashit( home_url() ), untrailingslashit( pll_home_url() ), $termlink );
                 }
                 $termlink = esc_url(str_replace($t->rewrite['slug'], $this->taxonomies[$taxonomy]->translated_slugs[$lang], $termlink));
             }
             // backward compatibility filters
             if ($taxonomy == 'post_tag') {
                 $termlink = apply_filters('tag_link', $termlink, $term->term_id);
             } elseif ($taxonomy == 'category') {
                 $termlink = apply_filters('category_link', $termlink, $term->term_id);
             }
         }
     }
     return apply_filters('wpml_translated_term_link', $termlink);
 }
开发者ID:patlegris,项目名称:On-Off,代码行数:57,代码来源:translate-rewrite-slugs.php


示例15: get_base_url

 function get_base_url()
 {
     if (function_exists('icl_get_home_url')) {
         return icl_get_home_url();
     }
     return get_home_url();
 }
开发者ID:taeche,项目名称:SoDoEx,代码行数:7,代码来源:less.legacy.php


示例16: init

 function init($blog_id = 0)
 {
     global $knewsOptions, $wpdb;
     if ($blog_id != 0 && $this->im_networked()) {
         switch_to_blog($blog_id);
     }
     if (!$this->basic_initialized) {
         $this->basic_init($blog_id);
     }
     global $KnewsAdminOptions;
     define('KNEWS_MULTILANGUAGE', $this->check_multilanguage_plugin($KnewsAdminOptions['multilanguage_knews']));
     $this->creaSiNoExisteixDB();
     $this->knewsLangs = $this->getLangs();
     //LOCALIZED URLS (WPML different domains for language option)
     $knews_localized_url = KNEWS_URL;
     $knews_localized_admin = get_admin_url();
     if (KNEWS_MULTILANGUAGE && $knewsOptions['multilanguage_knews'] == 'wpml') {
         if (function_exists('icl_get_languages')) {
             global $sitepress_settings;
             if (isset($sitepress_settings['language_negotiation_type']) && $sitepress_settings['language_negotiation_type'] == 2) {
                 //$l = $this->pageLang();
                 //$knews_localized_url = $l['url'];
                 $knews_localized_url = icl_get_home_url();
                 if (substr($knews_localized_url, -1) != '/') {
                     $knews_localized_url .= '/';
                 }
                 $knews_localized_admin = $knews_localized_url . 'wp-admin/';
                 $knews_localized_url .= KNEWS_WP_CONTENT . '/plugins/knews';
             }
         }
     }
     define('KNEWS_LOCALIZED_URL', $knews_localized_url);
     define('KNEWS_LOCALIZED_ADMIN', $knews_localized_admin);
     $this->initialized = true;
 }
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:35,代码来源:knews.php


示例17: get_terms

    echo $term->description;
    ?>
            </p>
        </div>-->




	<header class="archive-header">
		<?php 
    $categories = get_terms('annee_agenda', array('orderby' => 'count', 'hide_empty' => true));
    echo "<ul class='flat'>";
    foreach ($categories as $term) {
        //echo icl_object_id($term->term_id,'annee_agenda',true, ICL_LANGUAGE_CODE).' ';
        //if($term->term_id == icl_object_id($term->term_id,'annee_agenda',false)){
        echo "<li class='clr-bc'><a href='" . icl_get_home_url() . "annee_agenda/" . $term->slug . "'>" . $term->name . "</a></li>";
        //echo '<li><a href="'.$category_url.'?annee_agenda='. $term->slug.'">' . $term->name . '</a></li>';
        //}
    }
    echo "</ul>";
    $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
    ?>
        <!--<h1><?php 
    echo $term->name;
    ?>
</h1>-->
        <!--<div class="intro2">
            <p>
            <?php 
    echo $term->description;
    ?>
开发者ID:besimhu,项目名称:LDF-site,代码行数:31,代码来源:archive-agenda.php


示例18: icl_get_home_url

		<div class="l-subheader at_bottom">
			<div class="l-subheader-h i-widgets i-cf">

				<div class="w-logo <?php 
if (@$smof_data['logo_as_text'] == 1) {
    echo ' with_title';
}
if (!empty($smof_data['custom_logo_transparent'])) {
    echo ' with_transparent';
}
?>
">
					<a class="w-logo-link" id="main-logo" href="<?php 
if (function_exists('icl_get_home_url')) {
    echo icl_get_home_url();
} else {
    echo esc_url(home_url('/'));
}
?>
"></a>
				</div>

				<div id="header-rightCol">
					<?php 
wp_nav_menu(array('theme_location' => 'header-menu', 'container_class' => 'header-menu', 'fallback_cb' => ''));
?>

					<?php 
get_search_form();
?>
开发者ID:solsticehc,项目名称:IRX,代码行数:30,代码来源:header.php


示例19: clean_wpml_home_url

 public static function clean_wpml_home_url()
 {
     $home_url = rtrim(icl_get_home_url(), '/');
     $search_string = '/' . ICL_LANGUAGE_CODE;
     $home_url = str_replace($search_string, '', $home_url);
     // gets rid of the language code at the end of the url generated by wpml
     $search_string = '?lang=' . ICL_LANGUAGE_CODE;
     $home_url = str_replace($search_string, '', $home_url);
     // in case it was the other option of wpml, gets rid of the language code at the end of the url generated by wpml
     return $home_url;
 }
开发者ID:sdathletics,项目名称:zmc,代码行数:11,代码来源:WPSupersized.php


示例20: _purge_homepage

 private function _purge_homepage()
 {
     //  WPML installetd?
     if (function_exists('icl_get_home_url')) {
         $homepage_url = trailingslashit(icl_get_home_url());
         $this->log(sprintf(__("Purging homepage (WPML) '%s'", "nginx-helper"), $homepage_url));
     } else {
         $homepage_url = trailingslashit(home_url());
         $this->log(sprintf(__("Purging homepage '%s'", "nginx-helper"), $homepage_url));
     }
     $this->purgeUrl($homepage_url);
     return true;
 }
开发者ID:kanei,项目名称:vantuch.cz,代码行数:13,代码来源:purger.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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