Blocks
Widget to display the overall count.
Namespace: WebberZone\Popular_Authors\Frontend\Blocks
Since: 1.2.0
Source: includes/frontend/blocks/class-blocks.php line 23
Methods
__construct()
Register widget with WordPress.
Line: 28
public function __construct( );
enqueue_editor_assets()
Enqueue block editor assets.
Since: 1.4.0
Line: 38
public function enqueue_editor_assets( );
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: 1.2.0
Line: 67
public function register_blocks( );
render_block_popular_authors() static
Renders the popular-authors/popular-authors block on server.
Since: 1.3.0
Line: 110
static public function render_block_popular_authors( $attributes ): string;
| Type | Name | Description |
|---|---|---|
array | $attributes | The block attributes. |
Returns: string — Returns the post content with popular posts added.
render_block_popular_posts() static
Renders the popular-authors/popular-posts block on server.
Since: 1.3.0
Line: 175
static public function render_block_popular_posts( $attributes ): string;
| Type | Name | Description |
|---|---|---|
array | $attributes | The block attributes. |
Returns: string — Returns the post content with popular posts by author added.