本文整理汇总了PHP中imic_get_currency_symbol函数的典型用法代码示例。如果您正苦于以下问题:PHP imic_get_currency_symbol函数的具体用法?PHP imic_get_currency_symbol怎么用?PHP imic_get_currency_symbol使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了imic_get_currency_symbol函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: imic_event
//.........这里部分代码省略.........
$output .= '<ul class="grid-holder col-3 events-grid">';
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$count = 1;
$grid_item = 1;
$perPage = get_option('posts_per_page');
$paginate = 1;
if ($paged > 1) {
$paginate = ($paged - 1) * $perPage;
$paginate = $paginate + 1;
}
$TotalEvents = count($events);
if ($TotalEvents % $perPage == 0) {
$TotalPages = $TotalEvents / $perPage;
} else {
$TotalPages = $TotalEvents / $perPage;
$TotalPages = $TotalPages + 1;
}
foreach ($events as $key => $value) {
if (preg_match('/^[0-9]+$/', $value)) {
$google_flag = 1;
} else {
$google_flag = 2;
}
if ($google_flag == 1) {
setup_postdata(get_post($value));
$eventStartTime = strtotime(get_post_meta($value, 'imic_event_start_tm', true));
$eventStartDate = strtotime(get_post_meta($value, 'imic_event_start_dt', true));
$eventEndTime = strtotime(get_post_meta($value, 'imic_event_end_tm', true));
$eventEndDate = strtotime(get_post_meta($value, 'imic_event_end_dt', true));
$event_dt_out = imic_get_event_timeformate($eventStartTime . '|' . $eventEndTime, $eventStartDate . '|' . $eventEndDate, $value, $key);
$event_dt_out = explode('BR', $event_dt_out);
$registration_status = get_post_meta($value, 'imic_event_registration_status', true);
/** Event Details Manage **/
if ($registration_status == 1 && function_exists('imic_get_currency_symbol')) {
$eventDetailIcons = array('fa-calendar', 'fa-clock-o', 'fa-map-marker', 'fa-money');
} else {
$eventDetailIcons = array('fa-calendar', 'fa-clock-o', 'fa-map-marker');
}
$stime = "";
$etime = "";
if ($eventStartTime != '') {
$stime = ' | ' . date_i18n(get_option('time_format'), $eventStartTime);
}
if ($eventEndTime != '') {
$etime = ' - ' . date_i18n(get_option('time_format'), $eventEndTime);
}
if ($registration_status == 1 && function_exists('imic_get_currency_symbol')) {
$event_registration_fee = get_post_meta($value, 'imic_event_registration_fee', true);
$registration_charge = $event_registration_fee == '' ? 'Free' : imic_get_currency_symbol(get_option('paypal_currency_options')) . get_post_meta($value, 'imic_event_registration_fee', true);
$eventDetailsData = array($event_dt_out[1], $event_dt_out[0], get_post_meta($value, 'imic_event_address', true), $registration_charge);
/*
$eventDetailsData = array(date_i18n('j M, ',$key).date_i18n('l',$key). $stime . $etime, get_post_meta($value,'imic_event_address',true),$registration_charge);
*/
} else {
/*$eventDetailsData = array(date_i18n('j M, ',$key).date_i18n('l',$key). $stime . $etime, get_post_meta($value,'imic_event_address',true));*/
$eventDetailsData = array($event_dt_out[1], $event_dt_out[0], get_post_meta($value, 'imic_event_address', true));
}
$eventValues = array_filter($eventDetailsData, 'strlen');
}
if ($count == $paginate && $grid_item <= $perPage) {
$paginate++;
$grid_item++;
if ($google_flag == 1) {
$frequency = get_post_meta($value, 'imic_event_frequency', true);
}
//if ('' != get_the_post_thumbnail($value)) {
示例2: count
$total_area_location = count($property_area_location);
$num = 1;
foreach ($property_area_location as $sa) {
$conc = $num != $total_area_location ? '->' : '';
$sl .= $sa->name . $conc;
$num++;
}
// We get Longitude & Latitude By Property Address
$property_longitude_and_latitude = get_post_meta(get_the_ID(), 'imic_lat_long', true);
if (!empty($property_longitude_and_latitude)) {
$property_longitude_and_latitude = explode(',', $property_longitude_and_latitude);
} else {
$property_longitude_and_latitude = getLongitudeLatitudeByAddress($property_address);
}
global $imic_options;
$currency_symbol = imic_get_currency_symbol($imic_options['currency-select']);
$src = wp_get_attachment_image_src(get_post_thumbnail_id(), '150-100-size');
if (!empty($src)) {
$image_container = '<span class ="property_image_map">' . $src[0] . '</span>';
} else {
$image_container = '';
}
if (!empty($contract)) {
$term = get_term($contract[0], 'property-contract-type');
$property_term_type = $term->name;
}
if ($design_type == 'listing') {
?>
<li class="type-rent col-md-12">
<?php
echo '<div id="property' . get_the_ID() . '" style="display:none;"><span class ="property_address">' . $property_address . '</span><span class ="property_price"><strong>' . $currency_symbol . '</strong> <span> ' . $property_price . '</span></span><span class ="latitude">' . $property_longitude_and_latitude[0] . '</span><span class ="longitude">' . $property_longitude_and_latitude[1] . '</span>' . $image_container . '<span class ="property_url">' . get_permalink(get_the_ID()) . '</span><span class ="property_image_url">' . IMIC_THEME_PATH . '/images/map-marker.png</span></div>';
示例3: date_i18n
$en_dt_unix = '<strong>' . date_i18n('l', $en_dt_unix) . '</strong> | ' . $en_dt_unix1;
$date_opt = $st_dt_unix . ' ' . __('to', 'framework') . ' ' . $en_dt_unix;
} else {
$st_dt_unix = date(get_option('date_format'), $st_dt_unix);
$date_opt = '<strong>' . date_i18n('l', $st_dt_unix) . '</strong> | ' . $st_dt_unix;
$event_dt_outs = '';
}
}
$eventDetailsData = array($date_opt, $event_dt_out[0], get_post_meta(get_the_ID(), 'imic_event_address', true), get_post_meta(get_the_ID(), 'imic_event_contact', true));
}
/* $eventDetailsData = array($date, $stime . $etime, get_post_meta(get_the_ID(), 'imic_event_address', true),
get_post_meta(get_the_ID(), 'imic_event_contact', true));*/
$eventValues = array_filter($eventDetailsData, 'strlen');
/** Event Persons Manage * */
if ($registration_status == 1 && function_exists('imic_get_currency_symbol')) {
$registration_charge = $event_registration_fee == '' ? 'Free' : imic_get_currency_symbol(get_option('paypal_currency_options')) . get_post_meta(get_the_ID(), 'imic_event_registration_fee', true);
$eventPersonDetails = array(__('Attendees', 'framework'), __('Staff members', 'framework'), __('Registration', 'framework'));
if (is_plugin_active('Payment-Imithemes/causes.php') && $registration_status == 1) {
$eventPersonData = array(get_post_meta(get_the_ID(), 'imic_event_attendees', true), get_post_meta(get_the_ID(), 'imic_event_staff_members', true), $registration_charge);
} else {
$eventPersonData = array(get_post_meta(get_the_ID(), 'imic_event_attendees', true), get_post_meta(get_the_ID(), 'imic_event_staff_members', true));
}
$eventPersonValues = array_filter($eventPersonData, 'strlen');
} else {
$eventPersonDetails = array(__('Attendees', 'framework'), __('Staff members', 'framework'));
$eventPersonData = array(get_post_meta(get_the_ID(), 'imic_event_attendees', true), get_post_meta(get_the_ID(), 'imic_event_staff_members', true));
$eventPersonValues = array_filter($eventPersonData, 'strlen');
}
$event_email = get_post_meta(get_the_ID(), 'imic_event_email', true);
$event_email = $event_email != '' ? $event_email : get_option('admin_email');
?>
示例4: imic_get_currency_symbol
%" data-appear-animation-delay="200"></div><!-- Upto 30% use class progress-bar-danger , upto 70% use class progress-bar-warning , afterwards use class progress-bar-success -->
</div>
</li>
<li class="list-group-item"> <span class="badge"><?php
echo imic_get_currency_symbol(get_option('paypal_currency_options')) . $cause_amount;
?>
</span> <?php
_e('Amount Needed', 'framework');
?>
</li>
<?php
}
if (!empty($cause_received_amount)) {
?>
<li class="list-group-item"> <span class="badge"><?php
echo imic_get_currency_symbol(get_option('paypal_currency_options')) . $cause_received_amount;
?>
</span> <?php
_e('Collected yet', 'framework');
?>
</li>
<?php
}
if (!empty($cause_received_amount) && !empty($cause_amount)) {
?>
<li class="list-group-item"> <span class="badge accent-bg"><?php
echo $cause_percentage . '%';
?>
</span> <?php
_e('Percentile', 'framework');
?>
示例5: get_post_meta
?>
<div class="progress-label">
<?php
$cause_received_amount = get_post_meta(get_the_ID(), 'imic_cause_amount_received', true);
$cause_percentage = $cause_received_amount / $cause_amount * 100;
$cause_percentage = round($cause_percentage);
if ($cause_percentage <= 30) {
$class = 'progress-bar-danger';
} elseif ($cause_percentage <= 70 && $cause_percentage > 30) {
$class = 'progress-bar-warning';
} else {
$class = 'progress-bar-success';
}
echo $cause_percentage;
_e('% Donated of ', 'framework');
echo '<span>' . imic_get_currency_symbol(get_option('paypal_currency_options')) . $cause_amount . '</span>';
$now = date('Y-m-d 23:59:59');
// or your date as well
$now = strtotime($now);
$cause_end_date = get_post_meta(get_the_ID(), 'imic_cause_end_dt', true);
$cause_end_date = $cause_end_date . ' 23:59:59';
$your_date = strtotime($cause_end_date);
$datediff = $your_date - $now;
$days_left = floor($datediff / (60 * 60 * 24));
$cause_date_msg = '';
if ($days_left == 0) {
$cause_date_msg = '1 day to go';
} elseif ($days_left < 0) {
$cause_date_msg = 'Cause Closed';
} else {
$cause_date_msg = $days_left + '1' . ' days to go';
示例6: imic_get_template_url
if (!empty($plan_group) && isset($imic_options['plan_show_option']) && !empty($imic_options['plan_show_option'])) {
$payment_url = imic_get_template_url('template-payment.php');
$count_words = array("zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten");
?>
<div class="pricing-table <?php
echo $count_words[count($plan_group)];
?>
-cols margin-40">
<?php
foreach ($plan_group as $new_plan_group) {
$payment_url = esc_url(add_query_arg('payment', str_replace(' ', '-', $new_plan_group['title']), $payment_url));
echo '<div class="pricing-column ">
<h3>' . $new_plan_group['title'] . '</h3>
<div class="pricing-column-content">';
if (!empty($new_plan_group['property_price'])) {
$currency_symbol = imic_get_currency_symbol(get_option('paypal_currency_options'));
echo '<h4> <span class="dollar-sign">' . $currency_symbol . '</span> ' . $new_plan_group['property_price'] . ' </h4>';
}
if (!empty($new_plan_group['number_of_property'])) {
echo '<ul>';
echo '<li>' . __('Number of property: ', 'framework') . $new_plan_group['number_of_property'] . '</li>';
echo '</ul>';
}
if (!empty($new_plan_group['property_description'])) {
echo '<ul class="features">';
$plan_description = explode('.', $new_plan_group['property_description']);
foreach ($plan_description as $plan_description) {
if (!empty($plan_description)) {
echo '<li>' . $plan_description . '</li>';
}
}
示例7: widget
function widget($args, $instance)
{
extract($args);
// these are the widget options
$post_title = apply_filters('widget_title', $instance['title']);
$number = $instance['number'];
$type = apply_filters('widget-type', empty($instance['type']) ? '' : $instance['type'], $instance, $this->id_base);
echo $args['before_widget'];
if (!empty($instance['title'])) {
echo '';
echo $args['before_title'];
echo apply_filters('widget_title', $post_title, $instance, $this->id_base);
echo $args['after_title'];
echo '';
}
echo '<ul>';
if ($type == 'featured') {
query_posts(array('post_type' => 'property', 'post_status' => 'publish', 'posts_per_page' => $number, 'meta_query' => array(array('key' => 'imic_featured_property', 'value' => 1, 'compare' => '=='))));
} else {
query_posts(array('post_type' => 'property', 'post_status' => 'publish', 'posts_per_page' => $number));
}
global $imic_options;
$currency_symbol = imic_get_currency_symbol($imic_options['currency-select']);
if (have_posts()) {
while (have_posts()) {
the_post();
$property_address = get_post_meta(get_the_ID(), 'imic_property_site_address', true);
$property_price = get_post_meta(get_the_ID(), 'imic_property_price', true);
echo '<li>
<div class="row">
<div class="col-md-5 col-sm-5 col-xs-5">
<a href="' . get_permalink() . '">' . get_the_post_thumbnail(get_the_ID(), '600-400-size', array('class' => 'img-thumbnail')) . '</a>
</div>
<div class="col-md-7 col-sm-7 col-xs-7">
<strong><a href="' . get_permalink() . '">' . $property_address . '</a></strong>
<div class="price"><strong>' . $currency_symbol . '</strong><span>' . $property_price . '</span></div>
</div>
</div>
</li>';
}
}
wp_reset_query();
echo '</ul>';
echo $args['after_widget'];
}
示例8: causes_shortcode
function causes_shortcode($args)
{
extract(shortcode_atts(array('email' => get_option('paypal_email_address'), 'cause_id' => '', 'description' => '', 'currency' => get_option('paypal_currency_options'), 'reference' => '', 'return' => '', 'cancel_url' => '', 'tax' => '', 'paypal_payment' => get_option('paypal_payment_option')), $args));
$output = "";
if (empty($email)) {
$output = '<div id="message"><div class="alert alert-error">Error! Please enter your PayPal email address in causes options page.</div></div>';
return $output;
}
$paypal_payment = $paypal_payment == "live" ? "https://www.paypal.com/cgi-bin/webscr" : "https://www.sandbox.paypal.com/cgi-bin/webscr";
$window_target = '';
if (!empty($new_window)) {
$window_target = 'target="_blank"';
}
$output .= '<div class="wp_paypal_button_widget_any_amt">';
$output .= '<form id="cause-' . $cause_id . '" class="paypal-submit-form sai" name="_xclick" action="' . $paypal_payment . '" method="post" ' . $window_target . '>';
if (!empty($reference)) {
$output .= '<div class="wp_pp_button_reference_section">';
$output .= '<label for="wp_pp_button_reference">' . $reference . '</label>';
$output .= '<br />';
$output .= '<input type="hidden" name="on0" value="Reference" />';
$output .= '<input type="text" name="os0" value="" class="wp_pp_button_reference" />';
$output .= '</div>';
}
$this_email = '';
$this_fname = '';
$this_lname = '';
$this_username = '';
$this_actualname = '';
if (is_user_logged_in()) {
global $current_user;
get_currentuserinfo();
$this_email = $current_user->user_email;
$this_fname = $current_user->user_firstname;
$this_lname = $current_user->user_lastname;
$this_username = $current_user->display_name;
$this_actualname = $this_fname == '' ? $this_username : $this_fname;
}
$unique = uniqid();
$output .= '<div class="row">
<div class="col-md-6">
<label>' . __('How much would you like to donate?', 'framework') . '</label>
<div class="input-group margin-20">
<span class="input-group-addon">' . imic_get_currency_symbol(get_option('paypal_currency_options')) . '</span>
<select id="amount"' . get_the_ID() . '" name="donation amount" class="form-control donate-amount">
<option value="20">20</option>
<option value="50">50</option>
<option value="100">100</option>
<option value="101">100+</option>
</select>
</div>
</div>
<div class="col-md-6 custom-donate-amount">
<label>' . __('Enter custom donation amount', 'framework') . '</label>
<div class="input-group margin-20">
<span class="input-group-addon">' . imic_get_currency_symbol(get_option('paypal_currency_options')) . '</span>
<input type="text" id="101" name="Custom Donation Amount" class="form-control">
<input type="hidden" value="' . get_post_meta($cause_id, 'imic_event_registration_fee', true) . '" id="reg-status">
<input type="hidden" value="' . get_query_var('event_date') . '" id="event-reg-date">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<input type="text" value="' . $this_actualname . '" id="username" name="fname" class="form-control" placeholder="First name (Required)">
<input type="hidden" id="postname" name="postname" value="causes">
</div>
<div class="col-md-6">
<input id="lastname" value="' . $this_lname . '" type="text" name="lname" class="form-control" placeholder="Last name">
</div>
</div>
<div class="row">
<div class="col-md-6">
<input type="text" value="' . $this_email . '" name="email" id="email" class="form-control" placeholder="Your email (Required)">
</div>
<div class="col-md-6">
<input id="phone" type="phone" name="phone" class="form-control" placeholder="Your phone">
</div>
</div>
<div class="row">
<div class="col-md-6">
<textarea id="address" rows="3" cols="5" class="form-control" placeholder="Your Address"></textarea>
</div>
<div class="col-md-6">
<textarea id="notes" rows="3" cols="5" class="form-control" placeholder="Additional Notes"></textarea>
</div>
</div>';
$output .= '<input type="hidden" name="rm" value="2">';
$output .= '<input type="hidden" name="amount" value="">';
$output .= '<input type="hidden" name="cmd" value="_donations">';
$output .= '<input type="hidden" name="business" value="' . $email . '">';
$output .= '<input type="hidden" name="currency_code" value="' . $currency . '">';
$output .= '<input type="hidden" name="item_name" value="' . stripslashes($description) . '">';
$output .= '<input type="hidden" name="item_number" value="' . $cause_id . '-' . $unique . '">';
$output .= '<input type="hidden" name="return" value="' . get_permalink($cause_id) . '" />';
if (is_numeric($tax)) {
$output .= '<input type="hidden" name="tax" value="' . $tax . '" />';
}
if (!empty($cancel_url)) {
$output .= '<input type="hidden" name="cancel_return" value="' . $cancel_url . '" />';
}
//.........这里部分代码省略.........
示例9: widget
function widget($args, $instance)
{
extract($args);
// these are the widget options
$post_title = apply_filters('widget_title', $instance['title']);
$number = $instance['number'];
$type = apply_filters('widget-type', empty($instance['type']) ? __('', 'framework') : $instance['type'], $instance, $this->id_base);
echo $args['before_widget'];
if (!empty($instance['title'])) {
echo '';
echo $args['before_title'];
echo apply_filters('widget_title', $post_title, $instance, $this->id_base);
echo $args['after_title'];
echo '';
}
echo '<ul class="owl-carousel owl-alt-controls1 single-carousel" data-columns="1" data-autoplay="no" data-pagination="no" data-arrows="yes" data-single-item="yes">';
if ($type == 'featured') {
query_posts(array('post_type' => 'property', 'post_status' => 'publish', 'posts_per_page' => $number, 'meta_query' => array(array('key' => 'imic_featured_property', 'value' => 1, 'compare' => '=='))));
} else {
query_posts(array('post_type' => 'property', 'post_status' => 'publish', 'posts_per_page' => $number));
}
global $imic_options;
$currency_symbol = imic_get_currency_symbol($imic_options['currency-select']);
if (have_posts()) {
while (have_posts()) {
the_post();
$property_images = get_post_meta(get_the_ID(), 'imic_property_sights', false);
$total_images = count($property_images);
$property_type = '';
$property_address = get_post_meta(get_the_ID(), 'imic_property_site_address', true);
$property_city = get_post_meta(get_the_ID(), 'imic_property_site_city', true);
$property_price = get_post_meta(get_the_ID(), 'imic_property_price', true);
$contract = wp_get_object_terms(get_the_ID(), 'property-contract-type', array('fields' => 'ids'));
if (!empty($contract)) {
$terms = get_term($contract[0], 'property-contract-type');
$property_type = $terms->name;
}
echo '<li class="item property-block">
<a href="' . get_permalink() . '" class="property-featured-image"> ' . get_the_post_thumbnail(get_the_ID(), '600-400-size') . ' <span class="images-count"><i class="fa fa-picture-o"></i> ' . $total_images . '</span> <span class="badges">' . $property_type . '</span> </a>
<div class="property-info">
<h4><a href="' . get_permalink() . '">' . $property_address . '</a></h4>
<span class="location">' . $property_city . '</span>
<div class="price"><strong>' . $currency_symbol . '</strong><span>' . $property_price . '</span></div>
</div>
</li>';
}
}
wp_reset_query();
echo '</ul>';
echo $args['after_widget'];
}
示例10: _e
echo $this_email;
?>
</span>
<span class="meta-data"><?php
_e('Event', 'framework');
?>
</span>
<h4 id="dy-event-title"><?php
echo get_the_title();
?>
</h4>
</div>
<div class="col-md-3 col-sm-3">
<span class="ticket-cost"><?php
if ($event_registration_fee != 0 || $event_registration_fee != '') {
echo imic_get_currency_symbol(get_option('paypal_currency_options')) . $event_registration_fee;
} else {
_e('Free', 'framework');
}
?>
</span>
</div>
</div>
<div class="event-ticket-info">
<div class="row">
<div class="col">
<p class="ticket-col" id="dy-event-date"><?php
echo esc_attr(date_i18n(get_option('date_format'), $date));
?>
</p>
</div>
示例11: imic_get_template_url
</h4>
</div>
<div class="modal-body">
<div class="pricing-table three-cols margin-0">
<?php
$add_listing = imic_get_template_url('template-add-listing.php');
$args_plan = array('post_type' => 'plan', 'post_status' => 'publish', 'posts_per_page' => -1);
$plan_listing = new WP_Query($args_plan);
if ($plan_listing->have_posts()) {
while ($plan_listing->have_posts()) {
$plan_listing->the_post();
$highlight = get_post_meta(get_the_ID(), 'imic_pricing_highlight', true);
$highlight_class = $highlight == 1 ? "highlight accent-color" : "";
$price = get_post_meta(get_the_ID(), 'imic_plan_price', true);
$currency = isset($imic_options['paypal_currency']) ? $imic_options['paypal_currency'] : 'USD';
$currency = imic_get_currency_symbol($currency);
$plan_currency = get_post_meta(get_the_ID(), 'imic_plan_currency', true);
$plan_currency_position = get_post_meta(get_the_ID(), 'imic_plan_currency_position', true);
if ($price != 0 || $price != 'free') {
$paypal_site = $paypal_site == "1" ? "https://www.paypal.com/cgi-bin/webscr" : "https://www.sandbox.paypal.com/cgi-bin/webscr";
} else {
$paypal_site = '';
}
$advantage = get_post_meta(get_the_ID(), 'imic_plan_advantage', true);
?>
<div class="pricing-column <?php
echo esc_attr($highlight_class);
?>
">
<h3><?php
echo get_the_title();