PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.8
Yatra – Travel Booking & Tour Operator Software v3.0.8
3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 2.0.10 All 83 releases
yatra / app / Core / Assets / ListingAssetManager.php

ListingAssetManager.php in Yatra – Travel Booking & Tour Operator Software 3.0.8, at app/Core/Assets/ListingAssetManager.php

36 lines 855 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Yatra\Core\Assets;
6
7 /**
8 * Listing Page Asset Manager
9 */
10 class ListingAssetManager extends BaseAssetManager
11 {
12 private string $listing_type;
13
14 public function __construct(string $listing_type)
15 {
16 parent::__construct('listing');
17
18 $this->listing_type = $listing_type;
19
20 $this->addStyle('yatra-listing');
21 $this->addScript('yatra-listing');
22
23 $data = [
24 'type' => $listing_type,
25 'ajaxUrl' => admin_url('admin-ajax.php'),
26 'nonce' => wp_create_nonce('yatra_listing_nonce'),
27 ];
28
29 if ($listing_type === 'trip' && function_exists('yatra_get_trip_listing_url')) {
30 $data['tripListingUrl'] = \yatra_get_trip_listing_url();
31 }
32
33 $this->addLocalization('yatra-listing', 'yatraListing', $data);
34 }
35 }
36