PATH:
home
/
ajwellnessmassag
/
angelictravels.online
/
wp-content
/
plugins
/
essential-blocks
/
includes
/
Blocks
<?php /** * Functions to register client-side assets (scripts and stylesheets) for the * Gutenberg block. * * @package essential-blocks */ /** * Registers all block assets so that they can be enqueued through Gutenberg in * the corresponding context. * * @see https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/block-tutorial/applying-styles-with-stylesheets/ */ namespace EssentialBlocks\Blocks; use EssentialBlocks\Core\Block; class GoogleMap extends Block { protected $frontend_scripts = [ 'essential-blocks-google-map-frontend', 'essential-blocks-google-map-script' ]; /** * Unique name of the block. * * @return string */ public function get_name() { return 'google-map'; } private $api_key = ''; public function __construct() { $settings = get_option( 'eb_settings', [ ] ); if ( is_array( $settings ) && ! empty( $settings[ 'googleMapApi' ] ) ) { $this->api_key = $settings[ 'googleMapApi' ]; } } /** * Register all other scripts * * @return void */ public function register_scripts() { $this->assets_manager->register( 'google-map-frontend', $this->path() . '/frontend.js', ); if ( ! empty( $this->api_key ) ) { // Only for editor if ( is_admin() ) { $this->assets_manager->enqueue( 'google-map-script-editor', 'https://maps.googleapis.com/maps/api/js?key=' . $this->api_key . '&callback=Function.prototype&libraries=places&cache=' . wp_rand( 10, 1000 ), [ ], [ 'is_js' => true ] ); } // For frontend $this->assets_manager->register( 'google-map-script', 'https://maps.googleapis.com/maps/api/js?key=' . $this->api_key . '&callback=Function.prototype&libraries=places&cache=' . wp_rand( 10, 1000 ), [ ], [ 'is_js' => true ] ); } } public function render_callback( $attributes, $content ) { if ( empty( $this->api_key ) ) { if ( get_current_user_id() ) { $html = __( 'Please add your Google Map API to display Google Maps Block', 'essential-blocks' ); return $html; } else { return; } } return $content; } }
[-] FlexContainer.php
[edit]
[-] ProductDetails.php
[edit]
[-] WooProductGrid.php
[edit]
[-] Timeline.php
[edit]
[-] Notice.php
[edit]
[-] AdvancedImage.php
[edit]
[-] GoogleMap.php
[edit]
[-] WPForms.php
[edit]
[-] AdvancedVideo.php
[edit]
[-] ProgressBar.php
[edit]
[-] ImageComparison.php
[edit]
[-] AdvancedHeading.php
[edit]
[-] PostGrid.php
[edit]
[-] FormTextField.php
[edit]
[-] ToggleContent.php
[edit]
[-] Text.php
[edit]
[-] PricingTable.php
[edit]
[-] DualButton.php
[edit]
[-] Accordion.php
[edit]
[-] Social.php
[edit]
[-] AdvancedNavigation.php
[edit]
[-] PopUp.php
[edit]
[-] PostBlock.php
[edit]
[-] Form.php
[edit]
[-] Icon.php
[edit]
[-] Tab.php
[edit]
[-] CountDown.php
[edit]
[-] Taxonomy.php
[edit]
[-] TypingText.php
[edit]
[-] AccordionItem.php
[edit]
[-] ProductRating.php
[edit]
[-] ProductImages.php
[edit]
[-] Row.php
[edit]
[-] ShapeDivider.php
[edit]
[-] LottieAnimation.php
[edit]
[-] AddToCart.php
[edit]
[-] FlipBox.php
[edit]
[-] price.php
[edit]
[-] SocialShare.php
[edit]
[-] Slider.php
[edit]
[-] NftGallery.php
[edit]
[-] PostMeta.php
[edit]
[-] InstagramFeed.php
[edit]
[+]
..
[-] InfoBox.php
[edit]
[-] Breadcrumbs.php
[edit]
[-] PostCarousel.php
[edit]
[-] AdvancedTabs.php
[edit]
[-] ParallaxSlider.php
[edit]
[-] Wrapper.php
[edit]
[-] Button.php
[edit]
[-] Openverse.php
[edit]
[-] ImageHotspots.php
[edit]
[-] ImageGallery.php
[edit]
[-] Testimonial.php
[edit]
[-] CallToAction.php
[edit]
[-] FeatureList.php
[edit]
[-] InteractivePromo.php
[edit]
[-] NumberCounter.php
[edit]
[-] TeamMember.php
[edit]
[-] FluentForms.php
[edit]
[-] Column.php
[edit]
[-] TableOfContents.php
[edit]
[-] ProductPrice.php
[edit]