Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../public_h.../wp-conte.../plugins/wordpres.../src/integrat.../blocks
File: abstract-dynamic-block-v3.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Integrations\Blocks;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Integrations\Integration_Interface;
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Dynamic_Block class.
[7] Fix | Delete
*/
[8] Fix | Delete
abstract class Dynamic_Block_V3 implements Integration_Interface {
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* The name of the block.
[12] Fix | Delete
*
[13] Fix | Delete
* @var string
[14] Fix | Delete
*/
[15] Fix | Delete
protected $block_name;
[16] Fix | Delete
[17] Fix | Delete
/**
[18] Fix | Delete
* The editor script for the block.
[19] Fix | Delete
*
[20] Fix | Delete
* @var string
[21] Fix | Delete
*/
[22] Fix | Delete
protected $script;
[23] Fix | Delete
[24] Fix | Delete
/**
[25] Fix | Delete
* The base path for the block.
[26] Fix | Delete
*
[27] Fix | Delete
* @var string
[28] Fix | Delete
*/
[29] Fix | Delete
protected $base_path;
[30] Fix | Delete
[31] Fix | Delete
/**
[32] Fix | Delete
* Returns the conditionals based on which this loadable should be active.
[33] Fix | Delete
*
[34] Fix | Delete
* @return array<string>
[35] Fix | Delete
*/
[36] Fix | Delete
public static function get_conditionals() {
[37] Fix | Delete
return [];
[38] Fix | Delete
}
[39] Fix | Delete
[40] Fix | Delete
/**
[41] Fix | Delete
* Initializes the integration.
[42] Fix | Delete
*
[43] Fix | Delete
* Integrations hooking on `init` need to have a priority of 11 or higher to
[44] Fix | Delete
* ensure that they run, as priority 10 is used by the loader to load the integrations.
[45] Fix | Delete
*
[46] Fix | Delete
* @return void
[47] Fix | Delete
*/
[48] Fix | Delete
public function register_hooks() {
[49] Fix | Delete
\add_action( 'init', [ $this, 'register_block' ], 11 );
[50] Fix | Delete
}
[51] Fix | Delete
[52] Fix | Delete
/**
[53] Fix | Delete
* Registers the block.
[54] Fix | Delete
*
[55] Fix | Delete
* @return void
[56] Fix | Delete
*/
[57] Fix | Delete
public function register_block() {
[58] Fix | Delete
\register_block_type(
[59] Fix | Delete
$this->base_path . $this->block_name . '/block.json',
[60] Fix | Delete
[
[61] Fix | Delete
'editor_script' => $this->script,
[62] Fix | Delete
'render_callback' => [ $this, 'present' ],
[63] Fix | Delete
]
[64] Fix | Delete
);
[65] Fix | Delete
}
[66] Fix | Delete
[67] Fix | Delete
/**
[68] Fix | Delete
* Presents the block output. This is abstract because in the loop we need to be able to build the data for the
[69] Fix | Delete
* presenter in the last moment.
[70] Fix | Delete
*
[71] Fix | Delete
* @param array<string, bool|string|int|array> $attributes The block attributes.
[72] Fix | Delete
*
[73] Fix | Delete
* @return string The block output.
[74] Fix | Delete
*/
[75] Fix | Delete
abstract public function present( $attributes );
[76] Fix | Delete
}
[77] Fix | Delete
[78] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function