| 1 | <?php |
||
| 5 | abstract class YIKES_Easy_Forms_Blocks { |
||
|
|
|||
| 6 | |||
| 7 | const BLOCK_NAMESPACE = 'yikes-inc-easy-forms/'; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * Register our hooks. |
||
| 11 | */ |
||
| 12 | public function __construct() { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Enqueue our scripts. |
||
| 19 | */ |
||
| 20 | abstract public function editor_scripts(); |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Register our Easy Forms block callback. |
||
| 24 | */ |
||
| 25 | public function register_blocks() { |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Take the shortcode parameters from the Gutenberg block and render our shortcode. |
||
| 36 | * |
||
| 37 | * @param array $attributes Block attributes. |
||
| 38 | * @param string $content Block content. |
||
| 39 | * @return string Block output. |
||
| 40 | */ |
||
| 41 | abstract public function render_block( $attributes, $content ); |
||
| 42 | } |
||
| 43 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.