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


PHP em_get_currency_symbol函数代码示例

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


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

示例1: em_get_currency_formatted

function em_get_currency_formatted($price, $currency = false, $format = false)
{
    $formatted_price = '';
    if (!$format) {
        $format = get_option('dbem_bookings_currency_format', '@#');
    }
    if (!$currency) {
        $currency = get_option('dbem_bookings_currency');
    }
    $formatted_price = str_replace('@', em_get_currency_symbol(true, $currency), $format);
    $formatted_price = str_replace('#', number_format($price, 2, get_option('dbem_bookings_currency_decimal_point', '.'), get_option('dbem_bookings_currency_thousands_sep', ',')), $formatted_price);
    return apply_filters('em_get_currency_formatted', $formatted_price, $price, $currency, $format);
}
开发者ID:KhanMaytok,项目名称:events-manager,代码行数:13,代码来源:em-functions.php

示例2: em_admin_options_page


//.........这里部分代码省略.........
        ?>
"><br /></div><h3><span><?php 
        echo sprintf(__('%s Options', 'dbem'), __('General', 'dbem'));
        ?>
 </span></h3>
				<div class="inside">
					<table class='form-table'> 
						<?php 
        em_options_radio_binary(__('Allow guest bookings?', 'dbem'), 'dbem_bookings_anonymous', __('If enabled, guest visitors can supply an email address and a user account will automatically be created for them along with their booking. They will be also be able to log back in with that newly created account.', 'dbem'));
        em_options_radio_binary(__('Approval Required?', 'dbem'), 'dbem_bookings_approval', __('Bookings will not be confirmed until the event administrator approves it.', 'dbem'));
        em_options_radio_binary(__('Reserved unconfirmed spaces?', 'dbem'), 'dbem_bookings_approval_reserved', __('By default, event spaces become unavailable once there are enough CONFIRMED bookings. To reserve spaces even if unnapproved, choose yes.', 'dbem'));
        em_options_radio_binary(__('Can users cancel their booking?', 'dbem'), 'dbem_bookings_user_cancellation', __('If enabled, users can cancel their bookings themselves from their bookings page.', 'dbem'));
        em_options_radio_binary(__('Allow overbooking when approving?', 'dbem'), 'dbem_bookings_approval_overbooking', __('If you get a lot of pending bookings and you decide to allow more bookings than spaces allow, setting this to yes will allow you to override the event space limit when manually approving.', 'dbem'));
        em_options_radio_binary(__('Allow double bookings?', 'dbem'), 'dbem_bookings_double', __('If enabled, users can book an event more than once.', 'dbem'));
        echo $save_button;
        ?>
					</table>
				</div> <!-- . inside -->
				</div> <!-- .postbox -->
				
				<div  class="postbox " >
				<div class="handlediv" title="<?php 
        __('Click to toggle', 'dbem');
        ?>
"><br /></div><h3><span><?php 
        echo sprintf(__('%s Options', 'dbem'), __('Pricing', 'dbem'));
        ?>
 </span></h3>
				<div class="inside">
					<table class='form-table'>
						<?php 
        /* Tax & Currency */
        em_options_select(__('Currency', 'dbem'), 'dbem_bookings_currency', em_get_currencies()->names, __('Choose your currency for displaying event pricing.', 'dbem'));
        em_options_input_text(__('Thousands Separator', 'dbem'), 'dbem_bookings_currency_thousands_sep', '<code>' . get_option('dbem_bookings_currency_thousands_sep') . " = " . em_get_currency_symbol() . '100<strong>' . get_option('dbem_bookings_currency_thousands_sep') . '</strong>000<strong>' . get_option('dbem_bookings_currency_decimal_point') . '</strong>00</code>');
        em_options_input_text(__('Decimal Point', 'dbem'), 'dbem_bookings_currency_decimal_point', '<code>' . get_option('dbem_bookings_currency_decimal_point') . " = " . em_get_currency_symbol() . '100<strong>' . get_option('dbem_bookings_currency_decimal_point') . '</strong>00</code>');
        em_options_input_text(__('Currency Format', 'dbem'), 'dbem_bookings_currency_format', __('Choose how prices are displayed. <code>@</code> will be replaced by the currency symbol, and <code>#</code> will be replaced by the number.', 'dbem') . ' <code>' . get_option('dbem_bookings_currency_format') . " = " . em_get_currency_formatted('10000000') . '</code>');
        em_options_input_text(__('Tax Rate', 'dbem'), 'dbem_bookings_tax', __('Add a tax rate to your ticket prices (entering 10 will add 10% to the ticket price).', 'dbem'));
        em_options_radio_binary(__('Add tax to ticket price?', 'dbem'), 'dbem_bookings_tax_auto_add', __('When displaying ticket prices and booking totals, include the tax automatically?', 'dbem'));
        echo $save_button;
        ?>
					</table>
				</div> <!-- . inside -->
				</div> <!-- .postbox --> 
				
				<div  class="postbox " >
				<div class="handlediv" title="<?php 
        __('Click to toggle', 'dbem');
        ?>
"><br /></div><h3><span><?php 
        _e('Customize Feedback Messages', 'dbem');
        ?>
 </span></h3>
				<div class="inside">
					<p><?php 
        _e('Below you will find texts that will be displayed to users in various areas during the bookings process, particularly on booking forms.', 'dbem');
        ?>
</p>
					<table class='form-table'>
						<tr><td colspan='2'><h4><?php 
        _e('My Bookings messages', 'dbem');
        ?>
</h4></td></tr>
						<?php 
        em_options_input_text(__('Booking Cancelled', 'dbem'), 'dbem_booking_feedback_cancelled', __('When a user cancels their booking, this message will be displayed confirming the cancellation.', 'dbem'));
        em_options_input_text(__('Booking Cancellation Warning', 'dbem'), 'dbem_booking_warning_cancel', __('When a user chooses to cancel a booking, this warning is displayed for them to confirm.', 'dbem'));
        ?>
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:67,代码来源:em-options.php

示例3: foreach

<?php

foreach ($EM_Booking->get_tickets() as $EM_Ticket) {
    echo $EM_Ticket->name;
    ?>

Quantity: <?php 
    echo $EM_Ticket->spaces;
    ?>

Price: <?php 
    echo em_get_currency_symbol(true) . " " . number_format($EM_Ticket->get_price(true), 2);
}
开发者ID:hypenotic,项目名称:slowfood,代码行数:13,代码来源:bookingtickets.php

示例4: get_price

 /**
  * Gets the total price for this ticket.
  * @return float
  */
 function get_price($format = false)
 {
     if ($format) {
         return apply_filters('em_ticket_get_price', em_get_currency_symbol() . number_format($this->price, 2), $this);
     }
     return apply_filters('em_ticket_get_price', $this->price, $this);
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:11,代码来源:em-ticket.php

示例5: event_tickets_cb

    /**
     * Event tickets metabox callback.
     */
    public function event_tickets_cb($post)
    {
        wp_nonce_field('events_maker_save_event_tickets', 'event_nonce_tickets');
        $tickets = get_post_meta($post->ID, '_event_tickets', true);
        $free_event = ($free = get_post_meta($post->ID, '_event_free', true)) === '' ? '1' : $free;
        $html_t = '';
        $symbol = em_get_currency_symbol();
        $html = '
		<p>
			<label for="event_free">' . __('Is this a free event?', 'events-maker') . '</label>
			<input id="event_free" type="checkbox" name="event_free" ' . checked($free_event, '1', false) . ' /> 
		</p>
		<div id="event_cost_and_tickets"' . ($free_event === '1' ? ' style="display: none;"' : '') . '>
			<div>
				<a href="#" id="event_add_ticket" class="button button-primary">' . __('Add new ticket', 'events-maker') . '</a>
			</div>';
        if (!empty($tickets) && is_array($tickets)) {
            foreach ($tickets as $id => $ticket) {
                $html_t .= '
				<p rel="' . $id . '">';
                foreach ($this->tickets_fields as $key => $field) {
                    $html_t .= '
					<label for="event_tickets[' . $id . '][' . $key . ']">' . $field . ':</label> <input type="text" id="event_tickets[' . $id . '][' . $key . ']" name="event_tickets[' . $id . '][' . $key . ']" value="' . esc_attr(isset($ticket[$key]) ? $ticket[$key] : '') . '" />' . ($key === 'price' ? $symbol : '');
                }
                $html_t .= '
					<a href="#" class="event_ticket_delete button button-secondary">' . __('Delete', 'events-maker') . '</a>
				</p>';
            }
        } else {
            $html_t .= '
				<p rel="0">';
            foreach ($this->tickets_fields as $key => $field) {
                $html_t .= '
					<label for="event_tickets[0][' . $key . ']">' . $field . ':</label> <input type="text" id="event_tickets[0][' . $key . ']" name="event_tickets[0][' . $key . ']" value="" />' . ($key === 'price' ? $symbol : '');
            }
            $html_t .= '
					<a href="#" class="event_ticket_delete button button-secondary">' . __('Delete', 'events-maker') . '</a>
				</p>';
        }
        $html .= '
			<div id="event_tickets">
			' . $html_t . '
			</div>
			<div>
				<label for="event_tickets_url">' . __('Buy tickets URL', 'events-maker') . ':</label> <input id="event_tickets_url" class="regular-text" type="text" name="event_tickets_url" value="' . esc_url(get_post_meta($post->ID, '_event_tickets_url', true)) . '" />
			</div>
		</div>';
        do_action('em_before_metabox_event_tickets');
        echo $html;
        do_action('em_after_metabox_event_tickets');
    }
开发者ID:patlegris,项目名称:On-Off,代码行数:54,代码来源:class-metaboxes.php

示例6: mysettings

        /**
         * Getway Settings
         * @since 1.3
         * @version 1.3
         */
        function mysettings()
        {
            global $page, $action;
            $gateway_link = admin_url('edit.php?post_type=' . EM_POST_TYPE_EVENT . '&page=events-manager-options#bookings');
            if ($this->prefs['setup'] == 'multi') {
                $box = 'display: block;';
            } else {
                $box = 'display: none;';
            }
            $exchange_message = sprintf(__('How many %s is 1 %s worth?', 'mycred'), $this->core->plural(), em_get_currency_symbol());
            $mycred_types = mycred_get_types();
            do_action('mycred_em_before_settings', $this);
            ?>

<h4><?php 
            _e('Setup', 'mycred');
            ?>
</h4>
<table class="form-table">
	<?php 
            if (count($mycred_types) > 1) {
                ?>

	<tr>
		<th scope="row"><?php 
                _e('Point Type', 'mycred');
                ?>
</th>
		<td>
			<?php 
                mycred_types_select_from_dropdown('mycred_gateway[type]', 'mycred-gateway-type', $this->prefs['type']);
                ?>

		</td>
	</tr>
	<?php 
            } else {
                ?>

	<input type="hidden" name="mycred_gateway[type]" value="mycred_default" />
	<?php 
            }
            ?>

	<tr>
		<th scope="row"><?php 
            _e('Payments', 'mycred');
            ?>
</th>
		<td>
			<input type="radio" name="mycred_gateway[setup]" id="mycred-gateway-setup-off" value="off"<?php 
            checked($this->prefs['setup'], 'off');
            ?>
 /> <label for="mycred-gateway-setup-off"><?php 
            echo $this->core->template_tags_general(__('Disabled - Users CAN NOT pay for tickets using %plural%.', 'mycred'));
            ?>
</label><br />
			<input type="radio" name="mycred_gateway[setup]" id="mycred-gateway-setup-single" value="single"<?php 
            checked($this->prefs['setup'], 'single');
            ?>
 /> <label for="mycred-gateway-setup-single"><?php 
            echo $this->core->template_tags_general(__('Single - Users can ONLY pay for tickets using %plural%.', 'mycred'));
            ?>
</label><br />
			<input type="radio" name="mycred_gateway[setup]" id="mycred-gateway-setup-multi" value="multi"<?php 
            checked($this->prefs['setup'], 'multi');
            ?>
 /> <label for="mycred-gateway-setup-multi"><?php 
            echo $this->core->template_tags_general(__('Multi - Users can pay for tickets using other gateways or %plural%.', 'mycred'));
            ?>
</label>
		</td>
	</tr>
	<tr>
		<th scope="row"><?php 
            _e('Refunds', 'mycred');
            ?>
</th>
		<td>
			<input name="mycred_gateway[refund]" type="text" id="mycred-gateway-log-refund" value="<?php 
            echo $this->prefs['refund'];
            ?>
" size="5" /> %<br />
			<span class="description"><?php 
            _e('The percentage of the paid amount to refund if a user cancels their booking. Use zero for no refunds. No refunds are given to "Rejected" bookings!', 'mycred');
            ?>
</span>
		</td>
	</tr>
	<tr>
		<th scope="row"><?php 
            _e('Profit Sharing', 'mycred');
            ?>
</th>
		<td>
//.........这里部分代码省略.........
开发者ID:socialray,项目名称:surfied-2-0,代码行数:101,代码来源:mycred-eventsmanager-pro.php

示例7: add_new_event_columns_content

 /**
  * Adds new event listing columns content
  */
 public function add_new_event_columns_content($column_name, $id)
 {
     $mode = !empty($_GET['mode']) ? sanitize_text_field($_GET['mode']) : '';
     switch ($column_name) {
         case 'event_start_date':
         case 'event_end_date':
             $date = get_post_meta($id, '_' . $column_name, true);
             echo em_is_all_day($id) ? substr($date, 0, 10) : substr(str_replace(' ', ', ', $date), 0, 17);
             break;
         case 'event_recurrence':
             $recurrence = get_post_meta($id, '_event_recurrence', true);
             echo $this->recurrences[$recurrence['type']];
             break;
         case 'event_free':
             if (!em_is_free($id)) {
                 echo __('Paid', 'events-maker') . '<br />';
                 if ($mode === 'excerpt') {
                     $tickets = get_post_meta($id, '_event_tickets', true);
                     foreach ($tickets as $ticket) {
                         echo $ticket['name'] . ': ' . em_get_currency_symbol($ticket['price']) . '<br />';
                     }
                 }
             } else {
                 echo __('Free', 'events-maker');
             }
             break;
     }
 }
开发者ID:DarussalamTech,项目名称:aims_prj,代码行数:31,代码来源:class-listing.php

示例8: __

	
	<div  class="postbox " id="em-opt-pricing-options" >
	<div class="handlediv" title="<?php 
__('Click to toggle', 'dbem');
?>
"><br /></div><h3><span><?php 
echo sprintf(__('%s Options', 'dbem'), __('Pricing', 'dbem'));
?>
 </span></h3>
	<div class="inside">
		<table class='form-table'>
			<?php 
/* Tax & Currency */
em_options_select(__('Currency', 'dbem'), 'dbem_bookings_currency', em_get_currencies()->names, __('Choose your currency for displaying event pricing.', 'dbem'));
em_options_input_text(__('Thousands Separator', 'dbem'), 'dbem_bookings_currency_thousands_sep', '<code>' . get_option('dbem_bookings_currency_thousands_sep') . " = " . em_get_currency_symbol() . '100<strong>' . get_option('dbem_bookings_currency_thousands_sep') . '</strong>000<strong>' . get_option('dbem_bookings_currency_decimal_point') . '</strong>00</code>');
em_options_input_text(__('Decimal Point', 'dbem'), 'dbem_bookings_currency_decimal_point', '<code>' . get_option('dbem_bookings_currency_decimal_point') . " = " . em_get_currency_symbol() . '100<strong>' . get_option('dbem_bookings_currency_decimal_point') . '</strong>00</code>');
em_options_input_text(__('Currency Format', 'dbem'), 'dbem_bookings_currency_format', __('Choose how prices are displayed. <code>@</code> will be replaced by the currency symbol, and <code>#</code> will be replaced by the number.', 'dbem') . ' <code>' . get_option('dbem_bookings_currency_format') . " = " . em_get_currency_formatted('10000000') . '</code>');
em_options_input_text(__('Tax Rate', 'dbem'), 'dbem_bookings_tax', __('Add a tax rate to your ticket prices (entering 10 will add 10% to the ticket price).', 'dbem'));
em_options_radio_binary(__('Add tax to ticket price?', 'dbem'), 'dbem_bookings_tax_auto_add', __('When displaying ticket prices and booking totals, include the tax automatically?', 'dbem'));
echo $save_button;
?>

		</table>
	</div> <!-- . inside -->
	</div> <!-- .postbox --> 
	
	<div  class="postbox " id="em-opt-booking-feedbacks" >
	<div class="handlediv" title="<?php 
__('Click to toggle', 'dbem');
?>
"><br /></div><h3><span><?php 
开发者ID:pcco,项目名称:portal-redesign,代码行数:30,代码来源:bookings.php

示例9: foreach

<?php

foreach ($EM_Booking->get_tickets_bookings() as $EM_Ticket_Booking) {
    /* @var $EM_Ticket_Booking EM_Ticket_Booking */
    echo $EM_Ticket_Booking->get_ticket()->name;
    ?>

Quantity: <?php 
    echo $EM_Ticket_Booking->get_spaces();
    ?>

Price: <?php 
    echo em_get_currency_symbol(!get_option('dbem_smtp_html')) . " " . number_format($EM_Ticket_Booking->get_price(), 2);
    ?>


<?php 
}
开发者ID:eresyyl,项目名称:mk,代码行数:18,代码来源:bookingtickets.php

示例10: output

 function output($format, $target = "html")
 {
     preg_match_all("/(#@?_?[A-Za-z0-9]+)({([^}]+)})?/", $format, $placeholders);
     foreach ($this->get_tickets() as $EM_Ticket) {
         break;
     }
     //Get first ticket for single ticket placeholders
     $output_string = $format;
     $replaces = array();
     foreach ($placeholders[1] as $key => $result) {
         $replace = '';
         $full_result = $placeholders[0][$key];
         switch ($result) {
             case '#_BOOKINGID':
                 $replace = $this->booking_id;
                 break;
             case '#_RESPNAME':
                 //Depreciated
             //Depreciated
             case '#_BOOKINGNAME':
                 $replace = $this->get_person()->get_name();
                 break;
             case '#_RESPEMAIL':
                 //Depreciated
             //Depreciated
             case '#_BOOKINGEMAIL':
                 $replace = $this->get_person()->user_email;
                 break;
             case '#_RESPPHONE':
                 //Depreciated
             //Depreciated
             case '#_BOOKINGPHONE':
                 $replace = $this->get_person()->phone;
                 break;
             case '#_BOOKINGSPACES':
                 $replace = $this->get_spaces();
                 break;
             case '#_BOOKINGLISTURL':
                 $replace = em_get_my_bookings_url();
                 break;
             case '#_COMMENT':
                 //Depreciated
             //Depreciated
             case '#_BOOKINGCOMMENT':
                 $replace = $this->booking_comment;
                 break;
             case '#_BOOKINGPRICEWITHTAX':
                 $replace = em_get_currency_symbol(true) . " " . number_format($this->get_price(false, false, true), 2);
                 break;
             case '#_BOOKINGPRICEWITHOUTTAX':
                 $replace = em_get_currency_symbol(true) . " " . number_format($this->get_price(false, false, false), 2);
                 break;
             case '#_BOOKINGPRICETAX':
                 $replace = em_get_currency_symbol(true) . " " . number_format($this->get_price(false, false, false) * (get_option('dbem_bookings_tax') / 100), 2);
                 break;
             case '#_BOOKINGPRICE':
                 $replace = em_get_currency_symbol(true) . " " . number_format($this->get_price(), 2);
                 break;
             case '#_BOOKINGTICKETNAME':
                 $replace = $EM_Ticket->name;
                 break;
             case '#_BOOKINGTICKETDESCRIPTION':
                 $replace = $EM_Ticket->description;
                 break;
             case '#_BOOKINGTICKETPRICEWITHTAX':
                 $replace = em_get_currency_symbol(true) . " " . number_format($EM_Ticket->get_price(false, true), 2);
                 break;
             case '#_BOOKINGTICKETPRICEWITHOUTTAX':
                 $replace = em_get_currency_symbol(true) . " " . number_format($EM_Ticket->get_price(false, false), 2);
                 break;
             case '#_BOOKINGTICKETTAX':
                 $replace = em_get_currency_symbol(true) . " " . number_format($EM_Ticket->get_price(false, false) * (get_option('dbem_bookings_tax') / 100), 2);
                 break;
             case '#_BOOKINGTICKETPRICE':
                 $replace = em_get_currency_symbol(true) . " " . number_format($EM_Ticket->get_price(), 2);
                 break;
             case '#_BOOKINGTICKETS':
                 ob_start();
                 em_locate_template('emails/bookingtickets.php', true, array('EM_Booking' => $this));
                 $replace = ob_get_clean();
                 break;
             default:
                 $replace = $full_result;
                 break;
         }
         $replaces[$full_result] = apply_filters('em_booking_output_placeholder', $replace, $this, $full_result, $target);
     }
     //sort out replacements so that during replacements shorter placeholders don't overwrite longer varieties.
     krsort($replaces);
     foreach ($replaces as $full_result => $replacement) {
         $output_string = str_replace($full_result, $replacement, $output_string);
     }
     //run event output too, since this is never run from within events and will not infinitely loop
     $output_string = $this->get_event()->output($output_string, $target);
     return apply_filters('em_booking_output', $output_string, $this, $format, $target);
 }
开发者ID:rajankz,项目名称:webspace,代码行数:96,代码来源:em-booking.php

示例11: __

		<div class="event-tickets tickets">

			<span class="tickets-label"><strong><?php 
    echo __('Tickets', 'events-maker');
    ?>
: </strong></span>

				<?php 
    foreach ($tickets as $ticket) {
        ?>

					<span class="event-ticket"><span class="ticket-name"><?php 
        esc_html_e($ticket['name']);
        ?>
: </span><span class="ticket-price"><?php 
        esc_html_e(em_get_currency_symbol($ticket['price']));
        ?>
</span></span>

				<?php 
    }
    ?>

		</div>

	<?php 
} else {
    ?>

		<div class="event-tickets tickets">
开发者ID:patlegris,项目名称:On-Off,代码行数:30,代码来源:tickets.php

示例12: get_price

 /**
  * Gets the total price for this whole booking. Seting $force_reset to true will recheck spaces, even if previously done so.
  * @param boolean $force_refresh
  * @return float
  */
 function get_price($force_refresh = false, $format = false)
 {
     if ($force_refresh || $this->price == 0) {
         $this->price = $this->get_tickets_bookings()->get_price($force_refresh);
     }
     if ($format) {
         return apply_filters('em_booking_get_prices', em_get_currency_symbol() . number_format($this->price, 2), $this);
     }
     return apply_filters('em_booking_get_prices', $this->price, $this);
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:15,代码来源:em-booking.php

示例13: get_price

 /**
  * Gets the total price for this whole booking by adding up subtotals of booked tickets. Seting $force_reset to true will recheck spaces, even if previously done so.
  * @param boolean $force_refresh
  * @return float
  */
 function get_price($force_refresh = false, $format = false)
 {
     $price = 0;
     if ($force_refresh || $this->price == 0) {
         foreach ($this->tickets_bookings as $EM_Ticket_Booking) {
             $price += $EM_Ticket_Booking->get_price();
         }
         $this->price = $price;
     }
     if ($format) {
         return apply_filters('em_tickets_bookings_get_prices', em_get_currency_symbol() . number_format($this->price, 2), $this);
     }
     return apply_filters('em_tickets_bookings_get_prices', $this->price, $this);
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:19,代码来源:em-tickets-bookings.php

示例14: add_new_event_columns_content

 /**
  * Add new event listing columns content.
  */
 public function add_new_event_columns_content($column_name, $id)
 {
     global $pagenow;
     $screen = get_current_screen();
     // event edit screen only
     if ($pagenow === 'edit.php' && in_array($screen->post_type, apply_filters('em_event_post_type', array('event')))) {
         $mode = !empty($_GET['mode']) ? sanitize_text_field($_GET['mode']) : '';
         switch ($column_name) {
             case 'start_date':
             case 'end_date':
                 $date = get_post_meta($id, '_event_' . $column_name, true);
                 echo em_is_all_day($id) ? date_i18n('Y-m-d', strtotime($date)) : date_i18n('Y-m-d, ' . Events_Maker()->options['general']['datetime_format']['time'], strtotime($date));
                 break;
             case 'recurrence':
                 $recurrence = get_post_meta($id, '_event_recurrence', true);
                 echo Events_Maker()->recurrences[$recurrence['type']];
                 break;
             case 'tickets':
                 if (!em_is_free($id)) {
                     echo __('paid', 'events-maker') . '<br />';
                     if ($mode === 'excerpt') {
                         $tickets = get_post_meta($id, '_event_tickets', true);
                         foreach ($tickets as $ticket) {
                             echo $ticket['name'] . ': ' . em_get_currency_symbol($ticket['price']) . '<br />';
                         }
                     }
                 } else {
                     echo __('free', 'events-maker');
                 }
                 break;
             case 'featured':
                 $url = wp_nonce_url(admin_url('admin-ajax.php?action=events_maker_feature_event&event_id=' . $id), 'events-maker-feature-event', 'em_nonce');
                 $is_event_featured = (int) get_post_meta($id, '_event_featured', true);
                 echo '<a href="' . esc_url($url) . '" class="toggle-featured-event" data-post-id="' . $id . '" title="' . __('Toggle featured', 'events-maker') . '">';
                 if ($is_event_featured) {
                     echo '<span class="dashicons dashicons-star-filled" title="' . __('Yes') . '"></span>';
                 } else {
                     echo '<span class="dashicons dashicons-star-empty" title="' . __('No') . '"></span>';
                 }
                 echo '</a>';
                 break;
             case 'event-color':
                 $categories = em_get_categories_for($id);
                 if (!empty($categories)) {
                     if (isset($categories[0]->category_meta['color']) && !empty($categories[0]->category_meta['color'])) {
                         echo '<span style="border-left: 4px solid ' . $categories[0]->category_meta['color'] . '" title="' . $categories[0]->name . '"></span>';
                     }
                 }
                 break;
         }
     }
 }
开发者ID:patlegris,项目名称:On-Off,代码行数:55,代码来源:class-listing.php

示例15: em_bookings_single

	<div class='wrap'>
		<div id='icon-users' class='icon32'>
			<br/>
		</div>
  		<h2>
  			<?php 
    echo sprintf(__('Ticket for %s', 'dbem'), "'{$EM_Event->name}'");
    ?>

  			<a href="<?php 
    echo $EM_Event->get_edit_url();
    ?>
" class="button add-new-h2"><?php 
    _e('View/Edit Event', 'dbem');
    ?>
</a>
  			<a href="<?php 
    echo $EM_Event->get_bookings_url();
    ?>
" class="button add-new-h2"><?php 
    _e('View Event Bookings', 'dbem');
    ?>
</a>
  		</h2> 
  		<?php 
    if (!is_admin()) {
        echo $EM_Notices;
    }
    ?>

		<div>
			<table>
				<tr><td><?php 
    echo __('Name', 'dbem');
    ?>
</td><td></td><td><?php 
    echo $EM_Ticket->ticket_name;
    ?>
</td></tr>
				<tr><td><?php 
    echo __('Description', 'dbem');
    ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td></td><td><?php 
    echo $EM_Ticket->ticket_description ? $EM_Ticket->ticket_description : '-';
    ?>
</td></tr>
				<tr><td><?php 
    echo __('Price', 'dbem');
    ?>
</td><td></td><td><?php 
    echo $EM_Ticket->ticket_price ? $EM_Ticket->ticket_price : '-';
    ?>
</td></tr>
				<tr><td><?php 
    echo __('Spaces', 'dbem');
    ?>
</td><td></td><td><?php 
    echo $EM_Ticket->ticket_spaces ? $EM_Ticket->ticket_spaces : '-';
    ?>
</td></tr>
				<tr><td><?php 
    echo __('Min', 'dbem');
    ?>
</td><td></td><td><?php 
    echo $EM_Ticket->ticket_min ? $EM_Ticket->ticket_min : '-';
    ?>
</td></tr>
				<tr><td><?php 
    echo __('Max', 'dbem');
    ?>
</td><td></td><td><?php 
    echo $EM_Ticket->ticket_max ? $EM_Ticket->ticket_max : '-';
    ?>
</td></tr>
				<tr><td><?php 
    echo __('Start', 'dbem');
    ?>
</td><td></td><td><?php 
    echo $EM_Ticket->ticket_start ? $EM_Ticket->ticket_start : '-';
    ?>
</td></tr>
				<tr><td><?php 
    echo __('End', 'dbem');
    ?>
</td><td></td><td><?php 
    echo $EM_Ticket->ticket_end ? $EM_Ticket->ticket_end : '-';
    ?>
</td></tr>
				<?php 
    do_action('em_booking_admin_ticket_row', $EM_Ticket);
    ?>

			</table>
		</div>
		<div class="icon32" id="icon-bookings"><br></div>
		<h2><?php 
    _e('Bookings', 'dbem');
    ?>
</h2>
		<?php 
//.........这里部分代码省略.........
开发者ID:batruji,项目名称:metareading,代码行数:101,代码来源:em-bookings.php


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