PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 2.17.0
GiveWP – Donation Plugin and Fundraising Platform v2.17.0
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 2.31.0 2.31.1 All 253 releases
give / src / DonationSummary / Assets.php
Assets.php
44 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 * @since 2.17.0
12 */
13 public function loadFrontendAssets() {
14
15 wp_enqueue_style(
16 'give-donation-summary-style-frontend',
17 GIVE_PLUGIN_URL . 'assets/dist/css/give-donation-summary.css',
18 [],
19 GIVE_VERSION
20 );
21
22 wp_enqueue_script(
23 'give-donation-summary-script-frontend',
24 GIVE_PLUGIN_URL . 'assets/dist/js/give-donation-summary.js',
25 [ 'wp-i18n' ],
26 GIVE_VERSION,
27 true
28 );
29
30 wp_localize_script(
31 'give-donation-summary-script-frontend',
32 'GiveDonationSummaryData',
33 [
34 'currencyPrecisionLookup' => array_map(function( $currency ) {
35 return $currency['setting']['number_decimals'];
36 }, give_get_currencies_list() ),
37 'recurringLabelLookup' => function_exists( 'give_recurring_get_default_pretty_periods' )
38 ? give_recurring_get_default_pretty_periods()
39 : [],
40 ]
41 );
42 }
43 }
44