Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/1534260/cwd/plugins/wordpress-seo/src/integrations/blocks/ |
Upload File : |
<?php namespace Yoast\WP\SEO\Integrations\Blocks; use Yoast\WP\SEO\Integrations\Integration_Interface; /** * Dynamic_Block class. */ abstract class Dynamic_Block_V3 implements Integration_Interface { /** * The name of the block. * * @var string */ protected $block_name; /** * The editor script for the block. * * @var string */ protected $script; /** * The base path for the block. * * @var string */ protected $base_path; /** * Returns the conditionals based on which this loadable should be active. * * @return array<string> */ public static function get_conditionals() { return []; } /** * Initializes the integration. * * Integrations hooking on `init` need to have a priority of 11 or higher to * ensure that they run, as priority 10 is used by the loader to load the integrations. * * @return void */ public function register_hooks() { \add_action( 'init', [ $this, 'register_block' ], 11 ); } /** * Registers the block. * * @return void */ public function register_block() { \register_block_type( $this->base_path . $this->block_name . '/block.json', [ 'editor_script' => $this->script, 'render_callback' => [ $this, 'present' ], ] ); } /** * Presents the block output. This is abstract because in the loop we need to be able to build the data for the * presenter in the last moment. * * @param array<string, bool|string|int|array> $attributes The block attributes. * * @return string The block output. */ abstract public function present( $attributes ); }