Recent

Blocks class

Blocks

Widget to display the overall count.

Namespace: WebberZone\Contextual_Related_Posts\Frontend\Blocks
Since: 3.5.0
Source: includes/frontend/blocks/class-blocks.php line 24

Methods

__construct()

Register widget with WordPress.

Line: 29

public function __construct(  );

register_blocks()

Registers the block using the metadata loaded from the block.json file. Behind the scenes, it registers also all assets so they can be enqueued through the block editor in the corresponding context.

Since: 3.5.0
Line: 41

public function register_blocks(  );

Renders the contextual-related-posts/related-posts block on server.

Since: 3.5.0
Line: 80

static public function render_block_related_posts( $attributes ): string;
TypeNameDescription
array$attributesThe block attributes.

Returns: string — Returns the post content with popular posts added.

enqueue_block_editor_assets() static

Enqueue scripts and styles for the block editor.

Since: 3.5.0
Line: 146

static public function enqueue_block_editor_assets(  );