本文整理汇总了PHP中eventon_get_custom_language函数的典型用法代码示例。如果您正苦于以下问题:PHP eventon_get_custom_language函数的具体用法?PHP eventon_get_custom_language怎么用?PHP eventon_get_custom_language使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了eventon_get_custom_language函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cal_above_header
/**
* Above the mail calendar header HTML content
* @param array $args
* @return string HTML
*/
public function cal_above_header($args)
{
//print_r($args);
extract($args);
// jump months section
$jumper_content = '';
if ($jumper == 'yes') {
$focused_year = (int) $focused_year;
$jumper_content .= "<div class='evo_j_container' style='display:none' data-m='{$focused_month_num}' data-y='{$focused_year}'>\r\n\t\t\t\t\t\t<div class='evo_j_months evo_j_dates' data-val='m'>\r\n\t\t\t\t\t\t\t<p class='legend'>" . eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_jumpmonthsM', 'Month') . ": ";
// months list
$lang = !empty($args['lang']) ? $args['lang'] : 'L1';
$__months = eventon_get_oneL_months($this->cal->evopt2[$lang]);
$count = 1;
foreach ($__months as $m) {
$_current = $focused_month_num == $count ? 'class="current set"' : null;
$jumper_content .= "<a data-val='{$count}' {$_current} title='" . eventon_return_timely_names_('month_num_to_name', $count, 'full', $lang) . "' >{$m}</a>";
$count++;
}
// if jumper offset is set
$__a = '';
$start_year = $focused_year - 2 + $jumper_offset;
$number_of_years = apply_filters('eventon_jumper_years_count', 6);
for ($x = 1; $x < $number_of_years; $x++) {
$__a .= '<a' . ($start_year == $focused_year ? " class='current set'" : null) . ' data-val="' . $start_year . '">' . $start_year . '</a>';
$start_year++;
}
$jumper_content .= "</p><div class='clear'></div></div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class='evo_j_years evo_j_dates' data-val='y'>\r\n\t\t\t\t\t\t\t<p class='legend'>" . eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_jumpmonthsY', 'Year') . ": " . $__a . "</p><div class='clear'></div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>";
}
// end jump months
// go to today or current month
$gototoday_content = '';
$gototoday_content .= "";
// above calendar buttons
$above_head = apply_filters('evo_cal_above_header_btn', array('evo-jumper-btn' => eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_jumpmonths', 'Jump Months'), 'evo-gototoday-btn' => eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_gototoday', 'Go to Today')), $args);
// update array based on whether jumper is active or not
if ($jumper != 'yes') {
unset($above_head['evo-jumper-btn']);
}
$above_heade_content = apply_filters('evo_cal_above_header_content', array('evo-jumper-btn' => $jumper_content, 'evo-gototoday-btn' => $gototoday_content), $args);
ob_start();
if (count($above_head) > 0) {
echo "<div class='evo_cal_above'>";
foreach ($above_head as $ff => $v) {
if ($ff == 'evo-gototoday-btn') {
echo "<span class='" . $ff . "' style='display:none' data-mo='{$focused_month_num}' data-yr='{$focused_year}' >" . $v . "</span>";
} else {
echo "<span class='" . $ff . "'>" . $v . "</span>";
}
}
echo "</div>";
// content for evo_cal_above
echo "<div class='evo_cal_above_content'>";
foreach ($above_heade_content as $cc) {
echo $cc;
}
echo "</div>";
}
return ob_get_clean();
}
示例2: get_terms
echo "<div class='row'>\n\t\t\t\t\t\t\t\t\t<p class='color_circle' data-hex='8c8c8c'></p>\n\t\t\t\t\t\t\t\t\t<p class='evoau_color_picker'>\n\t\t\t\t\t\t\t\t\t\t<input type='hidden' class='evcal_event_color' name='evcal_event_color'/>\n\t\t\t\t\t\t\t\t\t\t<input type='hidden' name='evcal_event_color_n' class='evcal_event_color_n' value='0'/>\n\t\t\t\t\t\t\t\t\t\t<label for='" . $__field_id . "'>" . $__field_name . "</label>\n\t\t\t\t\t\t\t\t\t</p>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>";
break;
case 'tax':
$terms = get_terms($field[1], array('hide_empty' => false));
if (count($terms) > 0) {
echo "<div class='row'>\n\t\t\t\t\t\t\t\t\t\t<p class='label'><label for='" . $__field_id . "'>" . $__field_name . "</label></p><p class='checkbox_row'>";
foreach ($terms as $term) {
echo "<span><input type='checkbox' name='" . $__field_id . "[]' value='" . $term->term_id . "'/> " . $term->name . "</span>";
}
echo "</p>\n\t\t\t\t\t\t\t\t\t</div>";
}
break;
case 'image':
echo "<div class='row'>\n\t\t\t\t\t\t\t\t\t<p class='label'><label for='" . $__field_id . "'>" . $__field_name . "</label></p>\n\t\t\t\t\t\t\t\t\t<p><input type='file' id='" . $__field_id . "' name='" . $__field_id . "' /></p>\n\t\t\t\t\t\t\t\t</div>";
break;
}
}
}
}
// Submit button
echo "<div class='submit_row row'><p><input id='evoau_submit' type='submit' value='" . eventon_get_custom_language($opt_2, 'evoAUL_se', 'Submit Event', $lang) . "'/></p></div>";
?>
</div>
<?php
}
?>
</form>
</div>
示例3: reused
/**
* reusable variables within the calendar
* @return
*/
public function reused()
{
$lang = !empty($this->cal->shortcode_args['lang']) ? $this->cal->shortcode_args['lang'] : 'L1';
// for each event type category
$ett_i18n_names = evo_get_localized_ettNames($lang, $this->cal->evopt1, $this->cal->evopt2);
for ($x = 1; $x < $this->cal->event_types; $x++) {
$ab = $x == 1 ? '' : $x;
$this->cal->lang_array['et' . $ab] = $ett_i18n_names[$x];
}
$this->cal->lang_array['no_event'] = eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_noeve', 'No Events', $lang);
$this->cal->lang_array['evcal_lang_yrrnd'] = eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_yrrnd', 'Year Around Event', $lang);
$this->cal->lang_array['evloc'] = eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_evloc', 'Event Location', $lang);
$this->cal->lang_array['evorg'] = eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_evorg', 'Event Organizer', $lang);
$this->cal->lang_array['evsme'] = eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_sme', 'Show More Events', $lang);
//print_r($this->lang_array);
}
示例4: _event_date
public function _event_date($event_id, $event_pmv = '')
{
global $eventon;
$time = $this->get_correct_times($event_id, $event_pmv = '');
$evcal_lang_allday = eventon_get_custom_language('', 'evcal_lang_allday', 'All Day');
$event_post_meta = !empty($event_pmv) ? $event_pmv : get_post_custom($event_id);
$date_array = $eventon->evo_generator->generate_time_('', '', $event_post_meta, $evcal_lang_allday, '', '', $time['start'], $time['end']);
return $date_array;
}
示例5: array
?>
</div><!-- .evoau_table-->
</div><!-- inner -->
<div class='evoau_json' style='display:none'><?php
$nofs = array('nof0' => !empty($this->evoau_opt['evoaun_msg_f']) ? $this->evoau_opt['evoaun_msg_f'] : __('Required fields missing', 'eventon'), 'nof1' => eventon_get_custom_language($opt_2, 'evoAUL_nof1', 'Required Feidls Missing', $lang), 'nof2' => eventon_get_custom_language($opt_2, 'evoAUL_nof2', 'Invalid validation code please try again', $lang), 'nof3' => eventon_get_custom_language($opt_2, 'evoAUL_nof3', 'Thank you for submitting your event!', $lang), 'nof4' => eventon_get_custom_language($opt_2, 'evoAUL_nof4', 'Could not create event post, try again later!', $lang), 'nof5' => eventon_get_custom_language($opt_2, 'evoAUL_nof5', 'Bad nonce form verification, try again!', $lang), 'nof6' => eventon_get_custom_language($opt_2, 'evoAUL_nof6', 'You can only submit one event!', $lang));
echo json_encode($nofs);
?>
</div>
<div class='evoau_success_msg' style='display:<?php
echo $LIMITSUB ? 'block' : 'none';
?>
'><p><b></b><?php
echo $LIMITSUB ? eventon_get_custom_language($opt_2, 'evoAUL_nof6', 'You can only submit one event!', $lang) : '';
?>
</p></div>
<?php
if ($_msub) {
?>
<p class='msub_row' style='display:none;text-align:center'><a id='evoau_msub' class='msub evcal_btn'><?php
echo evo_lang('Submit another event', $lang, $opt_2);
?>
</a></p>
<?php
}
?>
<?php
}
// close if $LOGINCHECK
示例6: eventon_get_custom_language
</tr>
<?php
}
?>
</tbody>
</table>
<div class="single_variation_wrap evotx_orderonline_add_cart" style="display:none;">
<div class="single_variation"></div>
<div class="variations_button">
<a class='evcal_btn evoAddToCart variable_add_to_cart_button' data-product_id='<?php
echo $woo_product_id;
?>
'><?php
echo eventon_get_custom_language($opt, 'evoTX_002', 'Add to Cart');
?>
</a>
<input type="hidden" name="variation_id" value="" />
<?php
woocommerce_quantity_input(array(), $product);
?>
<input type="hidden" name="add-to-cart" value="<?php
echo $product->id;
?>
" />
<input type="hidden" name="product_id" value="<?php
echo esc_attr($woo_product_id);
?>
" />
<div class="clear"></div>
示例7: eventon_get_eventtop_print
/**
* Event Top section
* process content as html output
* @since eventon 2.4.8
* @version 0.1
*/
function eventon_get_eventtop_print($array, $evOPT, $evOPT2)
{
$OT = '';
$_additions = apply_filters('evo_eventtop_adds', array());
foreach ($array as $element => $elm) {
// convert to an object
$object = new stdClass();
foreach ($elm as $key => $value) {
$object->{$key} = $value;
}
$boxname = in_array($element, $_additions) ? $element : null;
switch ($element) {
case has_filter("eventon_eventtop_{$boxname}"):
$helpers = array('evOPT' => $evOPT, 'evoOPT2' => $evOPT2);
$OT .= apply_filters("eventon_eventtop_{$boxname}", $object, $helpers);
break;
case 'ft_img':
$url = !empty($object->url_med) ? $object->url_med : $object->url;
$url = apply_filters('eventon_eventtop_image_url', $url);
$OT .= "<span class='ev_ftImg' data-img='" . (!empty($object->url_full) ? $object->url_full[0] : '') . "' data-thumb='" . $url . "' style='background-image:url(" . $url . ")'></span>";
break;
case 'day_block':
$OT .= "<span class='evcal_cblock " . ($object->yearlong ? 'yrl ' : null) . ($object->monthlong ? 'mnl ' : null) . "' data-bgcolor='" . $object->color . "' data-smon='" . $object->start['F'] . "' data-syr='" . $object->start['Y'] . "'>";
if ($object->showyear == 'yes') {
$OT .= "<em class='evo_year' >" . $object->start['Y'] . '</em>';
}
$OT .= "<em class='evo_date' >" . $object->day_name . $object->html['html_date'] . '</em>';
$OT .= "<span class='evo_time'>" . $object->html['html_time'] . "</span>";
$OT .= "<em class='clear'></em></span>";
break;
// title section of the event top
// title section of the event top
case 'titles':
$show_widget_eventtops = !empty($evOPT['evo_widget_eventtop']) && $evOPT['evo_widget_eventtop'] == 'yes' ? '' : 'hide_eventtopdata ';
$OT .= "<span class='evcal_desc evo_info " . $show_widget_eventtops . ($object->yearlong ? 'yrl ' : null) . ($object->monthlong ? 'mnl ' : null) . "' {$object->loc_vars} >";
// above title inserts
$OT .= "<span class='evo_above_title'>";
$OT .= apply_filters("eventon_eventtop_abovetitle", '', $object);
if ($object->cancel) {
$OT .= "<span class='evo_event_headers canceled' title='" . (!empty($object->cancel_reason) ? $object->cancel_reason : null) . "'>" . eventon_get_custom_language($evOPT2, 'evcal_evcard_evcancel', 'Event Cancelled') . "</span>";
}
$OT .= "</span>";
// event edit button
$editBTN = '';
if (current_user_can('manage_options') && !empty($evOPT['evo_showeditevent']) && $evOPT['evo_showeditevent'] == 'yes') {
$editBTN = "<i href='" . get_edit_post_link($object->eventid) . "' class='editEventBtnET fa fa-pencil'></i>";
}
$OT .= "<span class='evcal_desc2 evcal_event_title' itemprop='name'>" . $object->title . $editBTN . "</span>";
// below title inserts
$OT .= "<span class='evo_below_title'>";
if ($object->subtitle) {
$OT .= "<span class='evcal_event_subtitle' >" . $object->subtitle . "</span>";
}
$OT .= "</span>";
break;
case 'belowtitle':
$OT .= "<span class='evcal_desc_info' >";
// time
if ($object->fields_ && in_array('time', $object->fields)) {
$OT .= "<em class='evcal_time'>" . $object->html['html_fromto'] . (!empty($object->timezone) ? ' <em class="evo_etop_timezone">' . $object->timezone . '</em>' : null) . "</em> ";
}
// location information
if ($object->fields_) {
// location name
$LOCname = in_array('locationame', $object->fields) && $object->locationname ? $object->locationname : false;
// location address
$LOCadd = in_array('location', $object->fields) && !empty($object->locationaddress) ? $object->locationaddress : false;
if ($LOCname || $LOCadd) {
$OT .= '<em class="evcal_location" ' . ($object->lonlat ? $object->lonlat : null) . ' data-add_str="' . $LOCadd . '">' . ($LOCname ? '<em class="event_location_name">' . $LOCname . '</em>' : '') . ($LOCname && $LOCadd ? ', ' : '') . $LOCadd . '</em>';
}
}
$OT .= "</span>";
$OT .= "<span class='evcal_desc3'>";
//organizer
$org = $object->organizer_name ? $object->organizer_name : (!empty($object->evvals['evcal_organizer']) ? $object->evvals['evcal_organizer'][0] : false);
if ($object->fields_ && in_array('organizer', $object->fields) && $org) {
$OT .= "<em class='evcal_oganizer'><i>" . eventon_get_custom_language($evOPT2, 'evcal_evcard_org', 'Event Organized By') . ':</i> ' . $org . "</em>";
}
//event type
if ($object->tax) {
$OT .= $object->tax;
}
// event tags
if ($object->fields_ && in_array('tags', $object->fields) && !empty($object->tags)) {
$OT .= "<span class='evo_event_tags'>\n\t\t\t\t\t\t<em><i>" . eventon_get_custom_language($evOPT2, 'evo_lang_eventtags', 'Event Tags') . "</i></em>";
$count = count($object->tags);
$i = 1;
foreach ($object->tags as $tag) {
$OT .= "<em data-tagid='{$tag->term_id}'>{$tag->name}" . ($count == $i ? '' : ',') . "</em>";
$i++;
}
$OT .= "</span>";
}
// custom fields
//.........这里部分代码省略.........
示例8: html_yesnobtn
function html_yesnobtn($args = '')
{
$defaults = array('id' => '', 'var' => '', 'no' => '', 'default' => '', 'input' => false, 'inputAttr' => '', 'label' => '', 'guide' => '', 'guide_position' => '', 'abs' => 'no', 'attr' => '', 'afterstatement' => '', 'lang' => 'L1');
$args = shortcode_atts($defaults, $args);
$_attr = $no = '';
if (!empty($args['var'])) {
$no = $args['var'] == 'yes' ? null : (!empty($args['default']) && $args['default'] == 'yes' ? null : 'NO');
} else {
$no = !empty($args['default']) && $args['default'] == 'yes' ? null : 'NO';
}
if (!empty($args['attr'])) {
foreach ($args['attr'] as $at => $av) {
$_attr .= $at . '="' . $av . '" ';
}
}
// input field
$input = '';
if ($args['input']) {
$input_value = !empty($args['var']) ? $args['var'] : (!empty($args['default']) ? $args['default'] : 'no');
// Attribut values for input field
$inputAttr = '';
if (!empty($args['inputAttr'])) {
foreach ($args['inputAttr'] as $at => $av) {
$inputAttr .= $at . '="' . $av . '" ';
}
}
// input field
$input = "<input {$inputAttr} type='hidden' name='{$args['id']}' value='{$input_value}'/>";
}
$guide = '';
if (!empty($args['guide'])) {
$guide = $this->tooltips($args['guide'], $args['guide_position']);
}
$label = '';
if (!empty($args['label'])) {
$label = "<label class='ajde_yn_btn_label' for='{$args['id']}'>{$args['label']}{$guide}</label>";
}
$text_NO = eventon_get_custom_language($this->opt2, 'evo_lang_no', 'NO', $args['lang']);
$text_YES = eventon_get_custom_language($this->opt2, 'evo_lang_yes', 'YES', $args['lang']);
return '<span id="' . $args['id'] . '" class="ajde_yn_btn ' . ($no ? 'NO' : null) . '' . ($args['abs'] == 'yes' ? ' absolute' : null) . '" ' . $_attr . ' data-afterstatement="' . $args['afterstatement'] . '"><span class="btn_inner" style=""><em class="no">' . $text_NO . '</em><span class="catchHandle"></span><em class="yes">' . $text_YES . '</em></span></span>' . $input . $label;
}
示例9: eventon_get_cal_sortbar
/** out put just the sort bar for the calendar */
public function eventon_get_cal_sortbar($args, $sortbar = true)
{
// define variable values
$sorting_options = !empty($this->evopt1['evcal_sort_options']) ? $this->evopt1['evcal_sort_options'] : null;
$filtering_options = !empty($this->evopt1['evcal_filter_options']) ? $this->evopt1['evcal_filter_options'] : array();
$content = '';
$this->reused();
// update reusable variables real quikc
// START the magic
ob_start();
// IF sortbar is set to be shown
if ($sortbar) {
echo $this->evcal_hide_sort != 'yes' ? "<a class='evo_sort_btn'>" . eventon_get_custom_language($this->evopt2, 'evcal_lang_sopt', 'Sort Options') . "</a>" : null;
}
// expand sort section by default or not
$SO_display = !empty($args['exp_so']) && $args['exp_so'] == 'yes' ? 'block' : 'none';
echo "<div class='eventon_sorting_section' style='display:{$SO_display}'>";
if ($this->evcal_hide_sort != 'yes') {
// if sort bar is set to show
// sorting section
$evsa1 = array('date' => 'Date', 'title' => 'Title', 'color' => 'Color');
$sort_options = array(1 => 'sort_date', 'sort_title', 'sort_color');
$__sort_key = substr($args['sort_by'], 5);
echo "\n\t\t\t\t\t<div class='eventon_sort_line evo_sortOpt' >\n\t\t\t\t\t\t<div class='evo_sortby'><p>" . eventon_get_custom_language($this->evopt2, 'evcal_lang_sort', 'Sort By') . ":</p></div>\n\t\t\t\t\t\t<div class='evo_srt_sel'><p class='fa'>" . eventon_get_custom_language($this->evopt2, 'evcal_lang_s' . $__sort_key, $__sort_key) . "</p>";
if (!empty($sorting_options)) {
echo "<div class='evo_srt_options'>";
$cnt = 1;
if (is_array($sorting_options)) {
foreach ($evsa1 as $so => $sov) {
if (in_array($so, $sorting_options) || $so == 'date') {
echo "<p data-val='sort_" . $so . "' data-type='" . $so . "' class='evs_btn " . ($args['sort_by'] == $sort_options[$cnt] ? 'evs_hide' : null) . "' >" . eventon_get_custom_language($this->evopt2, 'evcal_lang_s' . $so, $sov) . "</p>";
}
$cnt++;
}
}
echo "</div>";
}
// endif;
echo "</div>";
echo "<div class='clear'></div>\n\t\t\t\t\t</div>";
}
$__text_all_ = eventon_get_custom_language($this->evopt2, 'evcal_lang_all', 'All');
// filtering options array
$_filter_array = array('evloc' => 'event_location', 'evorg' => 'event_organizer');
// EACH EVENT TYPE
$__event_types = $this->shell->get_event_types();
foreach ($__event_types as $ety => $event_type) {
$_filter_array[$ety] = $event_type;
}
// hook for additional filters
$_filter_array = apply_filters('eventon_so_filters', $_filter_array);
// filtering section
echo "<div class='eventon_filter_line'>";
foreach ($_filter_array as $ff => $vv) {
// vv = event_type etc.
if (in_array($vv, $filtering_options)) {
// filtering value filter is set to show
//print_r($cats);
$inside = '';
// check whether this filter type value passed
if ($args[$vv] == 'all') {
// show all filter type
$__filter_val = 'all';
$__text_all = $__text_all_;
$inside .= "<p class='evf_hide' data-filter_val='all'>{$__text_all}</p>";
$cats = get_categories(array('taxonomy' => $vv));
foreach ($cats as $ct) {
$inside .= "<p data-filter_val='" . $ct->term_id . "' data-filter_slug='" . $ct->slug . "'>" . $ct->name . "</p>";
}
} else {
$__filter_val = !empty($args[$vv]) ? $args[$vv] : 'all';
$__text_all = get_term_by('id', $args[$vv], $vv, ARRAY_N);
$__text_all = $__text_all[1];
$inside .= "<p class='evf_hide' data-filter_val='{$args[$vv]}'>{$__text_all}</p>";
$cats = get_categories(array('taxonomy' => $vv));
$inside .= "<p data-filter_val='all'>{$__text_all_}</p>";
foreach ($cats as $ct) {
if ($ct->term_id != $__filter_val) {
$inside .= "<p data-filter_val='" . $ct->term_id . "' data-filter_slug='" . $ct->slug . "'>" . $ct->name . "</p>";
}
}
}
// only for event type taxonomies
$_isthis_ett = in_array($vv, $__event_types) ? true : false;
$ett_count = $ff == 1 ? '' : $ff;
$lang__ = $_isthis_ett ? $this->lang_array['et' . $ett_count] : $this->lang_array[$ff];
echo "<div class='eventon_filter evo_sortOpt' data-filter_field='{$vv}' data-filter_val='{$__filter_val}' data-filter_type='tax' data-fl_o='IN'>\n\t\t\t\t\t\t\t<div class='eventon_sf_field'><p>" . $lang__ . ":</p></div>\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class='eventon_filter_selection'>\n\t\t\t\t\t\t\t\t<p class='filtering_set_val' data-opts='evs4_in'>{$__text_all}</p>\n\t\t\t\t\t\t\t\t<div class='eventon_filter_dropdown' style='display:none'>";
echo $inside;
echo "</div>\n\t\t\t\t\t\t\t</div><div class='clear'></div>\n\t\t\t\t\t\t</div>";
} else {
// if not tax values is passed
if (!empty($args[$vv])) {
$taxFL = eventon_tax_filter_pro($args[$vv]);
echo "<div class='eventon_filter' data-filter_field='{$vv}' data-filter_val='{$taxFL[0]}' data-filter_type='tax' data-fl_o='{$taxFL[1]}'></div>";
}
}
}
// (---) Hook for addon
if (has_action('eventon_sorting_filters')) {
//.........这里部分代码省略.........
示例10: eventon_get_eventtop_print
/**
* Event Top section
* process content as html output
* @since eventon 2.3.7
* @version 0.1
*/
function eventon_get_eventtop_print($array, $evOPT, $evOPT2)
{
$OT = '';
$_additions = apply_filters('evo_eventtop_adds', array());
foreach ($array as $element => $elm) {
// convert to an object
$object = new stdClass();
foreach ($elm as $key => $value) {
$object->{$key} = $value;
}
$boxname = in_array($element, $_additions) ? $element : null;
switch ($element) {
case has_filter("eventon_eventtop_{$boxname}"):
$helpers = array('evOPT' => $evOPT, 'evoOPT2' => $evOPT2);
$OT .= apply_filters("eventon_eventtop_{$boxname}", $object, $helpers);
break;
case 'ft_img':
$url = !empty($object->url_med) ? $object->url_med : $object->url;
$OT .= "<span class='ev_ftImg' style='background-image:url(" . $url . ")'></span>";
break;
case 'day_block':
$OT .= "<span class='evcal_cblock' data-bgcolor='" . $object->color . "' data-smon='" . $object->start['F'] . "' data-syr='" . $object->start['Y'] . "'><em class='evo_date' >" . $object->day_name . $object->html['html_date'] . '</em>';
$OT .= "<em class='evo_time'>" . $object->html['html_time'] . "</em>";
$OT .= "<em class='clear'></em></span>";
break;
case 'titles':
$OT .= "<span class='evcal_desc evo_info " . ($object->yearlong ? 'yrl' : null) . "' {$object->loc_vars} >";
if ($object->cancel) {
$OT .= "<span class='evo_event_headers canceled' title='" . (!empty($object->cancel_reason) ? $object->cancel_reason : null) . "'>" . eventon_get_custom_language($evOPT2, 'evcal_evcard_evcancel', 'Event Cancelled') . "</span>";
}
$OT .= "<span class='evcal_desc2 evcal_event_title' itemprop='name'>" . $object->title . "</span>";
if ($object->subtitle) {
$OT .= "<span class='evcal_event_subtitle' >" . $object->subtitle . "</span>";
}
break;
case 'belowtitle':
$OT .= "<span class='evcal_desc_info' >";
// time
if ($object->fields_ && in_array('time', $object->fields)) {
$OT .= "<em class='evcal_time'>" . $object->html['html_fromto'] . (!empty($object->timezone) ? ' <em class="evo_etop_timezone">' . $object->timezone . '</em>' : null) . "</em> ";
}
//location
if ($object->fields_ && in_array('location', $object->fields) && !empty($object->location)) {
$OT .= $object->location;
}
//location name
if ($object->fields_ && in_array('locationame', $object->fields) && $object->locationname) {
$OT .= '<em class="evcal_location event_location_name">' . stripslashes($object->locationname) . '</em>';
}
$OT .= "</span>";
$OT .= "<span class='evcal_desc3'>";
//organizer
$org = !empty($object->evvals['evcal_organizer']) ? $object->evvals['evcal_organizer'][0] : '';
if ($object->fields_ && in_array('organizer', $object->fields) && !empty($org)) {
$OT .= "<em class='evcal_oganizer'><i>" . eventon_get_custom_language($evOPT2, 'evcal_evcard_org', 'Event Organized By') . ':</i> ' . $org . "</em>";
}
//event type
if ($object->tax) {
$OT .= $object->tax;
}
// event tags
if ($object->fields_ && in_array('tags', $object->fields) && !empty($object->tags)) {
$OT .= "<span class='evo_event_tags'>\r\n\t\t\t\t\t\t<em><i>" . eventon_get_custom_language($evOPT2, 'evo_lang_eventtags', 'Event Tags') . "</i></em>";
$count = count($object->tags);
$i = 1;
foreach ($object->tags as $tag) {
$OT .= "<em data-tagid='{$tag->term_id}'>{$tag->name}" . ($count == $i ? '' : ',') . "</em>";
$i++;
}
$OT .= "</span>";
}
// custom fields
for ($x = 1; $x < $object->cmdcount + 1; $x++) {
if ($object->fields_ && in_array('cmd' . $x, $object->fields) && !empty($object->evvals['_evcal_ec_f' . $x . 'a1_cus'])) {
$def = $evOPT['evcal_ec_f' . $x . 'a1'];
// default custom meta field name
$i18n_nam = eventon_get_custom_language($evOPT2, 'evcal_cmd_' . $x, $def);
$OT .= ($x == 1 ? "<b class='clear'></b>" : null) . "<em class='evcal_cmd'><i>" . $i18n_nam . ':</i> ' . $object->evvals['_evcal_ec_f' . $x . 'a1_cus'][0] . "</em> ";
}
}
break;
case 'close1':
$OT .= "</span>";
// span.evcal_desc3
break;
case 'close2':
$OT .= "</span>";
// span.evcal_desc
$OT .= "<em class='clear'></em>";
break;
}
}
return $OT;
}
示例11: lang
function lang($variable, $default_text, $lang = '')
{
return eventon_get_custom_language($this->opt2, $variable, $default_text, $lang);
}
示例12: site_url
}
if ($email) {
?>
<tr>
<td style='padding:20px; text-align:left;border-top:1px dashed #d1d1d1; font-style:italic; color:#ADADAD'>
<?php
$__link = !empty($evo_options['evors_contact_link']) ? $evo_options['evors_contact_link'] : site_url();
?>
<p style='<?php
echo $__sty_lh . $__sty_m0;
?>
'><?php
echo eventon_get_custom_language($evo_options_2, 'evoTX_007', 'We look forward to seeing you!');
?>
</p>
<p style='<?php
echo $__sty_lh . $__sty_m0;
?>
'><a style='' href='<?php
echo $__link;
?>
'><?php
echo eventon_get_custom_language($evo_options_2, 'evoTX_008', 'Contact Us for questions and concerns');
?>
</a></p>
</td>
</tr>
<?php
}
?>
</table>
示例13: eventon_eventcard_print
/**
* event card content processed and output as html
* @version 2.3.21
*/
function eventon_eventcard_print($array, $evOPT, $evoOPT2)
{
global $eventon;
$evoOPT2 = !empty($evoOPT2) ? $evoOPT2 : '';
$OT = '';
$count = 1;
$items = count($array);
// close button
$close = "<div class='evcal_evdata_row evcal_close' title='" . eventon_get_custom_language($evoOPT2, 'evcal_lang_close', 'Close') . "'></div>";
// additional fields array
$_additions = apply_filters('evo_eventcard_adds', array());
// FOR each
foreach ($array as $box_f => $box) {
$end = $count == $items ? $close : null;
$end_row_class = $count == $items ? ' lastrow' : null;
// convert to an object
$object = new stdClass();
foreach ($box as $key => $value) {
$object->{$key} = $value;
}
$boxname = in_array($box_f, $_additions) ? $box_f : null;
//echo($box_f.' ');
//print_r($boxname);
//$OT.="".$items.'-'.$count." ".$box_f;
// each eventcard type
switch ($box_f) {
// addition
case has_filter("eventon_eventCard_{$boxname}"):
$helpers = array('evOPT' => $evOPT, 'evoOPT2' => $evoOPT2, 'end_row_class' => $end_row_class, 'end' => $end);
$OT .= apply_filters("eventon_eventCard_{$boxname}", $object, $helpers);
break;
// Event Details
// Event Details
case 'eventdetails':
// check if character length of description is longer than X size
if (!empty($evOPT['evo_morelass']) && $evOPT['evo_morelass'] != 'yes' && strlen($object->fulltext) > 600) {
$more_code = "<div class='eventon_details_shading_bot'>\r\n\t\t\t\t\t\t\t\t<p class='eventon_shad_p' content='less'><span class='ev_more_text' data-txt='" . eventon_get_custom_language($evoOPT2, 'evcal_lang_less', 'less') . "'>" . eventon_get_custom_language($evoOPT2, 'evcal_lang_more', 'more') . "</span><span class='ev_more_arrow'></span></p>\r\n\t\t\t\t\t\t\t</div>";
$evo_more_active_class = 'shorter_desc';
} else {
$more_code = '';
$evo_more_active_class = '';
}
$OT .= "<div class='evo_metarow_details evorow evcal_evdata_row bordb evcal_event_details" . $end_row_class . "'>\r\n\t\t\t\t\t\t\t" . $object->excerpt . "\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_001', 'fa-align-justify', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell " . $evo_more_active_class . "'>" . $more_code . "<div class='eventon_full_description'>\r\n\t\t\t\t\t\t\t\t\t<h3 class='padb5 evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_details', 'Event Details') . "</h3><div class='eventon_desc_in' itemprop='description'>\r\n\t\t\t\t\t\t\t\t\t" . $eventon->frontend->filter_evo_content($object->fulltext) . "</div>";
// pluggable inside event details
do_action('eventon_eventcard_event_details');
$OT .= "<div class='clear'></div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t" . $end . "</div>";
break;
// TIME and LOCATION
// TIME and LOCATION
case 'timelocation':
if ($object->address || $object->location_name) {
$timezone = !empty($object->timezone) ? ' <em class="evo_eventcard_tiemzone">' . $object->timezone . '</em>' : null;
$locationLink = !empty($object->location_link) ? '<a target="_blank" href="' . $object->location_link . '">' : false;
$OT .= "<div class='evo_metarow_time_location evorow bordb" . $end_row_class . " '>\r\n\t\t\t\t\t\t<div class='tb' >\r\n\t\t\t\t\t\t\t<div class='tbrow'>\r\n\t\t\t\t\t\t\t<div class='evcal_col50 bordr'>\r\n\t\t\t\t\t\t\t\t<div class='evcal_evdata_row evo_time'>\r\n\t\t\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_002', 'fa-clock-o', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_lang_time', 'Time') . "</h3><p>" . $object->timetext . $timezone . "</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div><div class='evcal_col50'>\r\n\t\t\t\t\t\t\t\t<div class='evcal_evdata_row evo_location'>\r\n\t\t\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_003', 'fa-map-marker', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t\t\t<div class='evcal_evdata_cell' data-loc_tax_id='{$object->locTaxID}'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . ($locationLink ? $locationLink : '') . eventon_get_custom_language($evoOPT2, 'evcal_lang_location', 'Location') . ($locationLink ? '</a>' : '') . "</h3>" . (!empty($object->location_name) ? "<p class='evo_location_name'>" . stripslashes($object->location_name) . "</p>" : null) . "<p>" . (!empty($object->address) ? stripslashes($object->address) : null) . "</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div><div class='clear'></div>\r\n\t\t\t\t\t\t\t</div></div>\r\n\t\t\t\t\t\t" . $end . "</div>";
} else {
// time only
$OT .= "<div class='evo_metarow_time evorow evcal_evdata_row bordb evcal_evrow_sm " . $end_row_class . "'>\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_002', 'fa-clock-o', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_lang_time', 'Time') . "</h3><p>" . $object->timetext . "</p>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t" . $end . "</div>";
}
break;
// REPEAT SERIES
// REPEAT SERIES
case 'repeats':
$OT .= "<div class='evo_metarow_repeats evorow evcal_evdata_row bordb evcal_evrow_sm " . $end_row_class . "'>\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_repeats', 'fa-repeat', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_lang_repeats', 'Future Event Times in this Repeating Event Series') . "</h3>\r\n\t\t\t\t\t\t\t\t<p class='evo_repeat_series_dates'>";
foreach ($object->future_intervals as $interval) {
$OT .= "<span>" . date($object->date_format . ' ' . $object->time_format, $interval[0]) . "</span>";
}
$OT .= "</p></div>" . $end . "</div>";
break;
// Location Image
// Location Image
case 'locImg':
$img_src = wp_get_attachment_image_src($object->id, 'full');
$fullheight = (int) $object->fullheight;
if (!empty($img_src)) {
// text over location image
$inside = '';
if (!empty($object->locName)) {
$inner = !empty($object->locAdd) ? '<span>' . $object->locAdd . '</span>' : null;
$inside = "<p class='evoLOCtxt'>{$object->locName}{$inner}</p>";
}
$OT .= "<div class='evo_metarow_locImg evorow bordb " . (!empty($inside) ? 'tvi' : null) . "' style='height:{$fullheight}px; background-image:url(" . $img_src[0] . ")' id='" . $object->id . "_locimg' >{$inside}</div>";
}
break;
// GOOGLE map
// GOOGLE map
case 'gmap':
$OT .= "<div class='evo_metarow_gmap evorow evcal_gmaps bordb ' id='" . $object->id . "_gmap' style='max-width:none'></div>";
break;
// Featured image
// Featured image
case 'ftimage':
$__hoverclass = !empty($object->hovereffect) && $object->hovereffect != 'yes' ? ' evo_imghover' : null;
$__noclickclass = !empty($object->clickeffect) && $object->clickeffect == 'yes' ? ' evo_noclick' : null;
$__zoom_cursor = !empty($evOPT['evo_ftim_mag']) && $evOPT['evo_ftim_mag'] == 'yes' ? ' evo_imgCursor' : null;
// if set to direct image
if (!empty($evOPT['evo_ftimg_height_sty']) && $evOPT['evo_ftimg_height_sty'] == 'direct') {
//.........这里部分代码省略.........
示例14: lang
function lang($var, $default)
{
$lang = !empty($this->shortcode_args['lang']) ? $this->shortcode_args['lang'] : 'L1';
return eventon_get_custom_language($this->evopt2, $var, $default, $lang);
}
示例15: frontend_box
function frontend_box($object, $helpers)
{
global $evotx, $woocommerce;
$txmeta = get_post_custom($object->event_id);
// not show event tickets if tickets to show only for loggedin users
if (!empty($evotx->evotx_opt['evotx_loggedinuser']) && $evotx->evotx_opt['evotx_loggedinuser'] == 'yes' && !is_user_logged_in()) {
return;
}
if (!empty($txmeta['evotx_tix']) && $txmeta['evotx_tix'][0] == 'yes') {
// get options array
$woo_product_id = $txmeta['tx_woocommerce_product_id'][0];
$woometa = get_post_custom($woo_product_id);
$opt = $helpers['evoOPT2'];
ob_start();
?>
<div class='evorow evcal_evdata_row bordb evcal_evrow_sm evo_metarow_tix <?php
echo $helpers['end_row_class'];
?>
' data-tx='' data-event_id='<?php
echo $object->event_id;
?>
' data-ri='<?php
echo $object->repeat_interval;
?>
'>
<span class='evcal_evdata_icons'><i class='fa <?php
echo get_eventON_icon('evcal__evotx_001', 'fa-tags', $helpers['evOPT']);
?>
'></i></span>
<div class='evcal_evdata_cell'>
<h3 class='evo_h3'><?php
echo eventon_get_custom_language($opt, 'evoTX_001', 'Ticket Section Title');
?>
</h3>
<p class='evo_data_val'><?php
echo evo_meta($woometa, '_tx_text');
?>
</p>
<?php
// ticket image id - if exists
$_tix_image_id = !empty($txmeta['_tix_image_id']) ? $txmeta['_tix_image_id'][0] : false;
?>
<div class='evoTX_wc <?php
echo $_tix_image_id ? 'tximg' : '';
?>
' data-si='<?php
echo !empty($woometa['_sold_individually']) ? $woometa['_sold_individually'][0] : '-';
?>
' >
<div class='evoTX_wc_section'>
<?php
$_repeat_in_stock = true;
$capacity_of_this_repeat = 'none';
// check if capacity managed by repeat intervals of event
if (evo_check_yn($txmeta, '_manage_repeat_cap') && evo_check_yn($txmeta, 'evcal_repeat') && !empty($txmeta['repeat_intervals']) && !empty($txmeta['ri_capacity']) && $product->product_type == 'simple') {
$ri_capacity = unserialize($txmeta['ri_capacity'][0]);
$capacity_of_this_repeat = isset($ri_capacity[$object->repeat_interval]) ? $ri_capacity[$object->repeat_interval] : 0;
$_repeat_in_stock = $capacity_of_this_repeat == 0 ? false : true;
}
// get the woocommerce product
$_pf = new WC_Product_Factory();
$product = $_pf->get_product($woo_product_id);
if (!$_repeat_in_stock || !empty($woometa['_stock_status']) && $woometa['_stock_status'][0] == 'outofstock') {
echo "<p class='evotx_soldout'>" . eventon_get_custom_language($opt, 'evoTX_012', 'Sold Out!') . "</p>";
} else {
// SIMPLE product
if ($product->product_type == 'simple') {
$url = $evotx->addon_data['plugin_path'] . '/templates/template-add-to-cart-single.php';
include $url;
}
// end simple product
// VARIABLE Product
if ($product->product_type == 'variable') {
include $evotx->addon_data['plugin_path'] . '/templates/template-add-to-cart-variable.php';
}
}
// is_in_stock()
?>
<?php
// show remaining tickets or not
if ($_repeat_in_stock && evo_check_yn($txmeta, '_show_remain_tix') && evo_check_yn($woometa, '_manage_stock') && !empty($woometa['_stock']) && $woometa['_stock_status'][0] == 'instock' && (!empty($txmeta['remaining_count']) && (int) $txmeta['remaining_count'][0] >= $woometa['_stock'][0] || empty($txmeta['remaining_count'])) && $product->product_type == 'simple') {
// get the remaining ticket
// count for event
// show this remaining total only for simple events
$remaining_count = $capacity_of_this_repeat != 'none' ? $capacity_of_this_repeat : $woometa['_stock'][0];
$remaining_count = (int) $remaining_count;
echo "<p class='evotx_remaining' data-count='{$remaining_count}'><span>" . $remaining_count . "</span> " . eventon_get_custom_language($opt, 'evoTX_013', 'Tickets remaining!') . "</p>";
}
?>
<?php
// inquire before buy form
include 'html-ticket-inquery.php';
?>
//.........这里部分代码省略.........