__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php
namespace EssentialBlocks\Blocks;

use EssentialBlocks\Core\Block;
use EssentialBlocks\Utils\Helper;

class Breadcrumbs extends Block
{
    protected $frontend_styles = [ 'essential-blocks-fontawesome' ];

    private $attributesList = [  ];
    /**
     * Unique name of the block.
     *
     * @return string
     */
    public function get_name()
    {
        return 'breadcrumbs';
    }

    protected static $default_attributes = [
        'showPrefix'    => false,
        'showHomePage'  => true,
        'homePageLabel' => 'Home',
        'prefixType'    => 'text',
        'prefixIcon'    => 'fas fa-house-chimney-window',
        'prefixText'    => 'Browse:',
        'separatorType' => 'text',
        'separatorText' => '/',
        'separatorIcon' => 'fas fa-angle-right'
     ];

    public function eb_breadcrumb_separator()
    {
        $attributes = $this->attributesList;

        if ( $attributes[ 'separatorType' ] == 'icon' && $attributes[ 'separatorIcon' ] ) {
            $separator_icon = sprintf(
                '%1$s',
                Helper::eb_render_icon( Helper::eb_get_icon_type( $attributes[ 'separatorIcon' ] ), 'eb-button-icon', $attributes[ 'separatorIcon' ] )
            );
            return sprintf(
                '<span class="eb-breadcrumb-separator">%1$s</span>',
                $separator_icon
            );
        } else {
            return sprintf(
                '<span class="eb-breadcrumb-separator">%1$s</span>',
                $attributes[ 'separatorText' ]
            );
        }
    }

    public function eb_wc_breadcrumb_defaults()
    {
        $attributes = $this->attributesList;

        $showHomePage = $attributes[ 'showHomePage' ];
        $homeLabel    = ( $showHomePage && ! empty( $attributes[ 'homePageLabel' ] ) ) ? $attributes[ 'homePageLabel' ] : '';

        return [
            'delimiter'   => $this->eb_breadcrumb_separator(),
            'wrap_before' => '<nav class="eb-breadcrumb woocommerce-breadcrumb" itemprop="breadcrumb">',
            'wrap_after'  => '</nav>',
            'before'      => '<span class="eb-breadcrumb-item">',
            'after'       => '</span>',
            'home'        => $homeLabel
         ];
    }

    public function eb_breadcrumb_markup()
    {

        $attributes = $this->attributesList;

        $showHomePage = $attributes[ 'showHomePage' ];
        $homeLabel    = $attributes[ 'homePageLabel' ];

        $delimiter   = $this->eb_breadcrumb_separator(); // delimiter between crumbs
        $showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show
        $before      = '<span class="eb-breadcrumb-item current">'; // tag before the current crumb
        $after       = '</span>'; // tag after the current crumb

        global $post;
        $homeLink = get_bloginfo( 'url' );
        $output   = ''; // Initialize an empty string to store the output

        if ( is_home() || is_front_page() ) {
            if ( $showHomePage == true && ! empty( $homeLabel ) ) {
                $output .= '<div class="eb-breadcrumb"><span class="eb-breadcrumb-item"><a href="' . $homeLink . '">' . $homeLabel . '</a></span></div>';
            }
        } else {
            if ( $showHomePage == true && ! empty( $homeLabel ) ) {
                $output .= '<div class="eb-breadcrumb"><span class="eb-breadcrumb-item"><a href="' . $homeLink . '">' . $homeLabel . '</a></span>' . $delimiter;
            }

            if ( is_category() ) {
                $thisCat = get_category( get_query_var( 'cat' ), false );
                if ( $thisCat->parent != 0 ) {
                    $output .= get_category_parents( $thisCat->parent, true, ' ' . $delimiter . ' ' );
                }
                $output .= $before . 'Archive by category "' . single_cat_title( '', false ) . '"' . $after;
            } elseif ( is_search() ) {
                $output .= $before . 'Search results for "' . get_search_query() . '"' . $after;
            } elseif ( is_day() ) {
                $output .= '<span class="eb-breadcrumb-item"><a href="' . get_year_link( get_the_time( 'Y' ) ) . '">' . get_the_time( 'Y' ) . '</a></span>' . $delimiter;
                $output .= '<span class="eb-breadcrumb-item"><a href="' . get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) . '">' . get_the_time( 'F' ) . '</a></span>' . $delimiter;
                $output .= $before . get_the_time( 'd' ) . $after;
            } elseif ( is_month() ) {
                $output .= '<span class="eb-breadcrumb-item"><a href="' . get_year_link( get_the_time( 'Y' ) ) . '">' . get_the_time( 'Y' ) . '</a></span>' . $delimiter;
                $output .= $before . get_the_time( 'F' ) . $after;
            } elseif ( is_year() ) {
                $output .= $before . get_the_time( 'Y' ) . $after;
            } elseif ( is_single() && ! is_attachment() ) {
                if ( get_post_type() != 'post' ) {
                    $post_type = get_post_type_object( get_post_type() );
                    $slug      = $post_type->rewrite;
                    $output .= '<span class="eb-breadcrumb-item"><a href="' . $homeLink . '/' . $slug[ 'slug' ] . '/">' . $post_type->labels->singular_name . '</a></span>';
                    if ( $showCurrent == 1 ) {
                        $output .= ' ' . $delimiter . ' ' . $before . get_the_title() . $after;
                    }
                } else {
                    $cat  = get_the_category();
                    $cat  = $cat[ 0 ];
                    $cats = get_category_parents( $cat, true, ' ' . $delimiter . ' ' );
                    if ( $showCurrent == 0 ) {
                        $cats = preg_replace( "#^(.+)\s$delimiter\s$#", "$1", $cats );
                    }
                    $output .= $cats;
                    if ( $showCurrent == 1 ) {
                        $output .= $before . get_the_title() . $after;
                    }
                }
            } elseif ( ! is_single() && ! is_page() && get_post_type() != 'post' && ! is_404() ) {
                $post_type = get_post_type_object( get_post_type() );
                $output .= $before . $post_type->labels->singular_name . $after;
            } elseif ( is_attachment() ) {
                $parent = get_post( $post->post_parent );
                $cat    = get_the_category( $parent->ID );
                $cat    = $cat[ 0 ];
                $output .= get_category_parents( $cat, true, ' ' . $delimiter . ' ' );
                $output .= '<span class="eb-breadcrumb-item"><a href="' . get_permalink( $parent ) . '">' . $parent->post_title . '</a></span>';
                if ( $showCurrent == 1 ) {
                    $output .= ' ' . $delimiter . ' ' . $before . get_the_title() . $after;
                }
            } elseif ( is_page() && ! $post->post_parent ) {
                if ( $showCurrent == 1 ) {
                    $output .= $before . get_the_title() . $after;
                }
            } elseif ( is_page() && $post->post_parent ) {
                $parent_id   = $post->post_parent;
                $breadcrumbs = [  ];
                while ( $parent_id ) {
                    $page            = get_page( $parent_id );
                    $breadcrumbs[  ] = '<span class="eb-breadcrumb-item"><a href="' . get_permalink( $page->ID ) . '">' . get_the_title( $page->ID ) . '</a></span>';
                    $parent_id       = $page->post_parent;
                }
                $breadcrumbs = array_reverse( $breadcrumbs );
                for ( $i = 0; $i < count( $breadcrumbs ); $i++ ) {
                    $output .= $breadcrumbs[ $i ];
                    if ( $i != count( $breadcrumbs ) - 1 ) {
                        $output .= ' ' . $delimiter . ' ';
                    }
                }
                if ( $showCurrent == 1 ) {
                    $output .= ' ' . $delimiter . ' ' . $before . get_the_title() . $after;
                }
            } elseif ( is_tag() ) {
                $output .= $before . 'Posts tagged "' . single_tag_title( '', false ) . '"' . $after;
            } elseif ( is_author() ) {
                global $author;
                $userdata = get_userdata( $author );
                $output .= $before . 'Articles posted by ' . $userdata->display_name . $after;
            } elseif ( is_404() ) {
                $output .= $before . 'Error 404' . $after;
            }

            if ( get_query_var( 'paged' ) ) {
                if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) {
                    $output .= ' (';
                }
                $output .= __( 'Page', 'essential-blocks' ) . ' ' . get_query_var( 'paged' );
                if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) {
                    $output .= ')';
                }
            }
            $output .= '</div>';
        }

        return $output;
    }

    /**
     * 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 );
        $this->attributesList = $attributes;

        $classHook  = isset( $attributes[ 'classHook' ] ) ? $attributes[ 'classHook' ] : '';
        $showPrefix = isset( $attributes[ 'showPrefix' ] ) ? $attributes[ 'showPrefix' ] : false;
        $prefixType = isset( $attributes[ 'prefixType' ] ) ? $attributes[ 'prefixType' ] : '';

        if ( $showPrefix === true && $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
            );
        } elseif ( $showPrefix === true && $prefixType === 'text' ) {
            $prefix_markup = sprintf(
                '<div class="prefix-wrap"><span>%1$s</span></div>',
                $attributes[ 'prefixText' ]
            );
        } else {
            $prefix_markup = '';
        }

        $_parent_classes = [
            'eb-parent-wrapper',
            'eb-parent-' . $attributes[ 'blockId' ],
            'root-' . $attributes[ 'blockId' ],
            $classHook
         ];

        $parent_attributes = get_block_wrapper_attributes( [ 'class' => implode( ' ', $_parent_classes ) ] );

        $breadcrumb_markup = '';
        $product           = false;

        if ( class_exists( 'WooCommerce' ) ) {
            $product = wc_get_product( get_the_ID() );
        }

        if ( ! $product ) {
            $breadcrumb_markup = $this->eb_breadcrumb_markup();
        } else {

            add_filter( 'woocommerce_breadcrumb_defaults', [ $this, 'eb_wc_breadcrumb_defaults' ] );
            ob_start();
            woocommerce_breadcrumb();
            $breadcrumb_markup = ob_get_clean();
        }

        $wrapper = sprintf( '
        <div %1$s>
            <div aria-label="Breadcrumb" class="eb-breadcrumb-wrapper %2$s" data-id="%2$s">
                %3$s
                %4$s
            </div>
        </div>',
            $parent_attributes,
            $attributes[ 'blockId' ],
            $prefix_markup,
            $breadcrumb_markup,
        );

        return wp_kses_post( $wrapper );
    }
}

Filemanager

Name Type Size Permission Actions
Accordion.php File 1.03 KB 0640
AccordionItem.php File 335 B 0640
AddToCart.php File 3.43 KB 0640
AdvancedHeading.php File 5.73 KB 0640
AdvancedImage.php File 2.77 KB 0640
AdvancedNavigation.php File 703 B 0640
AdvancedTabs.php File 886 B 0640
AdvancedVideo.php File 1021 B 0640
Breadcrumbs.php File 11.37 KB 0640
Button.php File 3.82 KB 0640
CallToAction.php File 365 B 0640
Column.php File 220 B 0640
CountDown.php File 605 B 0640
DualButton.php File 666 B 0640
FeatureList.php File 332 B 0640
FlexContainer.php File 371 B 0640
FlipBox.php File 648 B 0640
FluentForms.php File 3.77 KB 0640
Form.php File 5.72 KB 0640
FormTextField.php File 246 B 0640
GoogleMap.php File 2.55 KB 0640
Icon.php File 323 B 0640
ImageComparison.php File 620 B 0640
ImageGallery.php File 2.26 KB 0640
InfoBox.php File 761 B 0640
InstagramFeed.php File 5.89 KB 0640
InteractivePromo.php File 321 B 0640
LottieAnimation.php File 608 B 0640
NftGallery.php File 649 B 0640
Notice.php File 580 B 0640
NumberCounter.php File 598 B 0640
Openverse.php File 480 B 0640
ParallaxSlider.php File 664 B 0640
PopUp.php File 625 B 0640
PostBlock.php File 1.57 KB 0640
PostCarousel.php File 4.62 KB 0640
PostGrid.php File 5.79 KB 0640
PostMeta.php File 7.24 KB 0640
PricingTable.php File 333 B 0640
ProductDetails.php File 3.51 KB 0640
ProductImages.php File 2.83 KB 0640
ProductPrice.php File 4.75 KB 0640
ProductRating.php File 2.97 KB 0640
ProgressBar.php File 604 B 0640
Row.php File 455 B 0640
ShapeDivider.php File 602 B 0640
Slider.php File 1.09 KB 0640
Social.php File 352 B 0640
SocialShare.php File 3.89 KB 0640
Tab.php File 214 B 0640
TableOfContents.php File 17.38 KB 0640
Taxonomy.php File 4.92 KB 0640
TeamMember.php File 361 B 0640
Testimonial.php File 373 B 0640
Text.php File 5.17 KB 0640
ToggleContent.php File 613 B 0640
TypingText.php File 594 B 0640
WPForms.php File 2.92 KB 0640
WooProductGrid.php File 8.39 KB 0640
Wrapper.php File 359 B 0640
price.php File 239 B 0640
Filemanager