Uname: Linux premium264.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.3.22 [ PHP INFO ] PHP os: Linux
Server Ip: 69.57.162.13
Your Ip: 216.73.216.219
User: workvvfb (1129) | Group: workvvfb (1084)
Safe Mode: OFF
Disable Function:
NONE

name : functions-envira-gallaries.php
<?php

/**
 * Get All Envira Gallery.
 *
 * @return void
 */
function seedprod_lite_get_envira_galleries() {
	if ( check_ajax_referer( 'seedprod_nonce' ) ) {
		if ( ! current_user_can( apply_filters( 'seedprod_builder_preview_render_capability', 'edit_others_posts' ) ) ) {
			wp_send_json_error();
		}

        $type = filter_input( INPUT_GET, 'type', FILTER_SANITIZE_STRING );
		$galleries = array();

        if($type === 'lite'){
            if ( class_exists( 'Envira_Gallery_Lite' ) ) {
                $galleries = Envira_Gallery_Lite::get_instance()->_get_galleries();
            }
        }else{
            if ( class_exists( 'Envira_Gallery' ) ) {
                $galleries = Envira_Gallery::get_instance()->_get_galleries();
            }
        }
		wp_send_json( $galleries );
	}
}

© 2025 GrazzMean