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


PHP Su_Data::groups方法代码示例

本文整理汇总了PHP中Su_Data::groups方法的典型用法代码示例。如果您正苦于以下问题:PHP Su_Data::groups方法的具体用法?PHP Su_Data::groups怎么用?PHP Su_Data::groups使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Su_Data的用法示例。


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

示例1: popup

    /**
     * Generator popup form
     */
    public static function popup()
    {
        // Get cache
        $output = get_transient('su/generator/popup');
        if ($output && SU_ENABLE_CACHE) {
            echo $output;
        } else {
            ob_start();
            $tools = apply_filters('su/generator/tools', array('<a href="' . admin_url('admin.php?page=shortcodes-ultimate') . '#tab-1" target="_blank" title="' . __('Settings', 'su') . '">' . __('Plugin settings', 'su') . '</a>', '<a href="http://gndev.info/shortcodes-ultimate/" target="_blank" title="' . __('Plugin homepage', 'su') . '">' . __('Plugin homepage', 'su') . '</a>', '<a href="http://wordpress.org/support/plugin/shortcodes-ultimate/" target="_blank" title="' . __('Support forums', 'su') . '">' . __('Support forums', 'su') . '</a>'));
            // Add add-ons links
            if (!defined('SUE_PLUGIN_FILE') || !defined('SUS_PLUGIN_FILE') || !defined('SUM_PLUGIN_FILE')) {
                $tools[] = '<a href="' . admin_url('admin.php?page=shortcodes-ultimate-addons') . '" target="_blank" title="' . __('Add-ons', 'su') . '" class="su-add-ons">' . __('Add-ons', 'su') . '</a>';
            }
            ?>
		<div id="su-generator-wrap" style="display:none">
			<div id="su-generator">
				<div id="su-generator-header">
					<div id="su-generator-tools"><?php 
            echo implode(' <span></span> ', $tools);
            ?>
</div>
					<input type="text" name="su_generator_search" id="su-generator-search" value="" placeholder="<?php 
            _e('Search for shortcodes', 'su');
            ?>
" />
					<div id="su-generator-filter">
						<strong><?php 
            _e('Filter by type', 'su');
            ?>
</strong>
						<?php 
            foreach ((array) Su_Data::groups() as $group => $label) {
                echo '<a href="#" data-filter="' . $group . '">' . $label . '</a>';
            }
            ?>
					</div>
					<div id="su-generator-choices" class="su-generator-clearfix">
						<?php 
            // Choices loop
            foreach ((array) Su_Data::shortcodes() as $name => $shortcode) {
                $icon = isset($shortcode['icon']) ? $shortcode['icon'] : 'puzzle-piece';
                $shortcode['name'] = isset($shortcode['name']) ? $shortcode['name'] : $name;
                echo '<span data-name="' . $shortcode['name'] . '" data-shortcode="' . $name . '" title="' . esc_attr($shortcode['desc']) . '" data-desc="' . esc_attr($shortcode['desc']) . '" data-group="' . $shortcode['group'] . '">' . Su_Tools::icon($icon) . $shortcode['name'] . '</span>' . "\n";
            }
            ?>
					</div>
				</div>
				<div id="su-generator-settings"></div>
				<input type="hidden" name="su-generator-selected" id="su-generator-selected" value="<?php 
            echo plugins_url('', SU_PLUGIN_FILE);
            ?>
" />
				<input type="hidden" name="su-generator-url" id="su-generator-url" value="<?php 
            echo plugins_url('', SU_PLUGIN_FILE);
            ?>
" />
				<input type="hidden" name="su-compatibility-mode-prefix" id="su-compatibility-mode-prefix" value="<?php 
            echo su_compatibility_mode_prefix();
            ?>
" />
				<div id="su-generator-result" style="display:none"></div>
			</div>
		</div>
	<?php 
            $output = ob_get_contents();
            set_transient('su/generator/popup', $output, 2 * DAY_IN_SECONDS);
            ob_end_clean();
            echo $output;
        }
    }
开发者ID:crazyyy,项目名称:octagram,代码行数:73,代码来源:generator.php

示例2: foreach

                <input type="text" name="su_generator_search" id="su-generator-search" value="" placeholder="<?php 
echo JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SEARCH_DESC');
?>
" />
                <span class="su-search-hints"><?php 
echo JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SEARCH_HINTS');
?>
</span>
            </div>
            <div id="su-generator-filter">
                <strong><?php 
echo JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_FILTER_DESC');
?>
</strong>
                <?php 
foreach ((array) Su_Data::groups() as $group => $label) {
    echo '<a href="#" data-filter="' . $group . '">' . $label . '</a>';
}
?>
            </div>
            <div id="su-generator-choices" class="su-generator-clearfix">
                <?php 
// Choices loop
foreach ((array) Su_Data::shortcodes() as $name => $shortcode) {
    $icon = isset($shortcode['icon']) ? $shortcode['icon'] : 'puzzle-piece';
    $badge = isset($shortcode['badge']) ? '<strong class="sug-badge badge-' . strtolower($shortcode['badge']) . '">' . JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODE_' . $shortcode['badge']) . '</strong>' : '';
    $shortcode['name'] = isset($shortcode['name']) ? $shortcode['name'] : $name;
    $visible = isset($shortcode['visible']) ? $shortcode['visible'] : true;
    if ($visible == true) {
        echo '<span data-name="' . $shortcode['name'] . '" data-shortcode="' . $name . '" title="' . $shortcode['desc'] . '" data-desc="' . $shortcode['desc'] . '" data-group="' . $shortcode['group'] . '">' . Su_Tools::icon($icon) . $shortcode['name'] . $badge . '</span>' . "\n";
    }
开发者ID:jhener79,项目名称:vlakc,代码行数:31,代码来源:default.php


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