PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 2.12.0
GiveWP – Donation Plugin and Fundraising Platform v2.12.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 / Log / Assets.php

Assets.php in GiveWP – Donation Plugin and Fundraising Platform 2.12.0, at src/Log/Assets.php

37 lines 665 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\Log;
4
5 use Give\Log\ValueObjects\LogType;
6
7 /**
8 * Class Assets
9 * @package Give\Log\UserInterface
10 *
11 * @since 2.10.0
12 */
13 class Assets {
14 /**
15 * Enqueue scripts
16 */
17 public function enqueueScripts() {
18 wp_enqueue_script(
19 'give-admin-log-list-table-app',
20 GIVE_PLUGIN_URL . 'assets/dist/js/give-log-list-table-app.js',
21 [ 'wp-element', 'wp-i18n' ],
22 GIVE_VERSION,
23 true
24 );
25
26 wp_localize_script(
27 'give-admin-log-list-table-app',
28 'GiveLogs',
29 [
30 'apiRoot' => esc_url_raw( rest_url( 'give-api/v2/logs' ) ),
31 'apiNonce' => wp_create_nonce( 'wp_rest' ),
32 'logTypes' => LogType::getTypesTranslated(),
33 ]
34 );
35 }
36 }
37