SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > filebird > > includes > Blocks


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//includes/Blocks

NameTypeSizeLast ModifiedActions
AbstractBlock.php File 2197 bytes January 09 2023 15:29:40.
BlockController.php File 814 bytes August 23 2024 17:15:40.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins/filebird//includes/Blocks/AbstractBlock.php

<?php

namespace FileBird\Blocks;

abstract class AbstractBlock {

    protected $namespace = 'filebird';

    protected $block_name = '';

    public function __construct() {
        $this->init();
    }

    abstract protected function enqueue_frontend_assets();

    protected function get_block_type() {
        return $this->namespace . '/' . $this->block_name;
    }

    protected function get_block_attributes() {
        return array();
    }

    protected function get_editor_dependencies() {
        return array();
    }

    protected function register_block_editor_script() {
        wp_register_script(
            $this->namespace . '-' . $this->block_name . '-js',
            NJFB_PLUGIN_URL . 'blocks/' . $this->block_name . '/dist/index.js',
            $this->get_editor_dependencies(),
            NJFB_VERSION,
            true
        );
        wp_register_style(
            $this->namespace . '-' . $this->block_name . '-css',
            NJFB_PLUGIN_URL . 'blocks/' . $this->block_name . '/dist/index.css',
            $this->get_editor_dependencies(),
            NJFB_VERSION
        );
    }

    public function render_callback( $attributes = array(), $content = '' ) {
        if ( ! is_admin() ) {
            $this->enqueue_frontend_assets();
        }
        return $this->render( $attributes, $content );
    }

    protected function render( $attributes, $content ) {

    }

    protected function get_render_callback() {
        return array( $this, 'render_callback' );
    }

    protected function register_block_type() {
        $this->register_block_editor_script();
        register_block_type(
            $this->get_block_type(),
            array(
                'editor_script'   => $this->namespace . '-' . $this->block_name . '-js',
                'editor_style'    => $this->namespace . '-' . $this->block_name . '-css',
                // 'style'           => $this->namespace . '-' . $this->block_name,
                'render_callback' => $this->get_render_callback(),
                'attributes'      => $this->get_block_attributes(),
			)
        );
    }

    protected function init() {
        $this->register_block_type();
    }
}

SILENT KILLER Tool