Current Path: > home > transcarter > public_html > wp-content > > plugins > unicard > src >
Operation : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 Software : Apache Server IP : 198.54.126.42 | Your IP: 216.73.216.135 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
block | Directory | - | - | |
blocks.js | File | 343 bytes | June 12 2025 15:16:38. | |
common.scss | File | 4908 bytes | June 12 2025 15:16:38. | |
init.php | File | 3348 bytes | June 12 2025 15:16:38. |
<?php /** * Blocks Initializer * * Enqueue CSS/JS of all the blocks. * * @since 1.0.0 * @package CGB */ // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Enqueue Gutenberg block assets for both frontend + backend. * * Assets enqueued: * 1. blocks.style.build.css - Frontend + Backend. * 2. blocks.build.js - Backend. * 3. blocks.editor.build.css - Backend. * * @uses {wp-blocks} for block type registration & related functions. * @uses {wp-element} for WP Element abstraction — structure of blocks. * @uses {wp-i18n} to internationalize the block's text. * @uses {wp-editor} for WP editor styles. * @author khleomix * @since 1.0.0 */ $version = '1.0.0'; function unicard_block_assets() { // phpcs:ignore // Register block styles for both frontend + backend. wp_register_style( 'unicard-style-css', // Handle. plugins_url( 'dist/blocks.style.build.css', dirname( __FILE__ ) ), // Block style CSS. is_admin() ? array( 'wp-editor' ) : null, // Dependency to include the CSS after it. $version // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.style.build.css' ) // Version: File modification time. ); // Register block editor script for backend. wp_register_script( 'unicard-block-js', // Handle. plugins_url( '/dist/blocks.build.js', dirname( __FILE__ ) ), // Block.build.js: We register the block here. Built with Webpack. array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ), // Dependencies, defined above. $version, // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ), // Version: filemtime — Gets file modification time. true // Enqueue the script in the footer. ); // Register block editor styles for backend. wp_register_style( 'unicard-block-editor-css', // Handle. plugins_url( 'dist/blocks.editor.build.css', dirname( __FILE__ ) ), // Block editor CSS. array( 'wp-edit-blocks' ), // Dependency to include the CSS after it. $version // filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.editor.build.css' ) // Version: File modification time. ); // WP Localized globals. Use dynamic PHP stuff in JavaScript via `cgbGlobal` object. wp_localize_script( 'unicard-block-js', 'unicardGlobal', // Array containing dynamic data for a JS Global. [ 'pluginDirPath' => plugin_dir_path( __DIR__ ), 'pluginDirUrl' => plugin_dir_url( __DIR__ ), // Add more data here that you want to access from `cgbGlobal` object. ] ); /** * Register Gutenberg block on server-side. * * Register the block on server-side to ensure that the block * scripts and styles for both frontend and backend are * enqueued when the editor loads. * * @link https://wordpress.org/gutenberg/handbook/blocks/writing-your-first-block-type#enqueuing-block-scripts * @since 1.16.0 */ register_block_type( 'unicard/block-unicard', array( // Enqueue blocks.style.build.css on both frontend & backend. 'style' => 'unicard-style-css', // Enqueue blocks.build.js in the editor only. 'editor_script' => 'unicard-block-js', // Enqueue blocks.editor.build.css in the editor only. 'editor_style' => 'unicard-block-editor-css', ) ); } // Hook: Block assets. add_action( 'init', 'unicard_block_assets' );
SILENT KILLER Tool