PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 2.23.0
GiveWP – Donation Plugin and Fundraising Platform v2.23.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.23.0, at src/Log/Assets.php

36 lines 761 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\Helpers\EnqueueScript;
6 use Give\Log\ValueObjects\LogType;
7
8 /**
9 * Class Assets
10 * @package Give\Log\UserInterface
11 *
12 * @since 2.10.0
13 */
14 class Assets
15 {
16 /**
17 * Enqueue scripts
18 */
19 public function enqueueScripts()
20 {
21 $data = [
22 'apiRoot' => esc_url_raw(rest_url('give-api/v2/logs')),
23 'apiNonce' => wp_create_nonce('wp_rest'),
24 'logTypes' => LogType::getTypesTranslated()
25 ];
26
27 EnqueueScript::make(
28 'give-admin-log-list-table-app',
29 'assets/dist/js/give-log-list-table-app.js'
30 )->loadInFooter()
31 ->registerTranslations()
32 ->registerLocalizeData('GiveLogs', $data)
33 ->enqueue();
34 }
35 }
36