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


PHP install_theme_search_form函数代码示例

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


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

示例1: 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

示例2: install_themes_dashboard

function install_themes_dashboard()
{
    ?>
<p><?php 
    _e('Search for themes by keyword, author, or tag.');
    ?>
</p>

	<?php 
    install_theme_search_form('<a href="' . add_query_arg('show-help', !isset($_REQUEST['show-help'])) . '" onclick="jQuery(\'#search-help\').toggle(); return false;">' . __('[need help?]') . '</a>');
    ?>
<div id="search-help" style="display: <?php 
    echo isset($_REQUEST['show-help']) ? 'block' : 'none';
    ?>
;">
<p><?php 
    _e('You may search based on 3 criteria:');
    ?>
<br />
	<?php 
    _e('<strong>Term:</strong> Searches theme names and descriptions for the specified term');
    ?>
<br />
	<?php 
    _e('<strong>Tag:</strong> Searches for themes tagged as such');
    ?>
<br />
	<?php 
    _e('<strong>Author:</strong> Searches for themes created by the Author, or which the Author contributed to.');
    ?>
</p>
</div>

<h4><?php 
    _e('Advanced Search');
    ?>
</h4>
<p><?php 
    _e('Tag filter goes here');
    ?>
</p>

<h4><?php 
    _e('Popular tags');
    ?>
</h4>
<p><?php 
    _e('You may also browse based on the most popular tags in the Theme Directory:');
    ?>
</p>
	<?php 
    $api_tags = install_themes_popular_tags();
    //Set up the tags in a way which can be interprated by wp_generate_tag_cloud()
    $tags = array();
    foreach ((array) $api_tags as $tag) {
        $tags[$tag['name']] = (object) array('link' => clean_url(admin_url('theme-install.php?tab=search&type=tag&s=' . urlencode($tag['name']))), 'name' => $tag['name'], 'id' => sanitize_title_with_dashes($tag['name']), 'count' => $tag['count']);
    }
    echo '<p>';
    echo wp_generate_tag_cloud($tags, array('single_text' => __('%d theme'), 'multiple_text' => __('%d themes')));
    echo '</p><br class="clear" />';
}
开发者ID:schr,项目名称:wordpress,代码行数:61,代码来源:theme-install.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 admin_url('theme-install.php?tab=search');
    ?>
">
<p class="install-help"><?php 
    _e('Find a theme based on specific features');
    ?>
</p>
	<?php 
    $feature_list = install_themes_feature_list();
    echo '<div class="feature-filter">';
    $trans = array('Colors' => __('Colors'), 'black' => __('Black'), 'blue' => __('Blue'), 'brown' => __('Brown'), 'green' => __('Green'), 'orange' => __('Orange'), 'pink' => __('Pink'), 'purple' => __('Purple'), 'red' => __('Red'), 'silver' => __('Silver'), 'tan' => __('Tan'), 'white' => __('White'), 'yellow' => __('Yellow'), 'dark' => __('Dark'), 'light' => __('Light'), 'Columns' => __('Columns'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar'), 'Width' => __('Width'), 'fixed-width' => __('Fixed Width'), 'flexible-width' => __('Flexible Width'), 'Features' => __('Features'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'theme-options' => __('Theme Options'), 'threaded-comments' => __('Threaded Comments'), 'sticky-post' => __('Sticky Post'), 'microformats' => __('Microformats'), 'Subject' => __('Subject'), 'holiday' => __('Holiday'), 'photoblogging' => __('Photoblogging'), 'seasonal' => __('Seasonal'));
    foreach ((array) $feature_list as $feature_name => $features) {
        if (isset($trans[$feature_name])) {
            $feature_name = $trans[$feature_name];
        }
        $feature_name = esc_html($feature_name);
        echo '<div class="feature-name">' . $feature_name . '</div>';
        echo '<ol style="float: left; width: 725px;" class="feature-group">';
        foreach ($features as $feature) {
            $feature_name = $feature;
            if (isset($trans[$feature])) {
                $feature_name = $trans[$feature];
            }
            $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" />
<p><input type="submit" name="search" value="<?php 
    esc_attr_e('Find Themes');
    ?>
" class="button" /></p>
</form>
<?php 
}
开发者ID:gigikiri,项目名称:bcnAutoWallpaperSite,代码行数:79,代码来源:theme-install.php


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