| @@ -3,8 +3,9 @@ | ||
| 3 | 3 | declare(strict_types=1); |
| 4 | 4 | |
| 5 | 5 | namespace Yatra\Blocks; |
| 6 | 6 | |
| 7 | +use Yatra\Providers\FrontendAssetsProvider; | |
| 7 | 8 | use Yatra\Services\BlockDataService; |
| 8 | 9 | |
| 9 | 10 | /** |
| 10 | 11 | * Destination Block |
| @@ -47,8 +48,10 @@ | ||
| 47 | 48 | if (! BlockEditorScript::register('yatra-destination-block-editor', 'destination', $editorDeps)) { |
| 48 | 49 | return; |
| 49 | 50 | } |
| 50 | 51 | |
| 52 | + FrontendAssetsProvider::registerCoreFrontendStylesheets(); | |
| 53 | + | |
| 51 | 54 | wp_register_style( |
| 52 | 55 | 'yatra-listing', |
| 53 | 56 | \YATRA_PLUGIN_URL . 'assets/css/listing.css', |
| 54 | 57 | [], |
| @@ -54,13 +57,15 @@ | ||
| 54 | 57 | [], |
| 55 | 58 | YATRA_VERSION |
| 56 | 59 | ); |
| 57 | 60 | |
| 61 | + $destinationShortcodeCss = \YATRA_PLUGIN_PATH . 'assets/css/shortcodes/destination-shortcode.css'; | |
| 62 | + $destinationShortcodeVer = is_readable($destinationShortcodeCss) ? YATRA_VERSION . '.' . filemtime($destinationShortcodeCss) : YATRA_VERSION; | |
| 58 | 63 | wp_register_style( |
| 59 | 64 | 'yatra-destination-shortcode', |
| 60 | 65 | \YATRA_PLUGIN_URL . 'assets/css/shortcodes/destination-shortcode.css', |
| 61 | - [], | |
| 62 | - YATRA_VERSION | |
| 66 | + FrontendAssetsProvider::shortcodeStyleDependencies(), | |
| 67 | + $destinationShortcodeVer | |
| 63 | 68 | ); |
| 64 | 69 | |
| 65 | 70 | wp_register_script( |
| 66 | 71 | 'yatra-destination-shortcode', |