PATH:
home
/
ajwellnessmassag
/
angelictravels.online
/
wp-content
/
plugins
/
essential-blocks
/
includes
/
Blocks
<?php namespace EssentialBlocks\Blocks; use EssentialBlocks\Core\Block; use EssentialBlocks\Utils\Helper; class AdvancedImage extends Block { protected $frontend_styles = [ 'essential-blocks-fontawesome' ]; /** * Unique name of the block. * * @return string */ public function get_name() { return 'advanced-image'; } protected static $default_attributes = [ 'imgSource' => 'custom', 'stylePreset' => 'rounded', 'hoverEffect' => 'no-effect', 'enableLink' => false, 'openInNewTab' => false, 'width' => 120, 'imagePostId' => 0, 'imageSize' => '', 'rel' => '' ]; /** * Check if we're in a Loop Builder context * * @param array $context * @return bool */ private function is_in_loop_builder_context( $context ) { return isset( $context[ 'essential-blocks/isLoopBuilder' ] ) && $context[ 'essential-blocks/isLoopBuilder' ] === true; } /** * Block render callback. * * @param mixed $attributes * @param mixed $content * @param mixed $block Block object containing context * @return mixed */ public function render_callback( $attributes, $content, $block = null ) { if ( is_admin() ) { return; } $attributes = wp_parse_args( $attributes, self::$default_attributes ); $className = isset( $attributes[ "className" ] ) ? $attributes[ "className" ] : ""; $classHook = isset( $attributes[ 'classHook' ] ) ? $attributes[ 'classHook' ] : ''; // Check if we're in a Loop Builder context $context = isset( $block->context ) ? $block->context : []; $is_in_loop_builder = $this->is_in_loop_builder_context( $context ); if ( $attributes[ 'imgSource' ] === 'custom' ) { return $content; } elseif ( $attributes[ 'imgSource' ] == 'site-logo' ) { ob_start(); Helper::views( 'advanced-image/site-logo', array_merge( $attributes, [ 'className' => $className, 'classHook' => $classHook ] ) ); return ob_get_clean(); } elseif ( $attributes[ 'imgSource' ] == 'featured-img' ) { ob_start(); Helper::views( 'advanced-image/featured-image', array_merge( $attributes, [ 'className' => $className, 'classHook' => $classHook, 'isInLoopBuilder' => $is_in_loop_builder, 'placeholderImageUrl' => defined('ESSENTIAL_BLOCKS_PLACEHOLDER_IMAGE') ? \ESSENTIAL_BLOCKS_PLACEHOLDER_IMAGE : \ESSENTIAL_BLOCKS_URL . 'assets/images/placeholder.png' ] ) ); return ob_get_clean(); } } }
[-] 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]