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

PHP evo_get_ett_count函数代码示例

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

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



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

示例1: __construct

 function __construct()
 {
     add_filter('eventon_extra_tax', array($this, 'extra_tax'), 10, 1);
     add_action('init', array($this, 'register_frontend_scripts'), 15);
     //when a new post is published
     add_action('transition_post_status', array($this, 'send_approval_email'), 10, 3);
     $this->options = get_option('evcal_options_evcal_1');
     $this->tax_count = evo_get_ett_count($this->options);
     $this->tax_names = evo_get_ettNames($this->options);
     $this->evoau_opt = get_option('evcal_options_evoau_1');
     $this->evoau_opt_2 = get_option('evcal_options_evoau_2');
 }
开发者ID:sabdev1,项目名称:ljcdevsab,代码行数:12,代码来源:class-frontend.php


示例2: event_type_options

 function event_type_options()
 {
     $event_type_names = evo_get_ettNames($this->evcal_opt[1]);
     // event types category names
     $ett_verify = evo_get_ett_count($this->evcal_opt[1]);
     $event_type_options['event_location'] = 'Event Location';
     $event_type_options['event_organizer'] = 'Event Organizer';
     for ($x = 1; $x < $ett_verify + 1; $x++) {
         $ab = $x == 1 ? '' : '_' . $x;
         $event_type_options['event_type' . $ab] = $event_type_names[$x];
     }
     return $event_type_options;
 }
开发者ID:Gabriel727,项目名称:Dashboard,代码行数:13,代码来源:class-settings-settings.php


示例3: evoAU_language_additions

 function evoAU_language_additions($_existen)
 {
     $evcal_opt = get_option('evcal_options_evcal_1');
     $new_ar = array(array('type' => 'togheader', 'name' => 'ADDON: Action User'), array('label' => 'Event Name', 'name' => 'evoAUL_evn', 'legend' => ''), array('label' => 'Event Sub Title', 'name' => 'evoAUL_est', 'legend' => ''), array('label' => 'Event Start Date/Time', 'name' => 'evoAUL_esdt', 'legend' => ''), array('label' => 'Event End Date/Time', 'name' => 'evoAUL_eedt', 'legend' => ''), array('label' => 'Event Details', 'name' => 'evcal_evcard_details_au', 'legend' => ''), array('label' => 'Event Color', 'name' => 'evoAUL_ec', 'legend' => ''), array('label' => 'Event Location Name', 'name' => 'evoAUL_lca'), array('label' => 'Event Location Address', 'name' => 'evoAUL_ln'), array('label' => 'Event Location Coordinates (lat,lon Seperated by comma)', 'name' => 'evoAUL_lcor'), array('label' => 'Event Organizer', 'name' => 'evoAUL_eo', 'legend' => ''), array('label' => 'Event Organizer Contact Information', 'name' => 'evoAUL_eoc', 'legend' => ''), array('label' => 'Learn More Link', 'name' => 'evoAUL_lml', 'legend' => ''));
     // event taxnomies upto 5 all active ones only
     $ett_verify = evo_get_ett_count($evcal_opt);
     $_tax_names_array = evo_get_ettNames($evcal_opt);
     $new_ar_1 = '';
     for ($x = 1; $x < $ett_verify + 1; $x++) {
         $ab = $x == 1 ? '' : '_' . $x;
         $__tax_name = $_tax_names_array[$x];
         $new_ar_1[] = array('label' => 'Select the ' . $__tax_name . '', 'name' => 'evoAUL_stet' . $x, 'legend' => '');
     }
     $new_ar_2 = array(array('label' => 'Edit Submitted Event', 'name' => 'evoAUL_ese', 'legend' => ''), array('label' => 'Event Image', 'name' => 'evoAUL_ei', 'legend' => ''), array('label' => 'All Day Event', 'name' => 'evoAUL_001', 'legend' => ''), array('label' => 'No End time', 'name' => 'evoAUL_002', 'legend' => ''), array('label' => 'Your Full Name', 'name' => 'evoAUL_fn', 'legend' => ''), array('label' => 'Your Email Address', 'name' => 'evoAUL_ea', 'legend' => ''), array('label' => 'Form Human Submission Validation', 'name' => 'evoAUL_cap', 'legend' => ''), array('label' => 'Select an Image', 'name' => 'evoAUL_img002', 'legend' => ''), array('label' => 'Image Chosen', 'name' => 'evoAUL_img001', 'legend' => ''), array('label' => 'Additional Field', 'name' => 'evoAU_add', 'legend' => ''), array('label' => '(Text)', 'var' => '1'), array('label' => '(Link)', 'var' => '1'), array('label' => 'Submit Event', 'name' => 'evoAUL_se', 'legend' => ''), array('label' => 'Submit another event', 'var' => '1'), array('label' => 'Form field placeholders', 'type' => 'subheader'), array('label' => 'Start Date', 'name' => 'evoAUL_phsd', 'legend' => ''), array('label' => 'Start Time', 'name' => 'evoAUL_phst', 'legend' => ''), array('label' => 'End Date', 'name' => 'evoAUL_phed', 'legend' => ''), array('label' => 'End Time', 'name' => 'evoAUL_phet', 'legend' => ''), array('type' => 'togend'), array('label' => 'User Interaction values', 'type' => 'subheader'), array('label' => 'Slide Down EventCard', 'name' => 'evoAUL_ux1', 'legend' => ''), array('label' => 'External Link', 'name' => 'evoAUL_ux2', 'legend' => ''), array('label' => 'Lightbox popup window', 'name' => 'evoAUL_ux3', 'legend' => ''), array('type' => 'togend'), array('label' => 'Form Notification Messages', 'type' => 'subheader'), array('label' => 'You must login to submit events.', 'name' => 'evoAUL_ymlse', 'legend' => ''), array('label' => 'Required Fields Missing', 'name' => 'evoAUL_nof1', 'legend' => ''), array('label' => 'Invalid validation code please try again', 'name' => 'evoAUL_nof2', 'legend' => ''), array('label' => 'Thank you for submitting your event!', 'name' => 'evoAUL_nof3', 'legend' => ''), array('label' => 'Could not create event post, try again later!', 'name' => 'evoAUL_nof4', 'legend' => ''), array('label' => 'Bad nonce form verification, try again!', 'name' => 'evoAUL_nof5', 'legend' => ''), array('label' => 'You can only submit one event!', 'name' => 'evoAUL_nof6', 'legend' => ''), array('type' => 'togend'), array('type' => 'togend'));
     $new_ar = array_merge($new_ar, $new_ar_1, $new_ar_2);
     return is_array($_existen) ? array_merge($_existen, $new_ar) : $_existen;
 }
开发者ID:sabdev1,项目名称:ljcdevsab,代码行数:17,代码来源:class-admin.php


示例4: register_taxonomies

 public static function register_taxonomies()
 {
     // Taxonomies
     do_action('eventon_register_taxonomy');
     $evOpt = self::$evOpt;
     $__capabilities = array('manage_terms' => 'manage_eventon_terms', 'edit_terms' => 'edit_eventon_terms', 'delete_terms' => 'delete_eventon_terms', 'assign_terms' => 'assign_eventon_terms');
     register_taxonomy('event_location', apply_filters('eventon_taxonomy_objects_event_location', array('ajde_events')), apply_filters('eventon_taxonomy_args_event_location', array('hierarchical' => false, 'label' => __('Event Location', 'eventon'), 'show_ui' => true, 'query_var' => true, 'show_in_quick_edit' => false, 'meta_box_cb' => false, 'capabilities' => $__capabilities, 'rewrite' => apply_filters('evotax_slug_loc', array('slug' => 'event-location')))));
     register_taxonomy('event_organizer', apply_filters('eventon_taxonomy_objects_event_organizer', array('ajde_events')), apply_filters('eventon_taxonomy_args_event_organizer', array('hierarchical' => false, 'label' => __('Event Organizer', 'eventon'), 'show_ui' => true, 'query_var' => true, 'show_in_quick_edit' => false, 'meta_box_cb' => false, 'capabilities' => $__capabilities, 'rewrite' => apply_filters('evotax_slug_org', array('slug' => 'event-organizer')))));
     // Event type custom taxonomy NAMES
     $event_type_names = evo_get_ettNames($evOpt);
     // for each activated event type category
     for ($x = 1; $x < evo_get_ett_count($evOpt) + 1; $x++) {
         $ab = $x == 1 ? '' : '_' . $x;
         $ab2 = $x == 1 ? '' : '-' . $x;
         $evt_name = $event_type_names[$x];
         register_taxonomy('event_type' . $ab, apply_filters('eventon_taxonomy_objects_event_type' . $ab, array('ajde_events')), apply_filters('eventon_taxonomy_args_event_type' . $ab, array('hierarchical' => true, 'labels' => array('name' => __("{$evt_name} Categories", 'eventon'), 'singular_name' => __("{$evt_name} Category", 'eventon'), 'menu_name' => _x($evt_name, 'Admin menu name', 'eventon'), 'search_items' => __("Search {$evt_name} Categories", 'eventon'), 'all_items' => __("All {$evt_name} Categories", 'eventon'), 'parent_item' => __("Parent {$evt_name} Category", 'eventon'), 'parent_item_colon' => __("Parent {$evt_name} Category:", 'eventon'), 'edit_item' => __("Edit {$evt_name} Category", 'eventon'), 'update_item' => __("Update {$evt_name} Category", 'eventon'), 'add_new_item' => __("Add New {$evt_name} Category", 'eventon'), 'new_item_name' => __("New {$evt_name} Category Name", 'eventon')), 'show_ui' => true, 'query_var' => true, 'capabilities' => $__capabilities, 'rewrite' => array('slug' => 'event-type' . $ab2))));
     }
 }
开发者ID:pab44,项目名称:pab44,代码行数:18,代码来源:class-evo-post-types.php


示例5: evo_get_localized_ettNames

function evo_get_localized_ettNames($lang = '', $options = '', $options2 = '')
{
    $output = '';
    global $eventon;
    $options = !empty($options) ? $options : get_option('evcal_options_evcal_1');
    $options2 = !empty($options2) ? $options2 : get_option('evcal_options_evcal_2');
    if (!empty($lang)) {
        $_lang_variation = $lang;
    } else {
        $shortcode_arg = $eventon->evo_generator->shortcode_args;
        $_lang_variation = !empty($shortcode_arg['lang']) ? $shortcode_arg['lang'] : 'L1';
    }
    // foreach event type upto activated event type categories
    for ($x = 1; $x < evo_get_ett_count($options) + 1; $x++) {
        $ab = $x == 1 ? '' : $x;
        $_tax_lang_field = 'evcal_lang_et' . $x;
        // check on eventon language values for saved name
        $lang_name = !empty($options2[$_lang_variation][$_tax_lang_field]) ? stripslashes($options2[$_lang_variation][$_tax_lang_field]) : null;
        // conditions
        if (!empty($lang_name)) {
            $output[$x] = $lang_name;
        } else {
            $output[$x] = !empty($options['evcal_eventt' . $ab]) ? $options['evcal_eventt' . $ab] : 'Event Type ' . $ab;
        }
    }
    return $output;
}
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:27,代码来源:eventon-core-functions.php


示例6: generate_event_data

    /** GENERATE individual event data	 */
    public function generate_event_data($event_list_array, $focus_month_beg_range = '', $FOCUS_month_int = '', $FOCUS_year_int = '')
    {
        $months_event_array = '';
        // Initial variables
        $wp_time_format = get_option('time_format');
        $default_event_color = !empty($this->evopt1['evcal_hexcode']) ? '#' . $this->evopt1['evcal_hexcode'] : '#206177';
        $__shortC_arg = $this->shortcode_args;
        // user interavtion for the calendar
        $calendar_ux_val = !empty($__shortC_arg['ux_val']) ? $__shortC_arg['ux_val'] : '0';
        $__count = 0;
        // EVENT CARD open by default variables
        $_is_eventCardOpen = !empty($__shortC_arg['evc_open']) && $__shortC_arg['evc_open'] == 'yes' ? true : ($this->is_eventcard_open ? true : false);
        $eventcard_script_class = $_is_eventCardOpen ? "gmaponload" : null;
        $this->is_eventcard_open = false;
        // check featured events are prioritized
        $__feature_events = !empty($__shortC_arg['ft_event_priority']) && $__shortC_arg['ft_event_priority'] != 'no' ? true : false;
        // GET EventTop fields - v2.1.17
        $eventop_fields = !empty($this->evopt1['evcal_top_fields']) ? $this->evopt1['evcal_top_fields'] : null;
        // Number of activated taxnomonies v 2.2.15
        $_active_tax = evo_get_ett_count($this->evopt1);
        // eventCARD HTML
        require_once AJDE_EVCAL_PATH . '/includes/eventon_eventCard.php';
        require_once AJDE_EVCAL_PATH . '/includes/eventon-eventTop.php';
        // check if single event exist
        $_sin_ev_ex = in_array('eventon-single-event/eventon-single-event.php', get_option('active_plugins')) ? true : false;
        // EACH EVENT
        if (is_array($event_list_array)) {
            foreach ($event_list_array as $event_) {
                // Intials
                $html_event_detail_card = '';
                $_eventClasses = $_eventInClasses = array();
                $_eventAttr = $_eventInAttr = array();
                $__count++;
                $event_id = $event_['event_id'];
                $event_start_unix = $event_['event_start_unix'];
                $event_end_unix = $event_['event_end_unix'];
                $event_type = $event_['event_type'];
                $ev_vals = $event_['event_pmv'];
                $event = get_post($event_id);
                $_eventInClasses[] = $eventcard_script_class;
                // set how a single event would interact
                $event_ux_val = !empty($ev_vals['_evcal_exlink_option']) ? $ev_vals['_evcal_exlink_option'][0] : 1;
                $event_permalink = get_permalink($event_id);
                $event_ux_val = $calendar_ux_val != '1' ? $calendar_ux_val : $event_ux_val;
                // whether eventcard elements need to be included or not
                $_event_card_on = $calendar_ux_val == '4' || $calendar_ux_val == 'X' || $event_ux_val == '4' || $event_ux_val == '2' ? false : true;
                $_event_card_on = $_is_eventCardOpen ? true : $_event_card_on;
                // if event card is forced to open then
                $html_tag = $event_ux_val == '1' ? 'div' : 'a';
                $html_tag = $_event_card_on ? 'a' : $html_tag;
                //echo ($_is_eventCardOpen?3:4). ' '.($_event_card_on?3:4). ' '.$calendar_ux_val.' '.$event_ux_val;
                // year long or not
                $__year_long_event = !empty($ev_vals['evo_year_long']) && $ev_vals['evo_year_long'][0] == 'yes' ? true : 0;
                // define variables
                $ev_other_data = $ev_other_data_top = $html_event_type_info = $_event_date_HTML = $_eventcard = $html_event_type_2_info = '';
                $_is_end_date = true;
                // UNIX date values
                $DATE_start_val = eventon_get_formatted_time($event_start_unix);
                if (empty($event_end_unix)) {
                    $_is_end_date = false;
                    $DATE_end_val = $DATE_start_val;
                } else {
                    $DATE_end_val = eventon_get_formatted_time($event_end_unix);
                }
                // if this event featured
                $_eventInClasses['__featured'] = $this->helper->evo_meta('_featured', $ev_vals, 'tf');
                $_eventInClasses['_cancel'] = $this->helper->evo_meta('_cancel', $ev_vals, 'tf');
                // GET: repeat interval for this event
                $__repeatInterval = !empty($event_['event_repeat_interval']) ? $event_['event_repeat_interval'] : (!empty($_GET['ri']) ? $_GET['ri'] : 0);
                // Unique ID generation
                $unique_varied_id = 'evc' . $event_start_unix . uniqid() . $event_id;
                $unique_id = 'evc_' . $event_start_unix . $event_id;
                // All day event variables
                $_is_allday = $this->helper->evo_meta('evcal_allday', $ev_vals, 'tf');
                $_hide_endtime = $this->helper->evo_meta('evo_hide_endtime', $ev_vals, 'tf');
                $evcal_lang_allday = $this->lang('evcal_lang_allday', 'All Day');
                /*
                	evo_hide_endtime
                	NOTE: if its set to hide end time, meaning end time and date would be empty on wp-admin, which will fall into same start end month category.
                */
                $_event_date_HTML = $this->generate_time_($DATE_start_val, $DATE_end_val, $ev_vals, $evcal_lang_allday, $focus_month_beg_range, $FOCUS_month_int, $event_start_unix, $event_end_unix);
                // (---) hook for addons
                $_event_date_HTML = apply_filters('eventon_eventcard_date_html', $_event_date_HTML, $event_id);
                // EACH DATA FIELD
                // EVENT FEATURES IMAGE
                $img_id = get_post_thumbnail_id($event_id);
                $img_med_src = $img_thumb_src = '';
                if ($img_id != '') {
                    $img_src = wp_get_attachment_image_src($img_id, 'full');
                    $img_med_src = wp_get_attachment_image_src($img_id, 'medium');
                    $img_thumb_src = wp_get_attachment_image_src($img_id, 'thumbnail');
                    // append to eventcard array
                    $_eventcard['ftimage'] = array('img' => $img_src, 'hovereffect' => !empty($this->evopt1['evo_ftimghover']) ? $this->evopt1['evo_ftimghover'] : null, 'clickeffect' => !empty($this->evopt1['evo_ftimgclick']) ? $this->evopt1['evo_ftimgclick'] : null, 'min_height' => !empty($this->evopt1['evo_ftimgheight']) ? $this->evopt1['evo_ftimgheight'] : 400, 'ftimg_sty' => !empty($this->evopt1['evo_ftimg_height_sty']) ? $this->evopt1['evo_ftimg_height_sty'] : 'minimized');
                }
                // EVENT DESCRIPTION
                $evcal_event_content = $event->post_content;
                if (!empty($evcal_event_content)) {
                    $event_full_description = $evcal_event_content;
                } else {
//.........这里部分代码省略.........
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:101,代码来源:class-calendar_generator.php


示例7: export_events

 function export_events()
 {
     header("Content-type: text/csv");
     header("Content-Disposition: attachment; filename=Eventon_events_" . date("d-m-y") . ".csv");
     header("Pragma: no-cache");
     header("Expires: 0");
     $evo_opt = get_option('evcal_options_evcal_1');
     $event_type_count = evo_get_ett_count($evo_opt);
     $cmd_count = evo_calculate_cmd_count($evo_opt);
     $fields = array('publish_status', 'evcal_event_color' => 'color', 'event_name', 'event_description', 'event_start_date', 'event_start_time', 'event_end_date', 'event_end_time', 'evcal_allday' => 'all_day', 'evo_hide_endtime' => 'hide_end_time', 'evcal_gmap_gen' => 'event_gmap', '_featured' => 'featured', 'evcal_location_name' => 'location_name', 'evcal_location' => 'event_location', 'evcal_organizer' => 'event_organizer', 'evcal_subtitle' => 'evcal_subtitle', 'image_url');
     foreach ($fields as $var => $val) {
         echo $val . ',';
     }
     // event types
     for ($y = 1; $y <= $event_type_count; $y++) {
         $_ett_name = $y == 1 ? 'event_type' : 'event_type_' . $y;
         echo $_ett_name . ',';
     }
     // for event custom meta data
     for ($z = 1; $z <= $cmd_count; $z++) {
         $_cmd_name = 'cmd_' . $z;
         echo $_cmd_name . ",";
     }
     echo "\n";
     $events = new WP_Query(array('posts_per_page' => -1, 'post_type' => 'ajde_events', 'post_status' => 'any'));
     if ($events->have_posts()) {
         date_default_timezone_set('UTC');
         while ($events->have_posts()) {
             $events->the_post();
             $__id = get_the_ID();
             $pmv = get_post_meta($__id);
             echo get_post_status($__id) . ",";
             //echo (!empty($pmv['_featured'])?$pmv['_featured'][0]:'no').",";
             echo (!empty($pmv['evcal_event_color']) ? $pmv['evcal_event_color'][0] : '') . ",";
             echo '"' . get_the_title() . '",';
             $event_content = get_the_content();
             echo '"' . str_replace('"', "'", $event_content) . '",';
             // start time
             $start = !empty($pmv['evcal_srow']) ? $pmv['evcal_srow'][0] : '';
             if (!empty($start)) {
                 echo date('n/j/Y,g:i:A', $start) . ',';
             } else {
                 echo "'','',";
             }
             // end time
             $end = !empty($pmv['evcal_erow']) ? $pmv['evcal_erow'][0] : '';
             if (!empty($end)) {
                 echo date('n/j/Y,g:i:A', $end) . ',';
             } else {
                 echo "'','',";
             }
             foreach ($fields as $var => $val) {
                 // yes no values
                 if (in_array($val, array('featured', 'all_day', 'hide_end_time', 'event_gmap'))) {
                     echo (!empty($pmv[$var]) && $pmv[$var][0] == 'yes' ? 'yesf' : 'no') . ',';
                 }
                 // skip fields
                 if (in_array($val, array('featured', 'all_day', 'hide_end_time', 'event_gmap', 'color', 'publish_status', 'event_name', 'event_description', 'event_start_date', 'event_start_time', 'event_end_date', 'event_end_time'))) {
                     continue;
                 }
                 // image
                 if ($val == 'image_url') {
                     $img_id = get_post_thumbnail_id($__id);
                     if ($img_id != '') {
                         $img_src = wp_get_attachment_image_src($img_id, 'full');
                         echo $img_src[0] . ",";
                     } else {
                         echo ",";
                     }
                 } else {
                     echo (!empty($pmv[$var]) ? '"' . $pmv[$var][0] . '"' : '') . ",";
                 }
             }
             // event types
             for ($y = 1; $y <= $event_type_count; $y++) {
                 $_ett_name = $y == 1 ? 'event_type' : 'event_type_' . $y;
                 $terms = get_the_terms($__id, $_ett_name);
                 if ($terms && !is_wp_error($terms)) {
                     echo '"';
                     foreach ($terms as $term) {
                         echo $term->term_id . ',';
                     }
                     echo '",';
                 } else {
                     echo ",";
                 }
             }
             // for event custom meta data
             for ($z = 1; $z <= $cmd_count; $z++) {
                 $cmd_name = '_evcal_ec_f' . $z . 'a1_cus';
                 echo !empty($pmv[$cmd_name]) ? '"' . str_replace('"', "'", $pmv[$cmd_name][0]) . '"' : '';
                 echo ",";
             }
             echo "\n";
         }
     }
     wp_reset_postdata();
 }
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:98,代码来源:class-evo-ajax.php


示例8: _array_part_taxonomies

 function _array_part_taxonomies()
 {
     $output = '';
     $event_type_names = evo_get_ettNames($this->evopt);
     $ett_verify = evo_get_ett_count($this->evopt);
     $output[] = array('type' => 'togheader', 'name' => 'Event Type Categories');
     for ($x = 1; $x < $ett_verify + 1; $x++) {
         $default = $event_type_names[$x];
         $output[] = array('label' => $default, 'name' => 'evcal_lang_et' . $x);
         // each term of taxonomy
         $ab = $x == 1 ? '' : '_' . $x;
         $terms = get_terms('event_type' . $ab, array('hide_empty' => false));
         $termitem = '';
         if (!empty($terms)) {
             foreach ($terms as $term) {
                 $var = 'evolang_' . 'event_type' . $ab . '_' . $term->term_id;
                 $termitem[$var] = !empty($this->lang_options[$var]) ? $this->lang_options[$var] : $term->name;
             }
         }
         if (!empty($termitem)) {
             $output[] = array('type' => 'multibox_open', 'items' => $termitem);
         }
     }
     $output[] = array('label' => 'Event Location', 'name' => 'evcal_lang_evloc');
     $output[] = array('label' => 'Events at this location', 'var' => '1');
     $output[] = array('label' => 'Event Organizer', 'name' => 'evcal_lang_evorg');
     $output[] = array('label' => 'Events by this organizer', 'var' => '1');
     $output[] = array('type' => 'togend');
     return $output;
 }
开发者ID:pab44,项目名称:pab44,代码行数:30,代码来源:settings_language_tab.php


示例9: get_option

<?php

/**
 * Language Settings 
 *
 * @version		2.2.10
 * @package		EventON/settings
 * @category	Settings
 * @author 		AJDE
 */
// Event type custom taxonomy NAMES
$evopt = get_option('evcal_options_evcal_1');
$event_type_names = evo_get_ettNames($evopt);
$_ett_lang_ar = array();
$ett_verify = evo_get_ett_count($evopt);
for ($x = 1; $x < $ett_verify + 1; $x++) {
    $_ett_lang_ar[$x] = array('label' => $event_type_names[$x], 'name' => 'evcal_lang_et' . $x);
}
// Custom meta fields
$_cmd_lang_ar = array();
$cmd_verify = evo_retrieve_cmd_count($evopt);
for ($x = 1; $x < $cmd_verify + 1; $x++) {
    $label = $evopt['evcal_ec_f' . $x . 'a1'];
    $_cmd_lang_ar[$x] = array('label' => $label, 'name' => 'evcal_cmd_' . $x);
}
// MAIN ARRAY
$eventon_custom_language_array = array(array('type' => 'togheader', 'name' => 'General Calendar'), array('label' => 'No Events', 'name' => 'evcal_lang_noeve', 'legend' => ''), array('label' => 'All Day', 'name' => 'evcal_lang_allday', 'legend' => ''), array('label' => 'Year Around Event', 'name' => 'evcal_lang_yrrnd', 'legend' => ''), array('label' => 'Events', 'name' => 'evcal_lang_events'), array('label' => 'Show More Events', 'name' => 'evcal_lang_sme'), array('type' => 'togend'), array('type' => 'togheader', 'name' => 'Calendar Header'), array('label' => 'Jump Months', 'name' => 'evcal_lang_jumpmonths', 'legend' => ''), array('label' => 'Jump Months: Month', 'name' => 'evcal_lang_jumpmonthsM', 'legend' => ''), array('label' => 'Jump Months: Year', 'name' => 'evcal_lang_jumpmonthsY', 'legend' => ''), array('label' => 'Sort Options', 'name' => 'evcal_lang_sopt', 'legend' => ''), array('label' => 'Sort By', 'name' => 'evcal_lang_sort', 'legend' => ''), array('label' => 'Date', 'name' => 'evcal_lang_sdate', 'legend' => ''), array('label' => 'Title', 'name' => 'evcal_lang_stitle', 'legend' => ''), array('label' => 'All', 'name' => 'evcal_lang_all', 'legend' => 'Sort options all text'), $_ett_lang_ar[1], $_ett_lang_ar[2], !empty($_ett_lang_ar[3]) ? $_ett_lang_ar[3] : null, !empty($_ett_lang_ar[4]) ? $_ett_lang_ar[4] : null, array('type' => 'togend'), array('type' => 'togheader', 'name' => 'Event Card'), array('label' => 'Location Name', 'name' => 'evcal_lang_location_name', 'legend' => ''), array('label' => 'Location', 'name' => 'evcal_lang_location', 'legend' => ''), array('label' => 'Event Location', 'name' => 'evcal_lang_evloc'), array('label' => 'Type your address', 'name' => 'evcalL_getdir_placeholder', 'legend' => 'Get directions section'), array('label' => 'Click here to get directions', 'name' => 'evcalL_getdir_title', 'legend' => 'Get directions section'), array('label' => 'Time', 'name' => 'evcal_lang_time', 'legend' => ''), array('label' => 'Color', 'name' => 'evcal_lang_scolor', 'legend' => ''), array('label' => 'At (event location)', 'name' => 'evcal_lang_at', 'legend' => ''), array('label' => 'Event Details', 'name' => 'evcal_evcard_details', 'legend' => ''), array('label' => 'Event Organized by', 'name' => 'evcal_evcard_org', 'legend' => ''), array('label' => 'Event Organizer', 'name' => 'evcal_lang_evorg'), array('label' => 'Close event button text', 'name' => 'evcal_lang_close'), array('label' => 'More', 'name' => 'evcal_lang_more', 'legend' => 'More/less text for long event description'), array('label' => 'Less', 'name' => 'evcal_lang_less', 'legend' => 'More/less text for long event description'), array('label' => 'Buy ticket via Paypal', 'name' => 'evcal_evcard_tix1', 'legend' => 'for Paypal'), array('label' => 'Buy Now button text', 'name' => 'evcal_evcard_btn1', 'legend' => 'for Paypal'), array('label' => 'Ticket for the event', 'name' => 'evcal_evcard_tix2', 'legend' => 'for eventbrite'), array('label' => 'Buy now button', 'name' => 'evcal_evcard_btn2', 'legend' => 'for eventbrite'), array('label' => 'Event Capacity', 'name' => 'evcal_evcard_cap', 'legend' => ''), array('label' => 'Learn More about this event', 'name' => 'evcal_evcard_learnmore', 'legend' => 'for meetup'), array('label' => 'Learn More link text', 'name' => 'evcal_evcard_learnmore2', 'legend' => 'for meetup'), array('type' => 'subheader', 'label' => 'Add to calendar Section'), array('label' => 'Calendar', 'name' => 'evcal_evcard_calncal'), array('label' => 'GoogleCal', 'name' => 'evcal_evcard_calgcal'), array('label' => 'Add to your calendar', 'name' => 'evcal_evcard_addics', 'legend' => 'Alt text for add to calendar button'), array('label' => 'Add to google calendar', 'name' => 'evcal_evcard_addgcal', 'legend' => 'Alt text for add to google calendar button'), array('type' => 'togend'), !empty($_cmd_lang_ar[1]) ? $_cmd_lang_ar[1] : null, !empty($_cmd_lang_ar[2]) ? $_cmd_lang_ar[2] : null, !empty($_cmd_lang_ar[3]) ? $_cmd_lang_ar[3] : null, array('type' => 'togend'));
开发者ID:bpea,项目名称:amtrak-careers,代码行数:27,代码来源:settings_language_tab.php


示例10: export_events

 function export_events()
 {
     header("Content-type: text/csv");
     header("Content-Disposition: attachment; filename=Eventon_events_" . date("d-m-y") . ".csv");
     header("Pragma: no-cache");
     header("Expires: 0");
     $evo_opt = get_option('evcal_options_evcal_1');
     $event_type_count = evo_get_ett_count($evo_opt);
     $cmd_count = evo_calculate_cmd_count($evo_opt);
     echo "publish_status,featured,color,event_name,event_description,event_start_date,event_start_time,event_end_date,event_end_time,all_day,hide_end_time,location_name,event_location,event_gmap,event_organizer,";
     // event types
     for ($y = 1; $y <= $event_type_count; $y++) {
         $_ett_name = $y == 1 ? 'event_type' : 'event_type_' . $y;
         echo $_ett_name . ',';
     }
     // for event custom meta data
     for ($z = 1; $z <= $cmd_count; $z++) {
         $_cmd_name = 'cmd_' . $z;
         echo $_cmd_name . ",";
     }
     echo "\n";
     $events = new WP_Query(array('posts_per_page' => -1, 'post_type' => 'ajde_events', 'post_status' => 'any'));
     if ($events->have_posts()) {
         date_default_timezone_set('UTC');
         while ($events->have_posts()) {
             $events->the_post();
             $__id = get_the_ID();
             $pmv = get_post_meta($__id);
             echo get_post_status($__id) . ",";
             echo (!empty($pmv['_featured']) ? $pmv['_featured'][0] : 'no') . ",";
             echo (!empty($pmv['evcal_event_color']) ? $pmv['evcal_event_color'][0] : '') . ",";
             echo '"' . get_the_title() . '",';
             $event_content = get_the_content();
             echo '"' . str_replace('"', "'", $event_content) . '",';
             // start time
             $start = !empty($pmv['evcal_srow']) ? $pmv['evcal_srow'][0] : '';
             if (!empty($start)) {
                 echo date('n/j/Y,g:i:A', $start) . ',';
             } else {
                 echo "'','',";
             }
             // end time
             $end = !empty($pmv['evcal_erow']) ? $pmv['evcal_erow'][0] : '';
             if (!empty($end)) {
                 echo date('n/j/Y,g:i:A', $end) . ',';
             } else {
                 echo "'','',";
             }
             echo (!empty($pmv['evcal_allday']) ? $pmv['evcal_allday'][0] : 'no') . ",";
             echo (!empty($pmv['evo_hide_endtime']) ? $pmv['evo_hide_endtime'][0] : 'no') . ",";
             echo (!empty($pmv['evcal_location_name']) ? '"' . $pmv['evcal_location_name'][0] . '"' : '') . ",";
             echo (!empty($pmv['evcal_location']) ? '"' . $pmv['evcal_location'][0] . '"' : '') . ",";
             echo (!empty($pmv['evcal_gmap_gen']) ? $pmv['evcal_gmap_gen'][0] : 'no') . ",";
             echo (!empty($pmv['evcal_organizer']) ? '"' . $pmv['evcal_organizer'][0] . '"' : '') . ",";
             // event types
             for ($y = 1; $y <= $event_type_count; $y++) {
                 $_ett_name = $y == 1 ? 'event_type' : 'event_type_' . $y;
                 $terms = get_the_terms($__id, $_ett_name);
                 if ($terms && !is_wp_error($terms)) {
                     echo '"';
                     foreach ($terms as $term) {
                         echo $term->term_id . ',';
                     }
                     echo '",';
                 } else {
                     echo ",";
                 }
             }
             // for event custom meta data
             for ($z = 1; $z <= $cmd_count; $z++) {
                 $cmd_name = '_evcal_ec_f' . $z . 'a1_cus';
                 echo !empty($pmv[$cmd_name]) ? '"' . str_replace('"', "'", $pmv[$cmd_name][0]) . '"' : '';
                 echo ",";
             }
             echo "\n";
         }
     }
     wp_reset_postdata();
 }
开发者ID:sabdev1,项目名称:sabhoa,代码行数:79,代码来源:class-evo-ajax.php


示例11: generate_event_data

    /** GENERATE individual event data	 */
    public function generate_event_data($event_list_array, $focus_month_beg_range = '', $FOCUS_month_int = '', $FOCUS_year_int = '')
    {
        $months_event_array = '';
        // Initial variables
        $wp_time_format = get_option('time_format');
        $default_event_color = !empty($this->evopt1['evcal_hexcode']) ? '#' . $this->evopt1['evcal_hexcode'] : '#206177';
        $__shortC_arg = $this->shortcode_args;
        $__count = 0;
        // EVENT CARD open by default variables
        $_is_eventCardOpen = !empty($__shortC_arg['evc_open']) && $__shortC_arg['evc_open'] == 'yes' ? true : ($this->is_eventcard_open ? true : false);
        $eventcard_script_class = $_is_eventCardOpen ? "gmaponload" : null;
        $this->is_eventcard_open = false;
        // check featured events are prioritized
        $__feature_events = !empty($__shortC_arg['ft_event_priority']) && $__shortC_arg['ft_event_priority'] != 'no' ? true : false;
        // GET EventTop fields - v2.1.17
        $eventop_fields = !empty($this->evopt1['evcal_top_fields']) ? $this->evopt1['evcal_top_fields'] : null;
        // Number of activated taxnomonies v 2.2.15
        $_active_tax = evo_get_ett_count($this->evopt1);
        // eventCARD HTML
        require_once AJDE_EVCAL_PATH . '/includes/eventon_eventCard.php';
        // check if single event exist
        $_sin_ev_ex = in_array('eventon-single-event/eventon-single-event.php', get_option('active_plugins')) ? true : false;
        // EACH EVENT
        if (is_array($event_list_array)) {
            foreach ($event_list_array as $event_) {
                $__count++;
                //print_r($event);
                $event_id = $event_['event_id'];
                $event_start_unix = $event_['event_start_unix'];
                $event_end_unix = $event_['event_end_unix'];
                $event_type = $event_['event_type'];
                $ev_vals = $event_['event_pmv'];
                $event = get_post($event_id);
                // year long or not
                $__year_long_event = !empty($ev_vals['evo_year_long']) && $ev_vals['evo_year_long'][0] == 'yes' ? true : 0;
                // define variables
                $ev_other_data = $ev_other_data_top = $html_event_type_info = $_event_date_HTML = $_eventcard = $html_event_type_2_info = '';
                $_is_end_date = true;
                $DATE_start_val = eventon_get_formatted_time($event_start_unix);
                if (empty($event_end_unix)) {
                    $_is_end_date = false;
                    $DATE_end_val = $DATE_start_val;
                } else {
                    $DATE_end_val = eventon_get_formatted_time($event_end_unix);
                }
                // if this event featured
                $__featured = !empty($ev_vals['_featured']) && $ev_vals['_featured'][0] == 'yes' ? true : false;
                // GET: repeat interval for this event
                $__repeatInterval = !empty($event_['event_repeat_interval']) ? $event_['event_repeat_interval'] : (!empty($_GET['ri']) ? $_GET['ri'] : 0);
                // Unique ID generation
                $unique_varied_id = 'evc' . $event_start_unix . uniqid() . $event_id;
                $unique_id = 'evc_' . $event_start_unix . $event_id;
                // All day event variables
                $_is_allday = !empty($ev_vals['evcal_allday']) && $ev_vals['evcal_allday'][0] == 'yes' ? true : false;
                $_hide_endtime = !empty($ev_vals['evo_hide_endtime']) && $ev_vals['evo_hide_endtime'][0] == 'yes' ? true : false;
                $evcal_lang_allday = eventon_get_custom_language($this->evopt2, 'evcal_lang_allday', 'All Day');
                /*
                	evo_hide_endtime
                	NOTE: if its set to hide end time, meaning end time and date would be empty on wp-admin, which will fall into same start end month category.
                */
                $_event_date_HTML = $this->generate_time_($DATE_start_val, $DATE_end_val, $ev_vals, $evcal_lang_allday, $focus_month_beg_range, $FOCUS_month_int, $event_start_unix, $event_end_unix);
                // (---) hook for addons
                if (has_filter('eventon_eventcard_date_html')) {
                    $_event_date_HTML = apply_filters('eventon_eventcard_date_html', $_event_date_HTML, $event_id);
                }
                // EACH DATA FIELD
                // EVENT FEATURES IMAGE
                $img_id = get_post_thumbnail_id($event_id);
                $img_med_src = '';
                if ($img_id != '') {
                    $img_src = wp_get_attachment_image_src($img_id, 'full');
                    $img_med_src = wp_get_attachment_image_src($img_id, 'medium');
                    $img_thumb_src = wp_get_attachment_image_src($img_id, 'thumbnail');
                    // append to eventcard array
                    $_eventcard['ftimage'] = array('img' => $img_src, 'hovereffect' => !empty($this->evopt1['evo_ftimghover']) ? $this->evopt1['evo_ftimghover'] : null, 'clickeffect' => !empty($this->evopt1['evo_ftimgclick']) ? $this->evopt1['evo_ftimgclick'] : null, 'min_height' => !empty($this->evopt1['evo_ftimgheight']) ? $this->evopt1['evo_ftimgheight'] : 400, 'ftimg_sty' => !empty($this->evopt1['evo_ftimg_height_sty']) ? $this->evopt1['evo_ftimg_height_sty'] : 'minimized');
                } else {
                    $img_thumb_src = '';
                }
                // EVENT DESCRIPTION
                $evcal_event_content = $event->post_content;
                if (!empty($evcal_event_content)) {
                    $event_full_description = $evcal_event_content;
                } else {
                    // event description compatibility from older versions.
                    $event_full_description = !empty($ev_vals['evcal_description']) ? $ev_vals['evcal_description'][0] : null;
                }
                if (!empty($event_full_description)) {
                    $except = $event->post_excerpt;
                    $event_excerpt = eventon_get_event_excerpt($event_full_description, 30, $except);
                    $_eventcard['eventdetails'] = array('fulltext' => $event_full_description, 'excerpt' => $event_excerpt);
                }
                // EVENT LOCATION
                $lonlat = !empty($ev_vals['evcal_lat']) && !empty($ev_vals['evcal_lon']) ? 'data-latlng="' . $ev_vals['evcal_lat'][0] . ',' . $ev_vals['evcal_lon'][0] . '" ' : null;
                $__location = evo_meta($ev_vals, 'evcal_location');
                // location name
                $__location_name = evo_meta($ev_vals, 'evcal_location_name');
                $_eventcard['timelocation'] = array('timetext' => $_event_date_HTML['html_prettytime'], 'location' => $__location, 'location_name' => $__location_name);
                // Location Image
                $loc_img_id = !empty($ev_vals['evo_loc_img']) ? $ev_vals['evo_loc_img'][0] : null;
//.........这里部分代码省略.........
开发者ID:bpea,项目名称:amtrak-careers,代码行数:101,代码来源:class-calendar_generator.php


示例12: step_content

    /**
     * Content for each step of the CSV import stages
     * Via switch statement
     */
    function step_content($steps)
    {
        global $eventon_csv;
        $evo_opt = get_option('evcal_options_evcal_1');
        $event_type_count = evo_get_ett_count($evo_opt);
        $cmd_count = evo_calculate_cmd_count($evo_opt);
        switch ($steps) {
            // Step nuber 1
            case 'uno':
                ?>
					
			<h2><?php 
                _e('Step 1: Upload CSV file', 'eventon');
                ?>
</h2>
			<?php 
                $this->form();
                $this->print_guidelines();
                break;
                // Step number 2
            // Step number 2
            case 'dos':
                if ($this->csv_verify_nonce_post('eventon_csvi_noncename')) {
                    ?>
				<h2><?php 
                    _e('Step 2: Verify uploaded events', 'eventon');
                    ?>
</h2>
				<p><?php 
                    _e('In this step you can see below the events we found from your uploaded CSV file. Please making sure the data is present correctly. You can also click on each event to deselect them from being imported to EventON - in the next step.', 'eventon');
                    ?>
</p>
				<?php 
                    // verified nonce
                    if (empty($_FILES['csv_import']['tmp_name'])) {
                        $this->log['error'][] = 'No file uploaded, Please try again!.';
                        $this->print_messages();
                        $this->step_content('uno');
                        return;
                    }
                    // get csv helper file
                    require_once $eventon_csv->plugin_path . '/assets/DataSource.php';
                    $time_start = microtime(true);
                    $csv = new File_CSV_DataSource();
                    $file = $_FILES['csv_import']['tmp_name'];
                    $this->stripBOM($file);
                    if (!$csv->load($file)) {
                        $this->log['error'][] = 'Failed to load file, Please try again!.';
                        $this->print_messages();
                        $this->step_content('uno');
                        return;
                    }
                    // pad shorter rows with empty values
                    $csv->symmetrize();
                    // correct wordpress time zone for event posts
                    $tz = get_option('timezone_string');
                    if ($tz && function_exists('date_default_timezone_set')) {
                        date_default_timezone_set($tz);
                    }
                    ?>
					<form class="" action='<?php 
                    echo admin_url();
                    ?>
admin.php?page=eventon&tab=evcal_csv&steps=thres' method="post" enctype="multipart/form-data">
					<?php 
                    settings_fields('eventon_csvi_field_grp');
                    wp_nonce_field($eventon_csv->plugin_path, 'eventon_csvi_dos_noncename');
                    echo "<table id='eventon_csv_data_list' class='wp-list-table widefat'>\r\n\t\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t<th></th>\r\n\t\t\t\t\t\t\t<th title='Publish status for event'>Status</th>\r\n\t\t\t\t\t\t\t<th>Event Name</th>\r\n\t\t\t\t\t\t\t<th>Description</th>\r\n\t\t\t\t\t\t\t<th>Start Date & Time</th>\r\n\t\t\t\t\t\t\t<th>End Date & Time</th>\r\n\t\t\t\t\t\t\t<th>Location</th>\r\n\t\t\t\t\t\t\t<th>Organizer</th>\r\n\t\t\t\t\t\t\t</thead>";
                    // for each record
                    $x = 0;
                    foreach ($csv->connect() as $csv_data) {
                        $ev_desc_class = !empty($csv_data['event_description']) ? 'inner_check' : 'inner_check_no';
                        $ev_location_class = !empty($csv_data['event_location']) ? 'inner_check' : 'inner_check_no';
                        $ev_orga_class = !empty($csv_data['event_organizer']) ? 'inner_check' : 'inner_check_no';
                        // event date validation
                        if (!empty($csv_data['event_start_date'])) {
                            if (preg_match('/^(\\d{1,2})\\/(\\d{1,2})\\/((?:\\d{2}){1,2})$/', $csv_data['event_start_date'])) {
                                $event_start_date = $event_start_date_val = $csv_data['event_start_date'];
                            } else {
                                $event_start_date = "<p class='inner_check_no eventon_csv_icons'></p>";
                                $event_start_date_val = null;
                            }
                        } else {
                            $event_start_date = "<p class='inner_check_no eventon_csv_icons'></p>";
                            $event_start_date_val = null;
                        }
                        // event start time validation
                        if (!empty($csv_data['event_start_time'])) {
                            if (preg_match('/(1[0-2]|0?[0-9]):[0-5]?[0-9]?:(AM|PM)/', $csv_data['event_start_time'])) {
                                $event_start_time = $event_start_time_val = $csv_data['event_start_time'];
                            } else {
                                $event_start_time = "<p class='inner_check_no eventon_csv_icons'></p>";
                                $event_start_time_val = null;
                            }
                        } else {
                            $event_start_time = "<p class='inner_check_no eventon_csv_icons'></p>";
//.........这里部分代码省略.........
开发者ID:sabdev1,项目名称:ljcdevsab,代码行数:101,代码来源:class-admin-init.php


示例13: export_events

 function export_events()
 {
     // check if admin and loggedin
     if (!is_admin() && !is_user_logg 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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