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

PHP hybrid_get_parent_textdomain函数代码示例

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

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



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


示例16: oxygen_theme_meta_box

function oxygen_theme_meta_box()
{
    ?>

	<table class="form-table">
	    
		<!-- Favicon upload -->
		<tr class="favicon_url">
			<th>
				<label for="<?php 
    echo hybrid_settings_field_id('oxygen_favicon_url');
    ?>
"><?php 
    _e('Favicon:', hybrid_get_parent_textdomain());
    ?>
</label>
			</th>
			<td>
				<input type="text" id="<?php 
    echo hybrid_settings_field_id('oxygen_favicon_url');
    ?>
" name="<?php 
    echo hybrid_settings_field_name('oxygen_favicon_url');
    ?>
" value="<?php 
    echo esc_attr(hybrid_get_setting('oxygen_favicon_url'));
    ?>
" />
				<input id="oxygen_favicon_upload_button" class="button" type="button" value="Upload" />
				<br />
				<span class="description"><?php 
    _e('Upload favicon image (recommended max size: 32x32).', hybrid_get_parent_textdomain());
    ?>
</span>
				
				<?php 
    /* Display uploaded image */
    if (hybrid_get_setting('oxygen_favicon_url')) {
        ?>
                    <p><img src="<?php 
        echo hybrid_get_setting('oxygen_favicon_url');
        ?>
" alt=""/></p>
				<?php 
    }
    ?>
			</td>
		</tr>
		
		<!-- Logo upload -->
		<tr class="logo_url">
			<th>
				<label for="<?php 
    echo hybrid_settings_field_id('oxygen_logo_url');
    ?>
"><?php 
    _e('Logo:', hybrid_get_parent_textdomain());
    ?>
</label>
			</th>
			<td>
				<input type="text" id="<?php 
    echo hybrid_settings_field_id('oxygen_logo_url');
    ?>
" name="<?php 
    echo hybrid_settings_field_name('oxygen_logo_url');
    ?>
" value="<?php 
    echo esc_attr(hybrid_get_setting('oxygen_logo_url'));
    ?>
" />
				<input id="oxygen_logo_upload_button" class="button" type="button" value="Upload" />
				<br />
				<span class="description"><?php 
    _e('Upload logo image.', hybrid_get_parent_textdomain());
    ?>
</span>
				
				<?php 
    /* Display uploaded image */
    if (hybrid_get_setting('oxygen_logo_url')) {
        ?>
                    <p><img src="<?php 
        echo hybrid_get_setting('oxygen_logo_url');
        ?>
" alt=""/></p>
				<?php 
    }
    ?>
			</td>
		</tr>		
		
		<!-- Title font family -->
		<tr>
			<th>
				<label for="<?php 
    echo hybrid_settings_field_id('oxygen_font_family');
    ?>
"><?php 
    _e('Title font family:', hybrid_get_parent_textdomain());
//.........这里部分代码省略.........
开发者ID:nukulb,项目名称:bugsbounty-blog,代码行数:101,代码来源:functions-admin.php


示例17: the_ID

        ?>
		
							<div id="post-<?php 
        the_ID();
        ?>
" class="<?php 
        hybrid_entry_class();
        ?>
">
										
								<?php 
        echo apply_atomic_shortcode('entry_title', '[entry-title]');
        ?>
									
								<?php 
        echo apply_atomic_shortcode('byline', '<div class="byline">' . __('[entry-published] / by [entry-author] / in [entry-terms taxonomy="category"] [entry-edit-link before=" / "]', hybrid_get_parent_textdomain()) . '</div>');
        ?>
	
							</div><!-- .hentry -->
		
						<?php 
    }
    ?>
			
		
					<?php 
} else {
    ?>
		
						<?php 
    get_template_part('loop-error');
开发者ID:nukulb,项目名称:bugsbounty-blog,代码行数:31,代码来源:page-template-front.php


示例18: do_atomic

		<?php do_atomic( 'before_comment' ); // {theme-name}_before_comment ?>
		
		<div class="author-avatar vcard">
			<?php echo get_avatar($comment,$size='48' ); ?>
		</div>
		
		<div class="comment-author">
			<?php printf( __('<h4 class="fn">%s</h4>'), get_comment_author_link() ); ?>
		</div>
		
		<div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?></a> <a class="comment-link" href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('Link to this comment')) ?></a><?php edit_comment_link(__('(Edit)'),'  ','') ?></div>

		
		<div class="comment-text">
			<?php if ( '0' == $comment->comment_approved ) : ?>
				<p class="alert moderation"><?php _e( 'Your comment is awaiting moderation.', hybrid_get_parent_textdomain() ); ?></p>
			<?php endif; ?>

			<?php comment_text( $comment->comment_ID ); ?>
			
			<div class="reply">
				<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
			</div>
		</div><!-- .comment-text -->


		<?php do_atomic( 'after_comment' ); // {theme-name}_after_comment ?>

	<?php /* No closing </li> is needed.  WordPress will know where to add it. */ ?>
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:29,代码来源:comment.php


示例19: breadcrumb_trail_get_bbpress_items

/**
 * Gets the items for the breadcrumb trail if bbPress is installed.
 *
 * @since 0.5.0
 * @access private
 * @param array $args Mixed arguments for the menu.
 * @return array List of items to be shown in the trail.
 */
function breadcrumb_trail_get_bbpress_items($args = array())
{
    /* Set up a new trail items array. */
    $trail = array();
    /* Get the forum post type object. */
    $post_type_object = get_post_type_object(bbp_get_forum_post_type());
    /* If not viewing the forum root/archive page and a forum archive exists, add it. */
    if (!empty($post_type_object->has_archive) && !bbp_is_forum_archive()) {
        $trail[] = '<a href="' . get_post_type_archive_link(bbp_get_forum_post_type()) . '">' . bbp_get_forum_archive_title() . '</a>';
    }
    /* If viewing the forum root/archive. */
    if (bbp_is_forum_archive()) {
        $trail[] = bbp_get_forum_archive_title();
    } elseif (bbp_is_topic_archive()) {
        $trail[] = bbp_get_topic_archive_title();
    } elseif (bbp_is_topic_tag()) {
        $trail[] = bbp_get_topic_tag_name();
    } elseif (bbp_is_topic_tag_edit()) {
        $trail[] = '<a href="' . bbp_get_topic_tag_link() . '">' . bbp_get_topic_tag_name() . '</a>';
        $trail[] = __('Edit', 'breadcrumb-trail');
    } elseif (bbp_is_single_view()) {
        $trail[] = bbp_get_view_title();
    } elseif (bbp_is_single_topic()) {
        /* Get the queried topic. */
        $topic_id = get_queried_object_id();
        /* Get the parent items for the topic, which would be its forum (and possibly forum grandparents). */
        $trail = array_merge($trail, breadcrumb_trail_get_parents(bbp_get_topic_forum_id($topic_id)));
        /* If viewing a split, merge, or edit topic page, show the link back to the topic.  Else, display topic title. */
        if (bbp_is_topic_split() || bbp_is_topic_merge() || bbp_is_topic_edit()) {
            $trail[] = '<a href="' . bbp_get_topic_permalink($topic_id) . '">' . bbp_get_topic_title($topic_id) . '</a>';
        } else {
            $trail[] = bbp_get_topic_title($topic_id);
        }
        /* If viewing a topic split page. */
        if (bbp_is_topic_split()) {
            $trail[] = __('Split', 'breadcrumb-trail');
        } elseif (bbp_is_topic_merge()) {
            $trail[] = __('Merge', 'breadcrumb-trail');
        } elseif (bbp_is_topic_edit()) {
            $trail[] = __('Edit', 'breadcrumb-trail');
        }
    } elseif (bbp_is_single_reply()) {
        /* Get the queried reply object ID. */
        $reply_id = get_queried_object_id();
        /* Get the parent items for the reply, which should be its topic. */
        $trail = array_merge($trail, breadcrumb_trail_get_parents(bbp_get_reply_topic_id($reply_id)));
        /* If viewing a reply edit page, link back to the reply. Else, display the reply title. */
        if (bbp_is_reply_edit()) {
            $trail[] = '<a href="' . bbp_get_reply_url($reply_id) . '">' . bbp_get_reply_title($reply_id) . '</a>';
            $trail[] = __('Edit', 'breadcrumb-trail');
        } else {
            $trail[] = bbp_get_reply_title($reply_id);
        }
    } elseif (bbp_is_single_forum()) {
        /* Get the queried forum ID and its parent forum ID. */
        $forum_id = get_queried_object_id();
        $forum_parent_id = bbp_get_forum_parent($forum_id);
        /* If the forum has a parent forum, get its parent(s). */
        if (0 !== $forum_parent_id) {
            $trail = array_merge($trail, breadcrumb_trail_get_parents($forum_parent_id));
        }
        /* Add the forum title to the end of the trail. */
        $trail[] = bbp_get_forum_title($forum_id);
    } elseif (bbp_is_single_user() || bbp_is_single_user_edit()) {
        if (bbp_is_single_user_edit()) {
            $trail[] = '<a href="' . bbp_get_user_profile_url() . '">' . bbp_get_displayed_user_field('display_name') . '</a>';
            $trail[] = __('Edit', hybrid_get_parent_textdomain());
        } else {
            $trail[] = bbp_get_displayed_user_field('display_name');
        }
    }
    /* Return the bbPress breadcrumb trail items. */
    return apply_filters('breadcrumb_trail_get_bbpress_items', $trail, $args);
}
开发者ID:nukulb,项目名称:bugsbounty-blog,代码行数:82,代码来源:breadcrumb-trail.php


示例20: 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
  * @access public
  * @return void
  */
 function i18n()
 {
     global $hybrid;
     /* Get parent and child theme textdomains. */
     $parent_textdomain = hybrid_get_parent_textdomain();
     $child_textdomain = hybrid_get_child_textdomain();
     /* 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;
     /* Load the framework textdomain. */
     $hybrid->textdomain_loaded['hybrid-core'] = hybrid_load_framework_textdomain('hybrid-core');
     /* Load empty textdomain mofiles for extensions (these will be overwritten). */
     if (current_theme_supports('breadcrumb-trail')) {
         load_textdomain('breadcrumb-trail', '');
     }
     if (current_theme_supports('post-stylesheets')) {
         load_textdomain('post-stylesheets', '');
     }
     if (current_theme_supports('theme-layouts')) {
         load_textdomain('theme-layouts', '');
     }
     /* 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:Harreh,项目名称:magicowl,代码行数:42,代码来源:hybrid.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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