Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
plugins
/
generateblocks
/
includes
:
class-element.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /** * Handles the Element block. * * @package GenerateBlocks */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * The Element block. */ class GenerateBlocks_Block_Element extends GenerateBlocks_Block { /** * Keep track of all blocks of this type on the page. * * @var array $block_ids The current block id. */ protected static $block_ids = []; /** * Render the Element block. * * @param array $attributes The block attributes. * @param string $block_content The block content. * @param array $block The block. */ public static function render_block( $attributes, $block_content, $block ) { // Add styles to this block if needed. $block_content = generateblocks_maybe_add_block_css( $block_content, [ 'class_name' => __CLASS__, 'attributes' => $attributes, 'block_ids' => self::$block_ids, ] ); return $block_content; } }