| 1 |
<?php |
| 2 |
namespace ABlocks\Classes; |
| 3 |
|
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; |
| 6 |
} |
| 7 |
|
| 8 |
|
| 9 |
class RegisterScripts { |
| 10 |
public static function get_register_styles() { |
| 11 |
return apply_filters('ablocks/register_styles', [ |
| 12 |
'ablocks-leaflet-style' => [ |
| 13 |
'path' => ABLOCKS_ASSETS_PATH . 'library/leaflet/leaflet.css', |
| 14 |
'url' => ABLOCKS_ASSETS_URL . 'library/leaflet/leaflet.css', |
| 15 |
'deps' => array(), |
| 16 |
'ver' => false, |
| 17 |
'media' => 'all' |
| 18 |
], |
| 19 |
'ablocks-leaflet-full-screen-style' => [ |
| 20 |
'path' => ABLOCKS_ASSETS_PATH . 'library/leaflet/leaflet.fullscreen.css', |
| 21 |
'url' => ABLOCKS_ASSETS_URL . 'library/leaflet/leaflet.fullscreen.css', |
| 22 |
'deps' => array(), |
| 23 |
'ver' => false, |
| 24 |
'media' => 'all' |
| 25 |
], |
| 26 |
'ablocks-animate-style' => [ |
| 27 |
'path' => ABLOCKS_ASSETS_PATH . 'library/animate/animate.min.css', |
| 28 |
'url' => ABLOCKS_ASSETS_URL . 'library/animate/animate.min.css', |
| 29 |
'deps' => array(), |
| 30 |
'ver' => false, |
| 31 |
'media' => 'all' |
| 32 |
], |
| 33 |
'ablocks-swiper-style' => [ |
| 34 |
'path' => ABLOCKS_ASSETS_PATH . 'library/swiper/swiper-bundle.min.css', |
| 35 |
'url' => ABLOCKS_ASSETS_URL . 'library/swiper/swiper-bundle.min.css', |
| 36 |
'deps' => array(), |
| 37 |
'ver' => false, |
| 38 |
'media' => 'all' |
| 39 |
], |
| 40 |
'ablocks-common-style' => [ |
| 41 |
'path' => ABLOCKS_ASSETS_PATH . 'build/blocks-common.css', |
| 42 |
'url' => ABLOCKS_ASSETS_URL . 'build/blocks-common.css', |
| 43 |
'deps' => array(), |
| 44 |
'ver' => false, |
| 45 |
'media' => 'all' |
| 46 |
], |
| 47 |
]); |
| 48 |
} |
| 49 |
public static function get_register_scripts() { |
| 50 |
return apply_filters('ablocks/register_scripts', [ |
| 51 |
'ablocks-leaflet-script' => [ |
| 52 |
'path' => ABLOCKS_ASSETS_PATH . 'library/leaflet/leaflet.js', |
| 53 |
'url' => ABLOCKS_ASSETS_URL . 'library/leaflet/leaflet.js', |
| 54 |
'deps' => array(), |
| 55 |
'ver' => false, |
| 56 |
'args' => false, |
| 57 |
], |
| 58 |
'ablocks-leaflet-full-screen-script' => [ |
| 59 |
'path' => ABLOCKS_ASSETS_PATH . 'library/leaflet/Leaflet.fullscreen.js', |
| 60 |
'url' => ABLOCKS_ASSETS_URL . 'library/leaflet/Leaflet.fullscreen.js', |
| 61 |
'deps' => array(), |
| 62 |
'ver' => false, |
| 63 |
'args' => false, |
| 64 |
], |
| 65 |
'ablocks-swiper-script' => [ |
| 66 |
'path' => ABLOCKS_ASSETS_PATH . 'library/swiper/swiper-bundle.min.js', |
| 67 |
'url' => ABLOCKS_ASSETS_URL . 'library/swiper/swiper-bundle.min.js', |
| 68 |
'deps' => array(), |
| 69 |
'ver' => false, |
| 70 |
'args' => false, |
| 71 |
], |
| 72 |
'ablocks-chart.js-script' => [ |
| 73 |
'path' => ABLOCKS_ASSETS_PATH . 'library/chart/chart.js', |
| 74 |
'url' => ABLOCKS_ASSETS_URL . 'library/chart/chart.js', |
| 75 |
'deps' => array(), |
| 76 |
'ver' => false, |
| 77 |
'args' => false, |
| 78 |
], |
| 79 |
'ablocks-common-script' => [ |
| 80 |
'path' => ABLOCKS_ASSETS_PATH . 'build/blocks-common.js', |
| 81 |
'url' => ABLOCKS_ASSETS_URL . 'build/blocks-common.js', |
| 82 |
'deps' => array(), |
| 83 |
'ver' => false, |
| 84 |
'args' => true, |
| 85 |
'dependencies' => ABLOCKS_ASSETS_PATH . 'build/blocks-common.asset.php' |
| 86 |
], |
| 87 |
]); |
| 88 |
} |
| 89 |
} |
| 90 |
|