SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > filebird > blocks > filebird-gallery


Operation   : Linux premium131.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
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins/filebird/blocks/filebird-gallery

NameTypeSizeLast ModifiedActions
.turbo Directory - -
build Directory - -
dist Directory - -
init.php File 2061 bytes December 11 2024 15:31:40.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins/filebird/blocks/filebird-gallery/init.php

<?php

use FileBird\I18n;

defined( 'ABSPATH' ) || exit;

if (!function_exists('filebird_gallery_block_assets')) {
    function filebird_gallery_block_assets() {
        wp_enqueue_style( 'filebird_gallery-fb-block-css' );
    
        wp_register_style( 'fbv-photoswipe', NJFB_PLUGIN_URL . 'assets/css/photoswipe/photoswipe.css', array(), NJFB_VERSION );
        wp_register_style( 'fbv-photoswipe-default-skin', NJFB_PLUGIN_URL . 'assets/css/photoswipe/default-skin.css', array(), NJFB_VERSION );
    
        wp_register_script( 'fbv-photoswipe', NJFB_PLUGIN_URL . 'assets/js/photoswipe/photoswipe.min.js', array(), NJFB_VERSION, true );
        wp_register_script( 'fbv-photoswipe-ui-default', NJFB_PLUGIN_URL . 'assets/js/photoswipe/photoswipe-ui-default.min.js', array(), NJFB_VERSION, true );
        wp_register_script( 'filebird-gallery', NJFB_PLUGIN_URL . 'assets/js/photoswipe/fbv-photoswipe.min.js', array(), NJFB_VERSION, true );
    
        register_block_type( __DIR__ . '/build' );
    }
}

if (!function_exists('filebird_gutenberg_get_images')) {
    function filebird_gutenberg_get_images() {
        register_rest_route(
            NJFB_REST_URL,
            'gutenberg-get-images',
            array(
                'methods'             => 'POST',
                'callback'            => 'filebird_gutenberg_render_callback',
                'permission_callback' => function(){
                    return current_user_can( 'upload_files' );
                }
            )
        );
    }
}

if (!function_exists('filebird_gutenberg_render_callback')) {
    function filebird_gutenberg_render_callback( $request ) {
        $attributes = $request->get_params();

        ob_start();
        include NJFB_PLUGIN_PATH . '/blocks/filebird-gallery/build/render.php';
        $html = ob_get_clean();
        wp_send_json(
            array(
                'html' => $html,
            )
        );
    }
}

add_action( 'init', 'filebird_gallery_block_assets', PHP_INT_MAX );
add_action( 'rest_api_init', 'filebird_gutenberg_get_images' );

SILENT KILLER Tool