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


PHP hybrid_get_parent_textdomain函数代码示例

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


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

示例1: M21_Single_Ad_Widget

	/**
	 * Set up the widget's unique name, ID, class, description, and other options.
	 * @since 0.1
	 */
	function M21_Single_Ad_Widget(){
	
		/* Check if Hybrid-core framework is active */
		if( class_exists( 'Hybrid' ) ){
			/* Set the widget prefix */
			$this->prefix = hybrid_get_prefix();
			
			/* Set the widget textdomain. */
			$this->textdomain = hybrid_get_parent_textdomain();
		} else {
			$this->prefix = 'mobility21';
			$this->textdomain = 'mobility21';
		}
		
		$widget_options = array(
						'classname' => 'm21-single-ad',
						'description' => esc_html__( 'Place a Mobility21 Partner ad.', $this->textdomain ) 
					);
		
		$control_options = array(
						'height' => '300',
						'width' => '525',
						'id_base' => "{$this->prefix}-m21-single-ad", esc_attr__( 'M21 Single Ad', $this->textdomain )
					);
		
		$this->WP_Widget( "{$this->prefix}-m21-single-ad", esc_attr__( 'Mobility Single Ad Widget', $this->textdomain ), $widget_options, $control_options );
	}
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:31,代码来源:widget-m21-single-ad.php

示例2: Squar_Banner_Item_Widget

	/**
	 * Set up the widget's unique name, ID, class, description, and other options.
	 * @since 0.1
	 */
	function Squar_Banner_Item_Widget(){
	
		/* Check if Hybrid-core framework is active */
		if( class_exists( 'Hybrid' ) ){
			/* Set the widget prefix */
			$this->prefix = hybrid_get_prefix();
			
			/* Set the widget textdomain. */
			$this->textdomain = hybrid_get_parent_textdomain();
		} else {
			$this->prefix = 'squar';
			$this->textdomain = 'squar';
		}

		/* Setup URL to Tim Thumb Script*/
		$this->timthumb = SQUAR_SCRIPTS_URI . '/thumb.php';
		
		$widget_options = array(
						'classname' => 'banner-item',
						'description' => esc_html__( 'Adds a banner item to frontpage slider or into the inside page banner area.', $this->textdomain ) 
					);
		
		$control_options = array(
						'height' => '300',
						'width' => '700',
						'id_base' => "{$this->prefix}-banner-item", esc_attr__( 'A Banner Item', $this->textdomain )
					);
		
		$this->WP_Widget( "{$this->prefix}-banner-item", esc_attr__( 'A Banner Item', $this->textdomain ), $widget_options, $control_options );
	}
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:34,代码来源:widget-banner-item.php

示例3: Squar_Feature_Box_Widget

	/**
	 * Set up the widget's unique name, ID, class, description, and other options.
	 * @since 0.1
	 */
	function Squar_Feature_Box_Widget(){
	
		/* Setup URL to Tim Thumb Script*/
		$this->timthumburl = SQUAR_SCRIPTS_URI . '/thumb.php';
	
		/* Check if Hybrid-core framework is active */
		if( class_exists( 'Hybrid' ) ){
			/* Set the widget prefix */
			$this->prefix = hybrid_get_prefix();
			
			/* Set the widget textdomain. */
			$this->textdomain = hybrid_get_parent_textdomain();
		} else {
			$this->prefix = 'squar';
			$this->textdomain = 'squar';
		}
		
		$widget_options = array(
						'classname' => 'feature-box',
						'description' => esc_html__( 'Displays a feature box with an image which can link to a URL when clicked.', $this->textdomain )
					);
		
		$control_options = array(
						'height' => '300',
						'width' => '525',
						'id_base' => "{$this->prefix}-feature-box", esc_attr__( 'Feature Box', $this->textdomain )
					);
		
		$this->WP_Widget( "{$this->prefix}-feature-box", esc_attr__( 'A Feature Box', $this->textdomain ), $widget_options, $control_options );
	}
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:34,代码来源:widget-featurebox.php

示例4: Image_Button_Widget

	/**
	 * Set up the widget's unique name, ID, class, description, and other options.
	 * @since 0.1
	 */
	function Image_Button_Widget(){
	
		/* Check if Hybrid-core framework is active */
		if( class_exists( 'Hybrid' ) ){
			/* Set the widget prefix */
			$this->prefix = hybrid_get_prefix();
			
			/* Set the widget textdomain. */
			$this->textdomain = hybrid_get_parent_textdomain();
		} else {
			$this->prefix = 'mobility21';
			$this->textdomain = 'mobility21';
		}
		
		$widget_options = array(
						'classname' => 'image-button',
						'description' => esc_html__( 'Displays an image button and can link to a URL when clicked.', $this->textdomain ) 
					);
		
		$control_options = array(
						'height' => '300',
						'width' => '250',
						'id_base' => "{$this->prefix}-image-button", esc_attr__( 'Image Button', $this->textdomain )
					);
		
		$this->WP_Widget( "{$this->prefix}-image-button", esc_attr__( 'Mobility Image Button', $this->textdomain ), $widget_options, $control_options );
	}
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:31,代码来源:widget-flickr.php

示例5: Pogidude_Event_Widget

	function Pogidude_Event_Widget(){

		/* Check if Hybrid-core framework is active */
		if( class_exists( 'Hybrid' ) ){
			/* Set the widget prefix */
			$this->prefix = hybrid_get_prefix();
			
			/* Set the widget textdomain. */
			$this->textdomain = hybrid_get_parent_textdomain();
		} else {
			$this->prefix = 'pogidude';
			$this->textdomain = 'pogidude';
		}
		
		$this->widget_id = 'event-widget';
		
		$widget_options = array(
						'classname' => "{$this->prefix}-{$this->widget_id}",
						'description' => esc_html__( 'Displays your Events in the sidebar.', $this->textdomain )
					);
		
		$control_options = array(
						'height' => '300',
						'width' => '240',
						'id_base' => "{$this->prefix}-{$this->widget_id}"
					);
		
		$this->WP_Widget( "{$this->prefix}-{$this->widget_id}", esc_attr__( 'TM: Event Widget', $this->textdomain ), $widget_options, $control_options );
		
	}
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:30,代码来源:widget-event.php

示例6: Widget_Social_Connect

	function Widget_Social_Connect(){

		/* Check if Hybrid-core framework is active */
		if( class_exists( 'Hybrid' ) ){
			/* Set the widget prefix */
			$this->prefix = hybrid_get_prefix();
			
			/* Set the widget textdomain. */
			$this->textdomain = hybrid_get_parent_textdomain();
		} else {
			$this->prefix = 'pogidude';
			$this->textdomain = 'pogidude';
		}
		
		$this->widget_id = 'social-connect';
		
		$widget_options = array(
						'classname' => "{$this->prefix}-{$this->widget_id}",
						'description' => esc_html__( 'Add social icons to your sidebar', $this->textdomain )
					);
		
		$control_options = array(
						'height' => '300',
						'width' => '240',
						'id_base' => "{$this->prefix}-{$this->widget_id}"
					);
		
		$this->WP_Widget( "{$this->prefix}-{$this->widget_id}", esc_attr__( 'Social Connect', $this->textdomain ), $widget_options, $control_options );
		
	}
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:30,代码来源:widget-social-connect.php

示例7: Pogidude_Twitter_Feed_Widget

	function Pogidude_Twitter_Feed_Widget(){

		/* Check if Hybrid-core framework is active */
		if( class_exists( 'Hybrid' ) ){
			/* Set the widget prefix */
			$this->prefix = hybrid_get_prefix();
			
			/* Set the widget textdomain. */
			$this->textdomain = hybrid_get_parent_textdomain();
		} else {
			$this->prefix = 'pogidude';
			$this->textdomain = 'pogidude';
		}
		
		$widget_options = array(
						'classname' => 'pogidude-twitter-feed',
						'description' => esc_html__( 'Add your Twitter feed to your sidebar with this widget.', $this->textdomain )
					);
		
		$control_options = array(
						'height' => '300',
						'width' => '240',
						'id_base' => "{$this->prefix}-twitter-feed"
					);
		
		$this->WP_Widget( "{$this->prefix}-twitter-feed", esc_attr__( 'Twitter Stream', $this->textdomain ), $widget_options, $control_options );
		
	}
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:28,代码来源:widget-pogidude-twitter-feed.php

示例8: Pogidude_Slider_Widget

	/**
	 * Set up the widget's unique name, ID, class, description, and other options.
	 * @since 0.1
	 */
	function Pogidude_Slider_Widget(){
	
		/* Check if Hybrid-core framework is active */
		if( class_exists( 'Hybrid' ) ){
			/* Set the widget prefix */
			$this->prefix = hybrid_get_prefix();
			
			/* Set the widget textdomain. */
			$this->textdomain = hybrid_get_parent_textdomain();
		} else {
			$this->prefix = 'pogidude';
			$this->textdomain = 'pogidude';
		}
		
		//setup widget it
		$this->widget_id = 'slider-item';
		
		//setup path to Tim Thumb script
		$this->timthumbUrl = trailingslashit( THEMELIB_SCRIPTS_URI ) . 'thumb.php';
		
		$widget_options = array(
						'classname' => "{$this->prefix}-{$this->widget_id}",
						'description' => esc_html__( 'Adds a slider item. Use on slider widget area.', $this->textdomain )
					);
		
		$control_options = array(
						'height' => '300',
						'width' => '240',
						'id_base' => "{$this->prefix}-{$this->widget_id}"
					);
		
		$this->WP_Widget( "{$this->prefix}-{$this->widget_id}", esc_attr__( 'TM: Slider Item', $this->textdomain ), $widget_options, $control_options );
	}
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:37,代码来源:widget-slider-item.php

示例9: M21_Banner_Item_Widget

	/**
	 * Set up the widget's unique name, ID, class, description, and other options.
	 * @since 0.1
	 */
	function M21_Banner_Item_Widget(){
	
		/* Check if Hybrid-core framework is active */
		if( class_exists( 'Hybrid' ) ){
			/* Set the widget prefix */
			$this->prefix = hybrid_get_prefix();
			
			/* Set the widget textdomain. */
			$this->textdomain = hybrid_get_parent_textdomain();
		} else {
			$this->prefix = 'mobility21';
			$this->textdomain = 'mobility21';
		}
		
		$widget_options = array(
						'classname' => 'm21-banner-item',
						'description' => esc_html__( 'Adds a banner item to Mobility 21 site frontpage slider or into the inside page banner area.', $this->textdomain ) 
					);
		
		$control_options = array(
						'height' => '300',
						'width' => '700',
						'id_base' => "{$this->prefix}-m21-banner-item", esc_attr__( 'M21 Banner Item', $this->textdomain )
					);
		
		$this->WP_Widget( "{$this->prefix}-m21-banner-item", esc_attr__( 'Mobility Banner Item', $this->textdomain ), $widget_options, $control_options );
	}
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:31,代码来源:widget-m21-banner-item.php

示例10: Widget_Subscribe_Box

	function  Widget_Subscribe_Box(){

		/* Check if Hybrid-core framework is active */
		if( class_exists( 'Hybrid' ) ){
			/* Set the widget prefix */
			$this->prefix = hybrid_get_prefix();
			
			/* Set the widget textdomain. */
			$this->textdomain = hybrid_get_parent_textdomain();
		} else {
			$this->prefix = 'pogidude';
			$this->textdomain = 'pogidude';
		}
		
		$this->widget_id = 'newsletter-subscribe-box';
		
		$widget_options = array(
						'classname' => "{$this->prefix}-{$this->widget_id}",
						'description' => esc_html__( 'Add a newsletter subscribe box to your sidebar. Do not use this widget more than once in the same page.', $this->textdomain )
					);
		
		$control_options = array(
						'height' => '300',
						'width' => '240',
						'id_base' => "{$this->prefix}-{$this->widget_id}"
					);
		
		$this->WP_Widget( "{$this->prefix}-{$this->widget_id}", esc_attr__( 'Newsletter Subscribe', $this->textdomain ), $widget_options, $control_options );
		
	}
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:30,代码来源:widget-subscribe-box.php

示例11: Widget_Class_Name_Widget

	function  Widget_Class_Name_Widget(){

		/* Check if Hybrid-core framework is active */
		if( class_exists( 'Hybrid' ) ){
			/* Set the widget prefix */
			$this->prefix = hybrid_get_prefix();
			
			/* Set the widget textdomain. */
			$this->textdomain = hybrid_get_parent_textdomain();
		} else {
			$this->prefix = 'prefix';
			$this->textdomain = 'prefix';
		}
		
		$this->widget_id = 'widget-id';
		
		$widget_options = array(
						'classname' => "{$this->prefix}-{$this->widget_id}",
						'description' => esc_html__( 'Description of the widget', $this->textdomain )
					);
		
		$control_options = array(
						'height' => '300',
						'width' => '240',
						'id_base' => "{$this->prefix}-{$this->widget_id}"
					);
		
		$this->WP_Widget( "{$this->prefix}-{$this->widget_id}", esc_attr__( 'Widget Name', $this->textdomain ), $widget_options, $control_options );
		
	}
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:30,代码来源:widget-template.php

示例12: printf

if (pings_open() && !comments_open()) {
    ?>

				<p class="comments-closed pings-open">
					<?php 
    printf(__('Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', hybrid_get_parent_textdomain()), get_trackback_url());
    ?>
				</p><!-- .comments-closed .pings-open -->

			<?php 
} elseif (!comments_open()) {
    ?>

				<p class="comments-closed">
					<?php 
    _e('Comments are closed.', hybrid_get_parent_textdomain());
    ?>
				</p><!-- .comments-closed -->

			<?php 
}
?>

		</div><!-- #comments -->

		<?php 
comment_form();
// Loads the comment form.
?>

	</div><!-- .comments-wrap -->
开发者ID:nukulb,项目名称:bugsbounty-blog,代码行数:31,代码来源:comments.php

示例13: elseif

	<?php 
} elseif (is_singular('post')) {
    ?>

		<div class="loop-nav">
			<?php 
    previous_post_link('<div class="previous">' . __('&larr; %link', hybrid_get_parent_textdomain()) . '</div>', '%title');
    ?>
			<?php 
    next_post_link('<div class="next">' . __('%link', hybrid_get_parent_textdomain()) . ' &rarr;</div>', '%title');
    ?>
		</div><!-- .loop-nav -->

	<?php 
} elseif (!is_singular() && current_theme_supports('loop-pagination')) {
    loop_pagination();
    ?>

	<?php 
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('&larr; Previous', hybrid_get_parent_textdomain()) . '</span>', 'nxtlabel' => '<span class="next">' . __('Next &rarr;', hybrid_get_parent_textdomain()) . '</span>')))) {
    ?>

		<div class="loop-nav">
			<?php 
    echo $nav;
    ?>
		</div><!-- .loop-nav -->

	<?php 
}
开发者ID:nukulb,项目名称:bugsbounty-blog,代码行数:30,代码来源:loop-nav.php

示例14: i18n

 /**
  * Loads both the parent and child theme translation files.  If a locale-based functions file exists
  * in either the parent or child theme (child overrides parent), it will also be loaded.  All translation 
  * and locale functions files are expected to be within the theme's '/languages' folder, but the 
  * framework will fall back on the theme root folder if necessary.  Translation files are expected 
  * to be prefixed with the template or stylesheet path (example: 'templatename-en_US.mo').
  *
  * @since 1.2.0
  */
 function i18n()
 {
     global $hybrid;
     /* Get parent and child theme textdomains. */
     $parent_textdomain = hybrid_get_parent_textdomain();
     $child_textdomain = hybrid_get_child_textdomain();
     /* Load the framework textdomain. */
     $hybrid->textdomain_loaded['hybrid-core'] = hybrid_load_framework_textdomain('hybrid-core');
     /* Load theme textdomain. */
     $hybrid->textdomain_loaded[$parent_textdomain] = load_theme_textdomain($parent_textdomain);
     /* Load child theme textdomain. */
     $hybrid->textdomain_loaded[$child_textdomain] = is_child_theme() ? load_child_theme_textdomain($child_textdomain) : false;
     /* Get the user's locale. */
     $locale = get_locale();
     /* Locate a locale-specific functions file. */
     $locale_functions = locate_template(array("languages/{$locale}.php", "{$locale}.php"));
     /* If the locale file exists and is readable, load it. */
     if (!empty($locale_functions) && is_readable($locale_functions)) {
         require_once $locale_functions;
     }
 }
开发者ID:JunnLearning,项目名称:dk,代码行数:30,代码来源:hybrid.php

示例15: hybrid_load_textdomain_mofile

/**
 * Filters the 'load_textdomain_mofile' filter hook so that we can change the directory and file name
 * of the mofile for translations.  This allows child themes to have a folder called /languages with translations
 * of their parent theme so that the translations aren't lost on a parent theme upgrade.
 *
 * @since  1.3.0
 * @access public
 * @param  string $mofile File name of the .mo file.
 * @param  string $domain The textdomain currently being filtered.
 * @return string
 */
function hybrid_load_textdomain_mofile($mofile, $domain)
{
    // If the $domain is for the parent or child theme, search for a $domain-$locale.mo file.
    if ($domain == hybrid_get_parent_textdomain() || $domain == hybrid_get_child_textdomain()) {
        // Get the locale.
        $locale = get_locale();
        // Get just the theme path and file name for the mofile.
        $mofile_short = str_replace("{$locale}.mo", "{$domain}-{$locale}.mo", $mofile);
        $mofile_short = str_replace(array(HYBRID_PARENT, HYBRID_CHILD), '', $mofile_short);
        // Attempt to find the correct mofile.
        $locate_mofile = locate_template(array($mofile_short));
        // Return the mofile.
        return $locate_mofile ? $locate_mofile : $mofile;
    }
    return $mofile;
}
开发者ID:lagrezd,项目名称:dx-coding-standards,代码行数:27,代码来源:functions-i18n.php


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