PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
give / src / DonationSummary / Assets.php

Assets.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.9, at src/DonationSummary/Assets.php

45 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\DonationSummary;
4
5 /**
6 * @since 2.17.0
7 */
8 class Assets
9 {
10
11 /**
12 * @since 2.17.0
13 */
14 public function loadFrontendAssets()
15 {
16 wp_enqueue_style(
17 'give-donation-summary-style-frontend',
18 GIVE_PLUGIN_URL . 'build/assets/dist/css/give-donation-summary.css',
19 [],
20 GIVE_VERSION
21 );
22
23 wp_enqueue_script(
24 'give-donation-summary-script-frontend',
25 GIVE_PLUGIN_URL . 'build/assets/dist/js/give-donation-summary.js',
26 ['wp-i18n'],
27 GIVE_VERSION,
28 true
29 );
30
31 wp_localize_script(
32 'give-donation-summary-script-frontend',
33 'GiveDonationSummaryData',
34 [
35 'currencyPrecisionLookup' => array_map(function ($currency) {
36 return $currency['setting']['number_decimals'];
37 }, give_get_currencies_list()),
38 'recurringLabelLookup' => function_exists('give_recurring_get_default_pretty_periods')
39 ? give_recurring_get_default_pretty_periods()
40 : [],
41 ]
42 );
43 }
44 }
45