function render() { $updated = isset($_GET['incsub_event_settings_saved']) && $_GET['incsub_event_settings_saved'] == 1; if (!class_exists('WpmuDev_HelpTooltips')) { require_once eab_plugin_dir() . 'lib/class_wd_help_tooltips.php'; } $tips = new WpmuDev_HelpTooltips(); $tips->set_icon_url(eab_plugin_url() . 'img/information.png'); if (!(defined('EAB_PREVENT_SETTINGS_SECTIONS') && EAB_PREVENT_SETTINGS_SECTIONS)) { $tabbable = 'tabbable'; } else { $tabbable = false; } $hide = !empty($tabbable) ? 'hide' : ''; $archive_tpl = file_exists(get_stylesheet_directory() . '/archive-incsub_event.php') ? get_stylesheet_directory() . '/archive-incsub_event.php' : get_template_directory() . '/archive-incsub_event.php'; $archive_tpl_present = apply_filters('eab-settings-appearance-archive_template_copied', file_exists($archive_tpl)); $single_tpl = file_exists(get_stylesheet_directory() . '/single-incsub_event.php') ? get_stylesheet_directory() . '/single-incsub_event.php' : get_template_directory() . '/single-incsub_event.php'; $single_tpl_present = apply_filters('eab-settings-appearance-single_template_copied', file_exists($single_tpl)); $theme_tpls_present = apply_filters('eab-settings-appearance-templates_copied', $archive_tpl_present && $single_tpl_present); $raw_tpl_sets = glob(EAB_PLUGIN_DIR . 'default-templates/*'); $templates = array(); foreach ($raw_tpl_sets as $item) { if (!is_dir($item)) { continue; } $key = basename($item); $label = ucwords(preg_replace('/[^a-z0-9]+/i', ' ', $key)); $templates[$key] = sprintf(__("Plugin: %s", eab_domain()), $label); } foreach (get_page_templates() as $name => $tpl) { $templates[$tpl] = sprintf(__("Theme: %s", eab_domain()), $name); } include_once 'views/settings-menu.php'; }
function render() { // Filter the help.... $help = apply_filters('eab-shortcodes-shortcode_help', array()); if (!class_exists('WpmuDev_HelpTooltips')) { require_once eab_plugin_dir() . 'lib/class_wd_help_tooltips.php'; } $tips = new WpmuDev_HelpTooltips(); $tips->set_icon_url(plugins_url('events-and-bookings/img/information.png')); $out = ''; $count = 0; $half = (int) (count($help) / 2); $out .= '<div class="postbox-container">'; foreach ($help as $shortcode) { $out .= '<div class="eab-metabox postbox"><h3 class="eab-hndle">' . $shortcode['title'] . '</h3>'; $out .= '<div class="eab-inside">'; $out .= ' <div class="eab-settings-settings_item">'; $out .= ' <strong>' . __('Tag:', eab_domain()) . '</strong> <code>[' . $shortcode['tag'] . ']</code>'; if (!empty($shortcode['note'])) { $out .= '<div class="eab-note">' . $shortcode['note'] . '</div>'; } $out .= ' </div>'; if (!empty($shortcode['arguments'])) { $out .= ' <div class="eab-settings-settings_item" style="line-height:1.5em"><strong>' . __('Arguments:', eab_domain()) . '</strong>'; foreach ($shortcode['arguments'] as $argument => $data) { if (!empty($shortcode['advanced_arguments']) && !current_user_can('manage_options')) { if (in_array($argument, $shortcode['advanced_arguments'])) { continue; } } $type = !empty($data['type']) ? eab_call_template('util_shortcode_argument_type_string_info', $data['type'], $argument, $shortcode['tag'], $tips) : false; $out .= "<div class='eab-shortcode-attribute_item'><code>{$argument}</code> - {$data['help']} {$type}</div>"; } $out .= '</div><!-- Attributes -->'; } $out .= '</div></div>'; $count++; if ($count == $half) { $out .= '</div><div class="postbox-container eab-postbox_container-last">'; } } $out .= '</div>'; echo '<div class="wrap"> <h1>' . __('Events Shortcodes', eab_domain()) . '</h1> <div class="eab-metaboxcol metabox-holder eab-metaboxcol-one eab-metaboxcol-center columns-2">'; echo $out; echo '</div></div>'; }