golden hour
/home/godaofbq/hyperxmed.com/wp-content/plugins/essential-blocks/includes/Blocks
⬆️ Go Up
Upload
File/Folder
Size
Actions
Accordion.php
1.01 KB
Del
OK
AccordionItem.php
335 B
Del
OK
AddToCart.php
3.43 KB
Del
OK
AdvancedHeading.php
4.33 KB
Del
OK
AdvancedImage.php
1.94 KB
Del
OK
AdvancedNavigation.php
703 B
Del
OK
AdvancedTabs.php
886 B
Del
OK
AdvancedVideo.php
1021 B
Del
OK
Breadcrumbs.php
11.35 KB
Del
OK
Button.php
351 B
Del
OK
CallToAction.php
365 B
Del
OK
Column.php
220 B
Del
OK
CountDown.php
605 B
Del
OK
DualButton.php
666 B
Del
OK
FeatureList.php
332 B
Del
OK
FlipBox.php
648 B
Del
OK
FluentForms.php
3.77 KB
Del
OK
Form.php
5.4 KB
Del
OK
FormTextField.php
246 B
Del
OK
GoogleMap.php
2.55 KB
Del
OK
Icon.php
323 B
Del
OK
ImageComparison.php
620 B
Del
OK
ImageGallery.php
2.23 KB
Del
OK
InfoBox.php
374 B
Del
OK
InstagramFeed.php
6.05 KB
Del
OK
InteractivePromo.php
321 B
Del
OK
NftGallery.php
649 B
Del
OK
Notice.php
580 B
Del
OK
NumberCounter.php
598 B
Del
OK
Openverse.php
480 B
Del
OK
ParallaxSlider.php
664 B
Del
OK
PopUp.php
625 B
Del
OK
PostBlock.php
1.57 KB
Del
OK
PostCarousel.php
4.42 KB
Del
OK
PostGrid.php
5.75 KB
Del
OK
PostMeta.php
3.51 KB
Del
OK
PricingTable.php
333 B
Del
OK
ProductDetails.php
3.51 KB
Del
OK
ProductImages.php
2.8 KB
Del
OK
ProductPrice.php
4.75 KB
Del
OK
ProductRating.php
2.97 KB
Del
OK
ProgressBar.php
604 B
Del
OK
Row.php
455 B
Del
OK
ShapeDivider.php
602 B
Del
OK
Slider.php
996 B
Del
OK
Social.php
352 B
Del
OK
SocialShare.php
3.89 KB
Del
OK
Tab.php
214 B
Del
OK
TableOfContents.php
17.3 KB
Del
OK
Taxonomy.php
4.9 KB
Del
OK
TeamMember.php
361 B
Del
OK
Testimonial.php
373 B
Del
OK
Text.php
2.48 KB
Del
OK
ToggleContent.php
613 B
Del
OK
TypingText.php
594 B
Del
OK
WPForms.php
2.92 KB
Del
OK
WooProductGrid.php
8.3 KB
Del
OK
Wrapper.php
359 B
Del
OK
error_log
268.39 KB
Del
OK
price.php
239 B
Del
OK
Edit: Taxonomy.php
<?php namespace EssentialBlocks\Blocks; use EssentialBlocks\Core\Block; use EssentialBlocks\Utils\Helper; class Taxonomy extends Block { protected $frontend_styles = [ 'essential-blocks-fontawesome' ]; /** * Unique name of the block. * * @return string */ public function get_name() { return 'taxonomy'; } protected static $default_attributes = [ 'source' => 'current-post', 'selectedTaxonomy' => '', 'prefixType' => 'none', 'prefixIcon' => 'fas fa-list', 'prefixText' => 'Prefix Text', 'suffixType' => 'none', 'suffixIcon' => 'fas fa-list', 'suffixText' => 'Suffix Text', 'displayStyle' => 'display-inline', 'showSeparator' => false, 'separator' => "|", 'taxonomyLimit' => 1 ]; /** * Block render callback. * * @param mixed $attributes * @param mixed $content * @return mixed */ public function render_callback( $attributes, $content ) { if ( is_admin() ) { return; } $attributes = wp_parse_args( $attributes, self::$default_attributes ); $className = isset( $attributes[ "className" ] ) ? $attributes[ "className" ] : ""; $classHook = isset( $attributes[ 'classHook' ] ) ? $attributes[ 'classHook' ] : ''; $prefixType = isset( $attributes[ 'prefixType' ] ) ? $attributes[ 'prefixType' ] : ''; $suffixType = isset( $attributes[ 'suffixType' ] ) ? $attributes[ 'suffixType' ] : ''; if ( $attributes[ 'source' ] === 'current-post' ) { $terms = get_the_terms( get_the_ID(), $attributes[ 'selectedTaxonomy' ] ); if ( ! empty( $terms ) && ! empty( $attributes[ 'taxonomyLimit' ] ) && $attributes[ 'taxonomyLimit' ] !== -1 ) { $terms = array_slice( $terms, 0, $attributes[ 'taxonomyLimit' ] ); } } else { $args = [ 'taxonomy' => $attributes[ 'selectedTaxonomy' ], 'hide_empty' => false ]; if ( $attributes[ 'taxonomyLimit' ] !== -1 ) { $args[ 'number' ] = $attributes[ 'taxonomyLimit' ]; } $terms = get_terms( $args ); } $categories = ''; if ( ! empty( $terms ) ) { $categories .= '<div class="eb-tax-wrap">'; foreach ( $terms as $term ) { $categories .= sprintf( '<span class="eb-tax-item"><a href="%1$s" title="%2$s">%2$s</a></span>', esc_attr( esc_url( get_category_link( $term->term_id ) ) ), esc_html( $term->name ) ); if ( $attributes[ 'showSeparator' ] ) { $categories .= sprintf( '<span class="eb-tax-separator">%1$s</span>', esc_html( $attributes[ 'separator' ] ) ); } } $categories .= '</div>'; } else { return; } if ( $prefixType !== 'none' ) { if ( $prefixType === 'icon' ) { $prefix_icon = sprintf( '%1$s', Helper::eb_render_icon( Helper::eb_get_icon_type( $attributes[ 'prefixIcon' ] ), 'eb-button-icon', $attributes[ 'prefixIcon' ] ) ); $prefix_markup = sprintf( '<div class="prefix-wrap">%1$s</div>', $prefix_icon ); } if ( $prefixType === 'text' ) { $prefix_markup = sprintf( '<div class="prefix-wrap"><span>%1$s</span></div>', $attributes[ 'prefixText' ] ); } } else { $prefix_markup = ''; } if ( $suffixType !== 'none' ) { if ( $suffixType === 'icon' ) { $suffix_icon = sprintf( '%1$s', Helper::eb_render_icon( Helper::eb_get_icon_type( $attributes[ 'suffixIcon' ] ), 'eb-button-icon', $attributes[ 'suffixIcon' ] ) ); $suffix_markup = sprintf( '<div class="suffix-wrap">%1$s</div>', $suffix_icon ); } if ( $suffixType === 'text' ) { $suffix_markup = sprintf( '<div class="suffix-wrap"><span>%1$s</span></div>', $attributes[ 'suffixText' ] ); } } else { $suffix_markup = ''; } ob_start(); Helper::views( 'taxonomy', array_merge( $attributes, [ 'className' => $className, 'classHook' => $classHook, 'categories' => $categories, 'prefix_markup' => $prefix_markup, 'suffix_markup' => $suffix_markup ] ) ); return ob_get_clean(); } }
Save