X7ROOT File Manager
Current Path:
/home/hamdjcne/public_html/wp-content/plugins/otter-blocks/inc
home
/
hamdjcne
/
public_html
/
wp-content
/
plugins
/
otter-blocks
/
inc
/
ðŸ“
..
📄
Tracker.php
(1.36 KB)
📄
class-base-css.php
(15.97 KB)
📄
class-blocks-animation.php
(6.32 KB)
📄
class-blocks-css.php
(6.79 KB)
📄
class-blocks-export-import.php
(2.08 KB)
📄
class-main.php
(14.57 KB)
📄
class-patterns.php
(4.39 KB)
📄
class-pro.php
(16.95 KB)
📄
class-registration.php
(36.58 KB)
ðŸ“
css
ðŸ“
integrations
ðŸ“
patterns
ðŸ“
plugins
ðŸ“
render
ðŸ“
server
Editing: class-blocks-export-import.php
<?php /** * Class for Export/Import logic. * * @package ThemeIsle */ namespace ThemeIsle\GutenbergBlocks; /** * Class Blocks_Export_Import. */ class Blocks_Export_Import { /** * The main instance var. * * @var Blocks_Export_Import|null */ public static $instance = null; /** * Initialize the class */ public function init() { if ( ! defined( 'BLOCKS_EXPORT_IMPORT_URL' ) ) { define( 'BLOCKS_EXPORT_IMPORT_URL', OTTER_BLOCKS_URL ); define( 'BLOCKS_EXPORT_IMPORT_PATH', OTTER_BLOCKS_PATH ); } add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_editor_assets' ), 1 ); } /** * Load Gutenberg assets. * * @since 1.0.0 * @access public */ public function enqueue_editor_assets() { $asset_file = include BLOCKS_EXPORT_IMPORT_PATH . '/build/export-import/index.asset.php'; wp_enqueue_script( 'blocks-export-import', BLOCKS_EXPORT_IMPORT_URL . 'build/export-import/index.js', $asset_file['dependencies'], $asset_file['version'], true ); wp_set_script_translations( 'blocks-export-import', 'blocks-export-import' ); } /** * The instance method for the static class. * Defines and returns the instance of the static class. * * @static * @since 1.0.0 * @access public * @return Blocks_Export_Import */ public static function instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); self::$instance->init(); } return self::$instance; } /** * Throw error on object clone * * The whole idea of the singleton design pattern is that there is a single * object therefore, we don't want the object to be cloned. * * @access public * @since 1.0.0 * @return void */ public function __clone() { // Cloning instances of the class is forbidden. _doing_it_wrong( __FUNCTION__, 'Cheatin’ huh?', '1.0.0' ); } /** * Disable unserializing of the class * * @access public * @since 1.0.0 * @return void */ public function __wakeup() { // Unserializing instances of the class is forbidden. _doing_it_wrong( __FUNCTION__, 'Cheatin’ huh?', '1.0.0' ); } }
Upload File
Create Folder