| Server IP : 146.59.209.152 / Your IP : 216.73.216.152 Web Server : Apache System : Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : monpetu ( 144298) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/monpetu/www/ipprint/wp-content/plugins/sureforms/inc/blocks/ |
Upload File : |
<?php
/**
* The blocks base file.
*
* @link https://sureforms.com
* @since 0.0.1
* @package SureForms
* @author SureForms <https://sureforms.com/>
*/
namespace SRFM\Inc\Blocks;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Block base class.
*/
abstract class Base {
/**
* Optional directory to .json block data files.
*
* @var string
* @since 0.0.1
*/
protected $directory = '';
/**
* Register the block for dynamic output
*
* @return void
* @since 0.0.1
*/
public function register() {
register_block_type_from_metadata(
$this->get_dir(),
apply_filters(
'srfm_block_registration_args',
[ 'render_callback' => [ $this, 'render' ] ]
)
);
}
/**
* Get the called class directory path
*
* @return string
* @since 0.0.1
*/
public function get_dir() {
if ( $this->directory ) {
return $this->directory;
}
$reflector = new \ReflectionClass( $this );
$fn = (string) $reflector->getFileName();
return dirname( $fn );
}
/**
* Render the block
*
* @param array<mixed> $attributes Block attributes.
*
* @return string
* @since 0.0.1
*/
public function render( $attributes ) {
return '';
}
}