📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: LiteSpeed
2026-07-01 12:48:46
📂
/ (Root)
/
home
/
apkbfjox
/
2jbet.net.pk
/
wp-content
/
plugins
/
generateblocks-pro
/
includes
/
blocks
/
site-header
📍 /home/apkbfjox/2jbet.net.pk/wp-content/plugins/generateblocks-pro/includes/blocks/site-header
🔄 Refresh
✏️
Editing: class-site-header.php
Writable
<?php /** * Handles the Content block. * * @package GenerateBlocksPro */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Content block class. */ class GenerateBlocks_Block_Site_Header 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 = []; /** * Store our block name. * * @var string $block_name The block name. */ public static $block_name = 'generateblocks-pro/site-header'; /** * Store when to enqueue assets. * * @var array $assets_to_enqueue The assets to enqueue. */ public static $assets_to_enqueue = []; /** * 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, ] ); $html_attributes = $attributes['htmlAttributes'] ?? []; $is_sticky = array_key_exists( 'data-gb-is-sticky', $html_attributes ); if ( $is_sticky ) { wp_enqueue_script( 'generateblocks-pro-sticky', GENERATEBLOCKS_PRO_DIR_URL . 'dist/sticky-element.js', [], GENERATEBLOCKS_PRO_VERSION, true ); } return $block_content; } }
💾 Save Changes
❌ Cancel