Related_Posts_Pro
Related Posts Pro block class. It extends the Related Posts Gutenberg block.
Namespace: WebberZone\Contextual_Related_Posts\Pro\Blocks
Since: 3.6.0
Source: includes/blocks/class-related-posts-pro.php line 22
Methods
__construct()
Register widget with WordPress.
Line: 34
public function __construct( );
register_settings()
Register settings for the block.
Since: 3.6.0
Line: 45
public function register_settings( );
enqueue_block_editor_assets()
Enqueue scripts and styles for the block editor.
Since: 3.6.0
Line: 64
public function enqueue_block_editor_assets( );
register_rest_routes()
Register REST routes.
Since: 3.6.0
Line: 99
public function register_rest_routes( );
permission_check()
Check if the current user has the required permissions.
Since: 3.6.0
Line: 126
public function permission_check( );
get_block_settings()
Get block settings.
Since: 3.6.0
Line: 137
public function get_block_settings( ): array;
Returns: array — Block settings.
save_block_settings()
Save block settings.
Since: 3.6.0
Line: 152
public function save_block_settings( $request ): array;
| Type | Name | Description |
|---|---|---|
\WP_REST_Request | $request | Request object. |
Returns: array — Block settings.
get_styles_for_js()
Get the styles array in a format suitable for JavaScript.
Since: 3.6.0
Line: 170
public function get_styles_for_js( ): array;
Returns: array — Styles array.