403Webshell
Server IP : 198.54.115.198  /  Your IP : 216.73.216.142
Web Server : LiteSpeed
System : Linux server192.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : seatpheu ( 1569)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/cwd/wp-content/plugins/navz-photo-gallery/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/cwd/wp-content/plugins/navz-photo-gallery/includes/render_field.php
<?php

    // exit if accessed directly
    if( ! defined( 'ABSPATH' ) ) exit;

    global $pagenow;
    if( $pagenow == 'edit-tags.php'){
        echo 'ACF Photo Gallery Field is not supported on taxonomy.';
    } else if($pagenow == 'profile.php'){
        echo 'ACF Photo Gallery Field is not supported on profile.';
    } else {
        $remove_edit_button = "";
        $remove_delete_button = "";
        $images_limit = "";
        
        global $post;    
        $nonce = wp_create_nonce( 'nonce_acf_photo_gallery' );
        if( ACF_VERSION >= 4 and ACF_VERSION < 5 ){
            $fieldname = $field['_name'];
            $value = $field['value'];
            $key = $field['key'];
            $edit_model = (!empty($field['edit_modal']))? esc_attr($field['edit_modal']):'Default';
        } else if( ACF_VERSION >= 5){
            $fieldname = $field['_name'];
            $value = $field['value'];
            $key = $field['key'];
            $remove_edit_button = (!empty($field['fields[' . $fieldname]['remove_edit_button']))? esc_attr($field['fields[' . $fieldname]['remove_edit_button']):null;    
            $remove_delete_button = (!empty($field['fields[' . $fieldname]['remove_delete_button']))? esc_attr($field['fields[' . $fieldname]['remove_delete_button']):null;    
            $edit_model = (!empty($field['fields[' . $fieldname]['edit_modal']))? esc_attr($field['fields[' . $fieldname]['edit_modal']):'Default';    
            $images_limit = (!empty($field['fields[' . $fieldname]['images_limit']))? esc_attr($field['fields[' . $fieldname]['images_limit']):null;    
            $replace_textarea_editor = (!empty($field['fields[' . $fieldname]['replace_caption_tinymce']))? esc_attr($field['fields[' . $fieldname]['replace_caption_tinymce']):null;    
        }
?>

<div class="acf-photo-gallery-group-<?php echo esc_attr($key); ?>">
    <input type="hidden" name="apg_nonce" value="<?php echo esc_attr( $nonce ); ?>" />
    <input type="hidden" name="acf-photo-gallery-edit-modal" value="<?php echo esc_attr($edit_model); ?>" />
    <input type="hidden" name="acf-photo-gallery-groups[]" value="<?php echo esc_attr($field['_name']); ?>"/>
    <input type="hidden" name="acf-photo-gallery-images_limit" value="<?php echo esc_attr($images_limit); ?>"/>
    <input type="hidden" name="acf-photo-gallery-field" value="<?php echo esc_attr($key); ?>"/>
    <ul class="acf-photo-gallery-metabox-list">
        <?php
            if( $value ):
                $acf_photo_gallery_attachments =  $value;
                $acf_photo_gallery_attachments = explode(',', $acf_photo_gallery_attachments);
                foreach($acf_photo_gallery_attachments as $image):
        ?>
        <li class="acf-photo-gallery-mediabox acf-photo-gallery-mediabox-<?php echo esc_attr($image); ?>">
            <?php if($remove_edit_button != "Yes") { ?>
                <a class="dashicons dashicons-edit" href="#" title="Edit" data-id="<?php echo esc_attr($image); ?>" data-acf_field_key="<?php echo esc_attr($key); ?>"></a>
            <?php } ?>
            <?php if($remove_delete_button != "Yes") { ?>
                <a class="dashicons dashicons-dismiss" href="#" data-id="<?php echo esc_attr($image); ?>" data-field="<?php echo esc_attr($key); ?>" title="Remove this photo from the gallery"></a>
            <?php } ?>
            <input type="hidden" name="<?php echo esc_attr($field['_name']); ?>[]" value="<?php echo esc_attr($image); ?>"/>
            <img src="<?php echo esc_url( wp_get_attachment_thumb_url( $image ) ); ?>"/>
        </li>
        <?php endforeach; else: ?><li class="acf-photo-gallery-media-box-placeholder"><span class="dashicons dashicons-format-image"></span></li><?php endif; ?>
    </ul>
    <button class="button button-primary button-large acf-photo-gallery-metabox-add-images" type="button" data-field="<?php echo esc_attr( wp_json_encode($field) ); ?>">Add Images</button>

</div>

<?php } ?>

Youez - 2016 - github.com/yon3zu
LinuXploit