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

PHP get_theme_feature_list函数代码示例

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

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



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

示例1: translate_header

 /**
  * Translate a theme header.
  *
  * @access private
  * @since 3.4.0
  *
  * @param string $header Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status.
  * @param string $value Value to translate.
  * @return string Translated value.
  */
 private function translate_header($header, $value)
 {
     switch ($header) {
         case 'Name':
             // Cached for sorting reasons.
             if (isset($this->name_translated)) {
                 return $this->name_translated;
             }
             $this->name_translated = translate($value, $this->get('TextDomain'));
             return $this->name_translated;
         case 'Tags':
             if (empty($value)) {
                 return $value;
             }
             static $tags_list;
             if (!isset($tags_list)) {
                 $tags_list = array();
                 $feature_list = get_theme_feature_list(false);
                 // No API
                 foreach ($feature_list as $tags) {
                     $tags_list += $tags;
                 }
             }
             foreach ($value as &$tag) {
                 if (isset($tags_list[$tag])) {
                     $tag = $tags_list[$tag];
                 }
             }
             return $value;
             break;
         default:
             $value = translate($value, $this->get('TextDomain'));
     }
     return $value;
 }
开发者ID:netconstructor,项目名称:WordPress-1,代码行数:45,代码来源:class-wp-theme.php


示例2: _e

	<a id="filter-click" href="?filter=1"><?php 
    _e('Feature Filter');
    ?>
</a>
</p>

<br class="clear"/>

<div id="filter-box" style="<?php 
    if (empty($_REQUEST['filter'])) {
        echo 'display: none;';
    }
    ?>
">
<?php 
    $feature_list = get_theme_feature_list();
    ?>
	<div class="feature-filter">
		<p class="install-help"><?php 
    _e('Theme filters');
    ?>
</p>
	<?php 
    if (!empty($_REQUEST['filter'])) {
        ?>
		<input type="hidden" name="filter" value="1" />
	<?php 
    }
    ?>
	<?php 
    foreach ($feature_list as $feature_name => $features) {
开发者ID:nuevomediagroup,项目名称:WordPress,代码行数:31,代码来源:themes.php


示例3: install_themes_dashboard

/**
 * Display tags filter for themes.
 *
 * @since 2.8.0
 */
function install_themes_dashboard()
{
    install_theme_search_form();
    ?>
<h4><?php 
    _e('Feature Filter');
    ?>
</h4>
<form method="post" action="<?php 
    echo self_admin_url('theme-install.php?tab=search');
    ?>
">
<p class="install-help"><?php 
    _e('Find a theme based on specific features');
    ?>
</p>
	<?php 
    $feature_list = get_theme_feature_list();
    echo '<div class="feature-filter">';
    foreach ((array) $feature_list as $feature_name => $features) {
        $feature_name = esc_html($feature_name);
        echo '<div class="feature-name">' . $feature_name . '</div>';
        echo '<ol class="feature-group">';
        foreach ($features as $feature => $feature_name) {
            $feature_name = esc_html($feature_name);
            $feature = esc_attr($feature);
            ?>

<li>
	<input type="checkbox" name="features[<?php 
            echo $feature;
            ?>
]" id="feature-id-<?php 
            echo $feature;
            ?>
" value="<?php 
            echo $feature;
            ?>
" />
	<label for="feature-id-<?php 
            echo $feature;
            ?>
"><?php 
            echo $feature_name;
            ?>
</label>
</li>

<?php 
        }
        ?>
</ol>
<br class="clear" />
<?php 
    }
    ?>

</div>
<br class="clear" />
<?php 
    submit_button(__('Find Themes'), 'button', 'search');
    ?>
</form>
<?php 
}
开发者ID:vivekkodira1,项目名称:wordpress,代码行数:70,代码来源:theme-install.php


示例4: renderThemesTable

    public static function renderThemesTable($favoritesCallback = '')
    {
        if (!mainwp_current_user_can("dashboard", "install_themes")) {
            mainwp_do_not_have_permissions(__('install themes', 'mainwp'));
            return;
        }
        ?>
		<a href="#" class="mainwp_action left mainwp_action_down browse-themes" ><?php 
        _e('Search', 'mainwp');
        ?>
</a><a href="#" class="mainwp_action right upload" ><?php 
        _e('Upload', 'mainwp');
        ?>
</a>
		<br class="clear" /><br />

		<div class="mainwp_config_box_left" style="width: calc(100% - 290px);">
			<div class="error below-h2" style="display: none;" id="ajax-error-zone"></div>
			<div class="upload-theme">
				<?php 
        MainWP_Install_Bulk::renderUpload('Themes');
        ?>
			</div>
			<div class="wp-filter">
				<h3 class="mainwp_box_title"><?php 
        _e('Step 1: Select a Theme', 'mainwp');
        ?>
</h3>
				<div class="filter-count">
					<span class="count theme-count"></span>
				</div>

				<ul class="filter-links">
					<li><a href="#" data-sort="featured"><?php 
        _ex('Featured', 'themes');
        ?>
</a></li>
					<li><a href="#" data-sort="popular"><?php 
        _ex('Popular', 'themes');
        ?>
</a></li>
					<li><a href="#" data-sort="new"><?php 
        _ex('Latest', 'themes');
        ?>
</a></li>
				</ul>
				<a class="drawer-toggle" href="#"><?php 
        _e('Feature Filter', 'mainwp');
        ?>
</a>

				<div class="search-form"></div>
				<div class="filter-drawer">
					<div class="buttons">
						<a class="apply-filters button button-secondary" href="#"><?php 
        _e('Apply Filters', 'mainwp');
        ?>
<span></span></a>
						<a class="clear-filters button button-secondary" href="#"><?php 
        _e('Clear', 'mainwp');
        ?>
</a>
					</div>
					<?php 
        $feature_list = get_theme_feature_list();
        foreach ($feature_list as $feature_name => $features) {
            echo '<div class="filter-group">';
            $feature_name = esc_html($feature_name);
            echo '<h4>' . $feature_name . '</h4>';
            echo '<ol class="feature-group">';
            foreach ($features as $feature => $feature_name) {
                $feature = esc_attr($feature);
                echo '<li><input type="checkbox" id="filter-id-' . $feature . '" value="' . $feature . '" /> ';
                echo '<label for="filter-id-' . $feature . '">' . $feature_name . '</label></li>';
            }
            echo '</ol>';
            echo '</div>';
        }
        ?>
					<div class="filtered-by">
						<span><?php 
        _e('Filtering by:', 'mainwp');
        ?>
</span>
						<div class="tags"></div>
						<a href="#"><?php 
        _e('Edit', 'mainwp');
        ?>
</a>
					</div>
				</div>
			</div>
			<div class="theme-browser content-filterable hide-if-upload"></div>
			<div class="theme-install-overlay wp-full-overlay expanded"></div>

			<p class="no-themes"><?php 
        _e('No themes found. Try a different search.');
        ?>
</p>
			<span class="spinner"></span>
//.........这里部分代码省略.........
开发者ID:jexmex,项目名称:mainwp,代码行数:101,代码来源:page-mainwp-themes.php


示例5: _e

<form class="search-form filter-form" action="" method="get">

<h3 class="available-themes"><?php _e('Available Themes'); ?></h3>

<?php if ( !empty( $_REQUEST['s'] ) || !empty( $_REQUEST['features'] ) || $wp_list_table->has_items() ) : ?>

<p class="search-box">
	<label class="screen-reader-text" for="theme-search-input"><?php _e('Search Installed Themes'); ?>:</label>
	<input type="search" id="theme-search-input" name="s" value="<?php _admin_search_query(); ?>" />
	<?php submit_button( __( 'Search Installed Themes' ), 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
	<a id="filter-click" href="?filter=1"><?php _e( 'Feature Filter' ); ?></a>
</p>

<div id="filter-box" style="<?php if ( empty($_REQUEST['filter']) ) echo 'display: none;'; ?>">
<?php $feature_list = get_theme_feature_list(); ?>
	<div class="feature-filter">
		<p class="install-help"><?php _e('Theme filters') ?></p>
	<?php if ( !empty( $_REQUEST['filter'] ) ) : ?>
		<input type="hidden" name="filter" value="1" />
	<?php endif; ?>
	<?php foreach ( $feature_list as $feature_name => $features ) :
			$feature_name = esc_html( $feature_name ); ?>

		<div class="feature-container">
			<div class="feature-name"><?php echo $feature_name ?></div>

			<ol class="feature-group">
				<?php foreach ( $features as $key => $feature ) :
						$feature_name = $feature;
						$feature_name = esc_html( $feature_name );
开发者ID:pauEscarcia,项目名称:AIMM,代码行数:30,代码来源:THEMES.PHP


示例6: translate_header

 /**
  * Translate a theme header.
  *
  * @since 3.4.0
  * @access private
  *
  * @staticvar array $tags_list
  *
  * @param string $header Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags.
  * @param string $value Value to translate.
  * @return string Translated value.
  */
 private function translate_header($header, $value)
 {
     switch ($header) {
         case 'Name':
             // Cached for sorting reasons.
             if (isset($this->name_translated)) {
                 return $this->name_translated;
             }
             $this->name_translated = translate($value, $this->get('TextDomain'));
             return $this->name_translated;
         case 'Tags':
             if (empty($value) || !function_exists('get_theme_feature_list')) {
                 return $value;
             }
             static $tags_list;
             if (!isset($tags_list)) {
                 $tags_list = array('black' => __('Black'), 'blue' => __('Blue'), 'brown' => __('Brown'), 'gray' => __('Gray'), 'green' => __('Green'), 'orange' => __('Orange'), 'pink' => __('Pink'), 'purple' => __('Purple'), 'red' => __('Red'), 'silver' => __('Silver'), 'tan' => __('Tan'), 'white' => __('White'), 'yellow' => __('Yellow'), 'dark' => __('Dark'), 'light' => __('Light'), 'fixed-layout' => __('Fixed Layout'), 'fluid-layout' => __('Fluid Layout'), 'responsive-layout' => __('Responsive Layout'), 'blavatar' => __('Blavatar'), 'photoblogging' => __('Photoblogging'), 'seasonal' => __('Seasonal'));
                 $feature_list = get_theme_feature_list(false);
                 // No API
                 foreach ($feature_list as $tags) {
                     $tags_list += $tags;
                 }
             }
             foreach ($value as &$tag) {
                 if (isset($tags_list[$tag])) {
                     $tag = $tags_list[$tag];
                 } elseif (isset(self::$tag_map[$tag])) {
                     $tag = $tags_list[self::$tag_map[$tag]];
                 }
             }
             return $value;
         default:
             $value = translate($value, $this->get('TextDomain'));
     }
     return $value;
 }
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:48,代码来源:class-wp-theme.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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