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>'; }
public function register_taxonomy() { $data = Eab_Options::get_instance(); register_taxonomy('eab_events_category', Eab_EventModel::POST_TYPE, array('labels' => array('name' => __('Event Categories', eab_domain()), 'singular_name' => __('Event Category', eab_domain())), 'hierarchical' => true, 'public' => true, 'rewrite' => array('slug' => $data->get_option('slug'), 'with_front' => true), 'capabilities' => array('manage_terms' => 'manage_categories', 'edit_terms' => 'manage_categories', 'delete_terms' => 'manage_categories', 'assign_terms' => 'edit_events'))); }
function render() { ?> <div class="wrap"> <h1><?php _e('Getting started', eab_domain()); ?> </h1> <p> <?php _e('Events gives you a flexible WordPress-based system for organizing parties, dinners, fundraisers - you name it.', eab_domain()); ?> </p> <div class="eab-metaboxcol metabox-holder eab-metaboxcol-one eab-metaboxcol-center"> <div id="eab-actionlist" class="eab-metabox postbox"> <h3 class="eab-hndle"><?php _e('Getting Started', eab_domain()); ?> </h3> <div class="eab-inside"> <div class="eab-note"><?php _e('You\'re almost ready! Follow these steps and start creating events on your WordPress site.', eab_domain()); ?> </div> <ol> <li> <?php _e('Before creating an event, you\'ll need to configure some basic settings, like your root slug and payment options.', eab_domain()); ?> <a href="<?php echo esc_url('edit.php?post_type=incsub_event&page=eab_settings&eab_step=1'); ?> " class="eab-goto-step button" id="eab-goto-step-0" ><?php _e('Configure Your Settings', eab_domain()); ?> </a> </li> <li> <?php _e('Now you can create your first event.', eab_domain()); ?> <a href="<?php echo esc_url('post-new.php?post_type=incsub_event&eab_step=2'); ?> " class="eab-goto-step button"><?php _e('Add an Event', eab_domain()); ?> </a> </li> <li> <?php _e('You can view and edit your existing events whenever you like.', eab_domain()); ?> <a href="<?php echo esc_url('edit.php?post_type=incsub_event&eab_step=3'); ?> " class="eab-goto-step button"><?php _e('Edit Events', eab_domain()); ?> </a> </li> <li> <?php _e('The archive displays a list of upcoming events on your site.', eab_domain()); ?> <a href="<?php echo home_url($this->_data->get_option('slug')) . '/'; ?> " class="eab-goto-step button"><?php _e('Events Archive', eab_domain()); ?> </a> </li> </ol> </div> </div> </div> <?php if (!defined('WPMUDEV_REMOVE_BRANDING') || !constant('WPMUDEV_REMOVE_BRANDING')) { ?> <div class="eab-metaboxcol metabox-holder eab-metaboxcol-one eab-metaboxcol-center"> <div id="eab-helpbox" class="eab-metabox postbox"> <h3 class="eab-hndle"><?php _e('Need help?', eab_domain()); ?> </h3> <div class="eab-inside"> <ol> <li><a href="http://premium.wpmudev.org/project/events-and-booking"><?php _e('Check out the Events plugin page on WPMU DEV', eab_domain()); ?> </a></li> <li><a href="http://premium.wpmudev.org/forums/tags/events-and-bookings"><?php _e('Post a question about this plugin on our support forums', eab_domain()); ?> </a></li> <li><a href="http://premium.wpmudev.org/project/events-and-booking/installation/"><?php _e('Watch a video of the Events plugin in action', eab_domain()); ?> </a></li> </ol> </div> </div> </div> <?php } ?> <div class="clear"></div> <div class="eab-dashboard-footer"> </div> </div> <?php }