403Webshell
Server IP : 89.248.107.232  /  Your IP : 216.73.217.70
Web Server : Apache
System : Linux host2.kasilh.com 5.14.0-687.36.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 7 05:40:49 EDT 2026 x86_64
User : seg ( 10005)
PHP Version : 7.4.33
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/seg-sa.es/peyco.es/wp-content/themes/StoreFront/js/back-end/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/seg-sa.es/peyco.es/wp-content/themes/StoreFront/js/back-end/gavern.metabox.js
/**
 *
 * -------------------------------------------
 * Script for the Gavern metaboxes
 * -------------------------------------------
 *
 **/
(function () {
    "use strict";
    // Uploading files
    var file_frame;
    jQuery('.gavern_opengraph_upload_image_button').live('click', function( event ){
        event.preventDefault();
        var preview = jQuery(this).siblings('.gavern_opengraph_preview_image');
        var formfield = jQuery(this).siblings('.gavern_opengraph_upload_image');
        // If the media frame already exists, reopen it.
        if ( file_frame ) {
          file_frame.open();
          return;
        }

        // Create the media frame.
        file_frame = wp.media.frames.file_frame = wp.media({
            title: 'Choose Image',
            multiple: false,
            library: {
                type: 'image'
            },
            button: {
                text: 'Use This Image'
            }
        });

        // When an image is selected, run a callback.
        file_frame.on( 'select', function() {
            // We set multiple to false so only get one image from the uploader
            var attachment = file_frame.state().get('selection').first().toJSON();
            formfield.val(attachment.id);
            preview.attr('src', attachment.url);
            // Do something with attachment.id and/or attachment.url here
        });

        // Finally, open the modal
        file_frame.open();

    });

    // clear image to the default
    jQuery(document).ready(function () {
        jQuery('.gavern_opengraph_clear_image').click(function (event) {
            event.preventDefault();
            var defaultImage = jQuery(this).parent().siblings('.gavern_opengraph_default_image').text();
            jQuery(this).parent().siblings('.gavern_opengraph_upload_image').val('');
            jQuery(this).parent().siblings('.gavern_opengraph_preview_image').attr('src', defaultImage);
            return false;
        });
    });


    // Page additional params
    jQuery(document).ready(function () {
        var templateSelect = jQuery('#page_template');
        var template = templateSelect.find('option:selected').val();

        jQuery(document).find('p[data-template]').removeClass('active');
        jQuery(document).find('p[data-template="' + template + '"]').addClass('active');

        templateSelect.change(function () {
            var template = templateSelect.find('option:selected').val();
            jQuery(document).find('p[data-template]').removeClass('active');
            jQuery(document).find('p[data-template="' + template + '"]').addClass('active');
        });

        templateSelect.blur(function () {
            var template = templateSelect.find('option:selected').val();
            jQuery(document).find('p[data-template]').removeClass('active');
            jQuery(document).find('p[data-template="' + template + '"]').addClass('active');
        });
    });
}());

Youez - 2016 - github.com/yon3zu
LinuXploit