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

PHP give_currency_filter函数代码示例

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

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



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

示例1: csv_cols

 /**
  * Set the CSV columns.
  *
  * @access public
  * @since 1.5
  * @return array $cols All the columns.
  */
 public function csv_cols()
 {
     $cols = array('id' => esc_html__('ID', 'give'), 'seq_id' => esc_html__('Payment Number', 'give'), 'email' => esc_html__('Email', 'give'), 'first' => esc_html__('First Name', 'give'), 'last' => esc_html__('Last Name', 'give'), 'address1' => esc_html__('Address', 'give'), 'address2' => esc_html__('Address (Line 2)', 'give'), 'city' => esc_html__('City', 'give'), 'state' => esc_html__('State', 'give'), 'country' => esc_html__('Country', 'give'), 'zip' => esc_html__('Zip / Postal Code', 'give'), 'form_id' => esc_html__('Form ID', 'give'), 'form_name' => esc_html__('Form Name', 'give'), 'amount' => esc_html__('Amount', 'give') . ' (' . html_entity_decode(give_currency_filter('')) . ')', 'gateway' => esc_html__('Payment Method', 'give'), 'trans_id' => esc_html__('Transaction ID', 'give'), 'key' => esc_html__('Purchase Key', 'give'), 'date' => esc_html__('Date', 'give'), 'user' => esc_html__('User', 'give'), 'status' => esc_html__('Status', 'give'));
     if (!give_get_option('enable_sequential')) {
         unset($cols['seq_id']);
     }
     return $cols;
 }
开发者ID:wordimpress,项目名称:give,代码行数:15,代码来源:class-batch-export-payments.php


示例2: column_default

 /**
  * This function renders most of the columns in the list table.
  *
  * @access public
  * @since  1.0
  *
  * @param array  $item        Contains all the data of the downloads
  * @param string $column_name The name of the column
  *
  * @return string Column Name
  */
 public function column_default($item, $column_name)
 {
     switch ($column_name) {
         case 'earnings':
             return give_currency_filter(give_format_amount($item[$column_name]));
         case 'average_sales':
             return round($item[$column_name]);
         case 'average_earnings':
             return give_currency_filter(give_format_amount($item[$column_name]));
         case 'details':
             return '<a href="' . admin_url('edit.php?post_type=give_forms&page=give-reports&view=forms&form-id=' . $item['ID']) . '">' . __('View Detailed Report', 'give') . '</a>';
         default:
             return $item[$column_name];
     }
 }
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:26,代码来源:class-form-reports-table.php


示例3: column_default

 /**
  * This function renders most of the columns in the list table.
  *
  * @access public
  * @since  1.0
  *
  * @param array  $item        Contains all the data of the discount code
  * @param string $column_name The name of the column
  *
  * @return string Column Name
  */
 public function column_default($item, $column_name)
 {
     switch ($column_name) {
         case 'form':
             return '<a href="' . esc_url(add_query_arg('form', $item[$column_name])) . '" >' . get_the_title($item[$column_name]) . '</a>';
         case 'user_id':
             return '<a href="' . admin_url('edit.php?post_type=give_forms&page=give-payment-history&user=' . (!empty($item['user_id']) ? urlencode($item['user_id']) : give_get_payment_user_email($item['payment_id']))) . '">' . $item['user_name'] . '</a>';
         case 'amount':
             return give_currency_filter(give_format_amount($item['amount']));
         case 'payment_id':
             return '<a href="' . admin_url('edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&id=' . $item['payment_id']) . '">' . give_get_payment_number($item['payment_id']) . '</a>';
         default:
             return $item[$column_name];
     }
 }
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:26,代码来源:class-sales-logs-list-table.php


示例4: give_donations_validate_donation_amount

/**
 * Validation donation amount. Note: Give handles validation minimum amount out-of-the-box.
 *
 * Check that a donation is above or below a maximum amount.
 *
 * @param $valid_data
 * @param $data
 */
function give_donations_validate_donation_amount($valid_data, $data)
{
    // Only validate the form with the IDs "754" and "586";
    // Remove "If" statement to validation for all forms
    // For a single form, use this instead:
    //	$forms = array( 1425 );
    //	if ( ! in_array( $data['give-form-id'], $forms ) ) {
    //		return;
    //	}
    $sanitized_amount = (int) give_sanitize_amount($data['give-amount']);
    $max_amount = 1000;
    //Check for message data
    if ($sanitized_amount >= $max_amount) {
        give_set_error('give_message', sprintf(__('Sorry, we can\'t accept donations more than %s.', 'give'), give_currency_filter(give_format_amount($max_amount))));
    }
}
开发者ID:WordImpress,项目名称:Give-Snippet-Library,代码行数:24,代码来源:validate-donation-amount.php


示例5: csv_cols

 /**
  * Set the CSV columns
  *
  * @access public
  * @since  1.0
  * @return array $cols All the columns
  */
 public function csv_cols()
 {
     if (!empty($_POST['give_export_download'])) {
         $cols = array('first_name' => __('First Name', 'give'), 'last_name' => __('Last Name', 'give'), 'email' => __('Email', 'give'), 'date' => __('Date Donated', 'give'));
     } else {
         $cols = array();
         if ('emails' != $_POST['give_export_option']) {
             $cols['name'] = __('Name', 'give');
         }
         $cols['email'] = __('Email', 'give');
         if ('full' == $_POST['give_export_option']) {
             $cols['purchases'] = __('Total Donations', 'give');
             $cols['amount'] = __('Total Donated', 'give') . ' (' . html_entity_decode(give_currency_filter('')) . ')';
         }
     }
     return $cols;
 }
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:24,代码来源:class-export-customers.php


示例6: column_default

 /**
  * This function renders most of the columns in the list table.
  *
  * @access public
  * @since  1.0
  *
  * @param array $item Contains all the data of the discount code
  * @param string $column_name The name of the column
  *
  * @return string Column Name
  */
 public function column_default($item, $column_name)
 {
     $payment = give_get_payment_by('id', $item['payment_id']);
     switch ($column_name) {
         case 'form':
             return '<a href="' . esc_url(add_query_arg('form', $item[$column_name])) . '" >' . get_the_title($item[$column_name]) . '</a>';
         case 'user_id':
             return '<a href="' . admin_url('edit.php?post_type=give_forms&page=give-payment-history&user=' . (!empty($item['user_id']) ? urlencode($item['user_id']) : give_get_payment_user_email($item['payment_id']))) . '">' . $item['user_name'] . '</a>';
         case 'amount':
             return give_currency_filter(give_format_amount($item['amount']));
         case 'status':
             $value = '<div class="give-donation-status status-' . sanitize_title(give_get_payment_status($payment, true)) . '"><span class="give-donation-status-icon"></span> ' . give_get_payment_status($payment, true) . '</div>';
             if ($payment->mode == 'test') {
                 $value .= ' <span class="give-item-label give-item-label-orange give-test-mode-transactions-label" data-tooltip="' . esc_attr__('This payment was made in test mode', 'give') . '">' . esc_html__('Test', 'give') . '</span>';
             }
             return $value;
         case 'payment_id':
             return '<a href="' . admin_url('edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&id=' . $item['payment_id']) . '">' . give_get_payment_number($item['payment_id']) . '</a>';
         default:
             return $item[$column_name];
     }
 }
开发者ID:wordimpress,项目名称:give,代码行数:33,代码来源:class-sales-logs-list-table.php


示例7: give_show_goal_progress

/**
 * Show Give Goals
 * @since 1.0
 *
 * @param int $form_id
 *
 * @return bool
 */
function give_show_goal_progress($form_id)
{
    $goal_option = get_post_meta($form_id, '_give_goal_option', true);
    $form = new Give_Donate_Form($form_id);
    $goal = $form->goal;
    $income = $form->get_earnings();
    $color = get_post_meta($form_id, '_give_goal_color', true);
    if (empty($form->ID) || $goal_option !== 'yes' || $goal == 0) {
        return false;
    }
    $progress = round($income / $goal * 100, 2);
    if ($income > $goal) {
        $progress = 100;
    }
    $output = '<div class="goal-progress">';
    $output .= '<div class="raised">';
    $output .= sprintf(_x('%s of %s raised', 'give', 'This text displays the amount of income raised compared to the goal.'), '<span class="income">' . give_currency_filter(give_format_amount($income)) . '</span>', '<span class="goal-text">' . give_currency_filter(give_format_amount($goal))) . '</span>';
    $output .= '</div>';
    $output .= '<div class="progress-bar">';
    $output .= '<span style="width: ' . esc_attr($progress) . '%;';
    if (!empty($color)) {
        $output .= 'background-color:' . $color;
    }
    $output .= '"></span>';
    $output .= '</div></div><!-- /.goal-progress -->';
    echo apply_filters('give_goal_output', $output);
}
开发者ID:pantelicnevena,项目名称:hanan,代码行数:35,代码来源:template.php


示例8: give_email_tag_price

/**
 * Email template tag: price
 * The total price of the donation
 *
 * @param int $payment_id
 *
 * @return string price
 */
function give_email_tag_price($payment_id)
{
    $price = give_currency_filter(give_format_amount(give_get_payment_amount($payment_id)), give_get_payment_currency_code($payment_id));
    return html_entity_decode($price, ENT_COMPAT, 'UTF-8');
}
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:13,代码来源:class-give-email-tags.php


示例9: get_permalink

											</td>
											<td>
												<a href="<?php 
echo get_permalink($payment_meta['form_id']);
?>
"><?php 
echo $payment_meta['form_title'];
?>
</a>
											</td>
											<td><?php 
echo date('m/d/Y', $payment_date) . ' ' . date_i18n('H:i', $payment_date);
?>
</td>
											<td><?php 
echo esc_html(give_currency_filter(give_format_amount(give_get_payment_amount($payment_id))));
?>
</td>
											<?php 
do_action('give_donation_details_tbody_after', $payment_id);
?>

										</tr>
									</table>

								</div>
								<!-- /.inside -->


							</div>
							<!-- /#give-donation-overview -->
开发者ID:lots0logs,项目名称:Give,代码行数:31,代码来源:view-order-details.php


示例10: _e

    _e('Fees', 'give');
    ?>
:</strong></td>
				<td>
					<ul class="give_receipt_fees">
						<?php 
    foreach ($fees as $fee) {
        ?>
							<li>
								<span class="give_fee_label"><?php 
        echo esc_html($fee['label']);
        ?>
</span>
								<span class="give_fee_sep">&nbsp;&ndash;&nbsp;</span>
								<span class="give_fee_amount"><?php 
        echo give_currency_filter(give_format_amount($fee['amount']));
        ?>
</span>
							</li>
						<?php 
    }
    ?>
					</ul>
				</td>
			</tr>
		<?php 
}
?>

		<?php 
if (filter_var($give_receipt_args['price'], FILTER_VALIDATE_BOOLEAN)) {
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:31,代码来源:shortcode-receipt.php


示例11: column_default

 /**
  * This function renders most of the columns in the list table.
  *
  * @access public
  * @since  1.0
  *
  * @param array  $item        Contains all the data of the discount code
  * @param string $column_name The name of the column
  *
  * @return string Column Name
  */
 public function column_default($payment, $column_name)
 {
     switch ($column_name) {
         case 'amount':
             $amount = !empty($payment->total) ? $payment->total : 0;
             $value = give_currency_filter(give_format_amount($amount), give_get_payment_currency_code($payment->ID));
             break;
         case 'date':
             $date = strtotime($payment->date);
             $value = date_i18n(get_option('date_format'), $date);
             break;
         case 'status':
             $payment = get_post($payment->ID);
             $value = '<div class="give-donation-status status-' . sanitize_title(give_get_payment_status($payment, true)) . '"><span class="give-donation-status-icon"></span> ' . give_get_payment_status($payment, true) . '</div>';
             break;
         case 'details':
             $value = '<div class="give-payment-details-link-wrap"><a href="' . esc_url(add_query_arg('id', $payment->ID, admin_url('edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details'))) . '" class="give-payment-details-link button button-small">' . __('View Donation Details', 'give') . '</a></div>';
             break;
         default:
             $value = isset($payment->{$column_name}) ? $payment->{$column_name} : '';
             break;
     }
     return apply_filters('give_payments_table_column', $value, $payment->ID, $column_name);
 }
开发者ID:helgatheviking,项目名称:Give,代码行数:35,代码来源:class-payments-table.php


示例12: give_get_donation_notification_body_content

/**
 * Sale Notification Template Body
 *
 * @since  1.0
 *
 * @param int   $payment_id   Payment ID
 * @param array $payment_data Payment Data
 *
 * @return string $email_body Body of the email
 */
function give_get_donation_notification_body_content($payment_id = 0, $payment_data = array())
{
    global $give_options;
    $user_info = maybe_unserialize($payment_data['user_info']);
    $email = give_get_payment_user_email($payment_id);
    if (isset($user_info['id']) && $user_info['id'] > 0) {
        $user_data = get_userdata($user_info['id']);
        $name = $user_data->display_name;
    } elseif (isset($user_info['first_name']) && isset($user_info['last_name'])) {
        $name = $user_info['first_name'] . ' ' . $user_info['last_name'];
    } else {
        $name = $email;
    }
    $gateway = give_get_gateway_admin_label(get_post_meta($payment_id, '_give_payment_gateway', true));
    $default_email_body = __('Hello', 'give') . "\n\n" . __('A donation has been made', 'give') . ".\n\n";
    $default_email_body .= sprintf(__('%s sold:', 'give'), give_get_forms_label_plural()) . "\n\n";
    $default_email_body .= __('Donor: ', 'give') . " " . html_entity_decode($name, ENT_COMPAT, 'UTF-8') . "\n";
    $default_email_body .= __('Amount: ', 'give') . " " . html_entity_decode(give_currency_filter(give_format_amount(give_get_payment_amount($payment_id))), ENT_COMPAT, 'UTF-8') . "\n";
    $default_email_body .= __('Payment Method: ', 'give') . " " . $gateway . "\n\n";
    $default_email_body .= __('Thank you', 'give');
    $email = isset($give_options['donation_notification']) ? stripslashes($give_options['donation_notification']) : $default_email_body;
    $email_body = give_do_email_tags($email, $payment_id);
    return apply_filters('give_donation_notification', wpautop($email_body), $payment_id, $payment_data);
}
开发者ID:helgatheviking,项目名称:Give,代码行数:34,代码来源:template.php


示例13: give_load_admin_scripts

/**
 * Load Admin Scripts
 *
 * Enqueues the required admin scripts.
 *
 * @since 1.0
 *
 * @global       $post
 * @global       $give_options
 *
 * @param string $hook Page hook
 *
 * @return void
 */
function give_load_admin_scripts($hook)
{
    global $wp_version, $post, $post_type, $give_options;
    //Directories of assets
    $js_dir = GIVE_PLUGIN_URL . 'assets/js/admin/';
    $js_plugins = GIVE_PLUGIN_URL . 'assets/js/plugins/';
    $css_dir = GIVE_PLUGIN_URL . 'assets/css/';
    // Use minified libraries if SCRIPT_DEBUG is turned off
    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
    //Global Admin:
    wp_register_style('give-admin-bar-notification', $css_dir . 'adminbar-style.css');
    wp_enqueue_style('give-admin-bar-notification');
    //Give Admin Only:
    if (!apply_filters('give_load_admin_scripts', give_is_admin_page(), $hook)) {
        return;
    }
    //CSS
    wp_register_style('jquery-ui-css', $css_dir . 'jquery-ui-fresh' . $suffix . '.css');
    wp_enqueue_style('jquery-ui-css');
    wp_register_style('give-admin', $css_dir . 'give-admin' . $suffix . '.css', GIVE_VERSION);
    wp_enqueue_style('give-admin');
    wp_register_style('jquery-chosen', $css_dir . 'chosen' . $suffix . '.css', array(), GIVE_VERSION);
    wp_enqueue_style('jquery-chosen');
    wp_enqueue_style('thickbox');
    //JS
    wp_register_script('jquery-chosen', $js_plugins . 'chosen.jquery' . $suffix . '.js', array('jquery'), GIVE_VERSION);
    wp_enqueue_script('jquery-chosen');
    wp_register_script('give-accounting', $js_plugins . 'accounting' . $suffix . '.js', array('jquery'), GIVE_VERSION, false);
    wp_enqueue_script('give-accounting');
    wp_register_script('give-admin-scripts', $js_dir . 'admin-scripts' . $suffix . '.js', array('jquery'), GIVE_VERSION, false);
    wp_enqueue_script('give-admin-scripts');
    wp_register_script('jquery-flot', $js_plugins . 'jquery.flot' . $suffix . '.js');
    wp_enqueue_script('jquery-flot');
    wp_register_script('give-qtip', $js_plugins . 'jquery.qtip' . $suffix . '.js', array('jquery'), GIVE_VERSION, false);
    wp_enqueue_script('give-qtip');
    wp_enqueue_script('jquery-ui-datepicker');
    wp_enqueue_script('thickbox');
    // Forms CPT Script.
    if ($post_type === 'give_forms') {
        wp_register_script('give-admin-forms-scripts', $js_dir . 'admin-forms' . $suffix . '.js', array('jquery'), GIVE_VERSION, false);
        wp_enqueue_script('give-admin-forms-scripts');
    }
    //Settings Scripts
    if (isset($_GET['page']) && $_GET['page'] == 'give-settings') {
        wp_register_script('give-admin-settings-scripts', $js_dir . 'admin-settings' . $suffix . '.js', array('jquery'), GIVE_VERSION, false);
        wp_enqueue_script('give-admin-settings-scripts');
    }
    // Price Separators.
    $thousand_separator = give_get_price_thousand_separator();
    $decimal_separator = give_get_price_decimal_separator();
    //Localize strings & variables for JS
    wp_localize_script('give-admin-scripts', 'give_vars', array('post_id' => isset($post->ID) ? $post->ID : null, 'give_version' => GIVE_VERSION, 'thousands_separator' => $thousand_separator, 'decimal_separator' => $decimal_separator, 'quick_edit_warning' => esc_html__('Sorry, not available for variable priced forms.', 'give'), 'delete_payment' => esc_html__('Are you sure you wish to delete this payment?', 'give'), 'delete_payment_note' => esc_html__('Are you sure you wish to delete this note?', 'give'), 'revoke_api_key' => esc_html__('Are you sure you wish to revoke this API key?', 'give'), 'regenerate_api_key' => esc_html__('Are you sure you wish to regenerate this API key?', 'give'), 'resend_receipt' => esc_html__('Are you sure you wish to resend the donation receipt?', 'give'), 'copy_download_link_text' => esc_html__('Copy these links to your clipboard and give them to your donor.', 'give'), 'delete_payment_download' => sprintf(esc_html__('Are you sure you wish to delete this %s?', 'give'), give_get_forms_label_singular()), 'one_price_min' => esc_html__('You must have at least one price.', 'give'), 'one_file_min' => esc_html__('You must have at least one file.', 'give'), 'one_field_min' => esc_html__('You must have at least one field.', 'give'), 'one_option' => sprintf(esc_html__('Choose a %s', 'give'), give_get_forms_label_singular()), 'one_or_more_option' => sprintf(esc_html__('Choose one or more %s', 'give'), give_get_forms_label_plural()), 'numeric_item_price' => esc_html__('Item price must be numeric.', 'give'), 'numeric_quantity' => esc_html__('Quantity must be numeric.', 'give'), 'currency_sign' => give_currency_filter(''), 'currency_pos' => isset($give_options['currency_position']) ? $give_options['currency_position'] : 'before', 'currency_decimals' => give_currency_decimal_filter(give_get_price_decimals()), 'new_media_ui' => apply_filters('give_use_35_media_ui', 1), 'remove_text' => esc_html__('Remove', 'give'), 'type_to_search' => sprintf(esc_html__('Type to search %s', 'give'), give_get_forms_label_plural()), 'batch_export_no_class' => esc_html__('You must choose a method.', 'give'), 'batch_export_no_reqs' => esc_html__('Required fields not completed.', 'give'), 'reset_stats_warn' => __('Are you sure you want to reset Give? This process is <strong><em>not reversible</em></strong> and will delete all data regardless of test or live mode. Please be sure you have a recent backup before proceeding.', 'give'), 'price_format_guide' => sprintf(esc_html__('Please enter amount in monetary decimal ( %1$s ) format without thousand separator ( %2$s ) .', 'give'), $decimal_separator, $thousand_separator)));
    if (function_exists('wp_enqueue_media') && version_compare($wp_version, '3.5', '>=')) {
        //call for new media manager
        wp_enqueue_media();
    }
}
开发者ID:wordimpress,项目名称:give,代码行数:71,代码来源:scripts.php


示例14: give_email_tag_amount

/**
 * Email template tag: give_amount.
 *
 * The total amount of the donation given.
 *
 * @param int $payment_id
 *
 * @return string amount
 */
function give_email_tag_amount($payment_id)
{
    $payment = new Give_Payment($payment_id);
    $give_amount = give_currency_filter(give_format_amount($payment->total), $payment->currency);
    return html_entity_decode($give_amount, ENT_COMPAT, 'UTF-8');
}
开发者ID:wordimpress,项目名称:give,代码行数:15,代码来源:class-give-email-tags.php


示例15: give_customers_view


//.........这里部分代码省略.........
" />
				<a id="give-edit-customer-cancel" href="" class="delete"><?php 
    _e('Cancel', 'give');
    ?>
</a>
			</span>

		</form>
	</div>

	<?php 
    do_action('give_donor_before_stats', $customer);
    ?>

	<div id="customer-stats-wrapper" class="customer-section postbox clear">
		<ul>
			<li>
				<a title="<?php 
    _e('View All Purchases', 'give');
    ?>
" href="<?php 
    echo admin_url('edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode($customer->email));
    ?>
">
					<span class="dashicons dashicons-heart"></span>
					<?php 
    printf(_n('%d Completed Donation', '%d Completed Donations', $customer->purchase_count, 'give'), $customer->purchase_count);
    ?>
				</a>
			</li>
			<li>
				<span class="dashicons dashicons-chart-area"></span>
				<?php 
    echo give_currency_filter(give_format_amount($customer->purchase_value));
    ?>
 <?php 
    _e('Lifetime Donations', 'give');
    ?>
			</li>
			<?php 
    do_action('give_donor_stats_list', $customer);
    ?>
		</ul>
	</div>

	<?php 
    do_action('give_donor_before_tables_wrapper', $customer);
    ?>

	<div id="customer-tables-wrapper" class="customer-section">

		<?php 
    do_action('give_donor_before_tables', $customer);
    ?>

		<h3><?php 
    _e('Recent Donations', 'give');
    ?>
</h3>
		<?php 
    $payment_ids = explode(',', $customer->payment_ids);
    $payments = give_get_payments(array('post__in' => $payment_ids));
    $payments = array_slice($payments, 0, 10);
    ?>
		<table class="wp-list-table widefat striped payments">
			<thead>
开发者ID:pantelicnevena,项目名称:newhanan,代码行数:67,代码来源:customers.php


示例16: reports_data

 /**
  * Build all the reports data
  *
  * @access public
  * @since  1.0
  * @return array $reports_data All the data for donor reports
  */
 public function reports_data()
 {
     $reports_data = array();
     $gateways = give_get_payment_gateways();
     $stats = new Give_Payment_Stats();
     foreach ($gateways as $gateway_id => $gateway) {
         $complete_count = give_count_sales_by_gateway($gateway_id, 'publish');
         $pending_count = give_count_sales_by_gateway($gateway_id, array('pending', 'failed'));
         $reports_data[] = array('ID' => $gateway_id, 'label' => $gateway['admin_label'], 'complete_sales' => give_format_amount($complete_count, false), 'pending_sales' => give_format_amount($pending_count, false), 'total_sales' => give_format_amount($complete_count + $pending_count, false), 'total_donations' => give_currency_filter(give_format_amount($stats->get_earnings(0, 0, 0, $gateway_id))));
     }
     return $reports_data;
 }
开发者ID:wordimpress,项目名称:give,代码行数:19,代码来源:class-gateways-reports-table.php


示例17: give_purchase_form_validate_gateway

/**
 * Purchase Form Validate Gateway
 *
 * Validate the gateway and donation amount
 *
 * @access      private
 * @since       1.0
 * @return      string
 */
function give_purchase_form_validate_gateway()
{
    $form_id = isset($_REQUEST['give-form-id']) ? $_REQUEST['give-form-id'] : 0;
    $amount = isset($_REQUEST['give-amount']) ? give_sanitize_amount($_REQUEST['give-amount']) : 0;
    $gateway = give_get_default_gateway($form_id);
    // Check if a gateway value is present
    if (!empty($_REQUEST['give-gateway'])) {
        $gateway = sanitize_text_field($_REQUEST['give-gateway']);
        //Is amount being donated in LIVE mode 0.00? If so, error:
        if ($amount == 0 && !give_is_test_mode()) {
            give_set_error('invalid_donation_amount', esc_html__('Please insert a valid donation amount.', 'give'));
        } elseif (!give_verify_minimum_price()) {
            give_set_error('invalid_donation_minimum', sprintf(esc_html__('This form has a minimum donation amount of %s.', 'give'), give_currency_filter(give_format_amount(give_get_form_minimum_price($form_id)))));
        } elseif ($amount == 0 && give_is_test_mode()) {
            $gateway = 'manual';
        } elseif (!give_is_gateway_active($gateway)) {
            give_set_error('invalid_gateway', esc_html__('The selected payment gateway is not enabled.', 'give'));
        }
    }
    return $gateway;
}
开发者ID:wordimpress,项目名称:give,代码行数:30,代码来源:process-purchase.php


示例18: column_default

 /**
  * This function renders most of the columns in the list table.
  *
  * @access public
  * @since  1.0
  *
  * @param array  $item        Contains all the data of the donors
  * @param string $column_name The name of the column
  *
  * @return string Column Name
  */
 public function column_default($item, $column_name)
 {
     switch ($column_name) {
         case 'num_purchases':
             $value = '<a href="' . admin_url('/edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode($item['email'])) . '">' . esc_html($item['num_purchases']) . '</a>';
             break;
         case 'amount_spent':
             $value = give_currency_filter(give_format_amount($item[$column_name]));
             break;
         default:
             $value = isset($item[$column_name]) ? $item[$column_name] : null;
             break;
     }
     return apply_filters('give_report_column_' . $column_name, $value, $item['id']);
 }
开发者ID:wordimpress,项目名称:give,代码行数:26,代码来源:class-donor-reports-table.php


示例19: csv_cols

 /**
  * Set the CSV columns
  *
  * @access public
  * @since  1.0
  * @return array $cols All the columns
  */
 public function csv_cols()
 {
     $cols = array('date' => esc_html__('Date', 'give'), 'donations' => esc_html__('Donations', 'give'), 'earnings' => sprintf(esc_html__('Income (%s)', 'give'), html_entity_decode(give_currency_filter(''))));
     return $cols;
 }
开发者ID:wordimpress,项目名称:give,代码行数:12,代码来源:class-export-earnings.php


示例20: csv_cols

 /**
  * Set the CSV columns
  *
  * @access public
  * @since  1.0
  * @return array $cols All the columns
  */
 public function csv_cols()
 {
     $cols = array('date' => __('Date', 'give'), 'donations' => __('Donations', 'give'), 'earnings' => __('Income', 'give') . ' (' . html_entity_decode(give_currency_filter('')) . ')');
     return $cols;
 }
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:12,代码来源:class-export-earnings.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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