Recent

Related_Posts_ElementclassPro only

Registers the crp_related_posts WPBakery element.

Uses its own shortcode tag (distinct from [crp]) so the other_attributes free-text field can be parsed and merged before handing off to Shortcodes::related_posts() — output and every shortcode-level fix still flow through the same code path as [crp].

Namespace: WebberZone\Contextual_Related_Posts\Pro\Builders\WPBakery
Since: 4.4.0
Source: includes/pro/builders/wpbakery/class-related-posts-element.php line 27

Methods

__construct()

Constructor.

Line: 46

public function __construct(  );

enqueue_icon_css() static

Register the element icon as inline CSS, reusing the Gutenberg “Related Posts” block icon (includes/frontend/blocks/src/related-posts/components/icons.js) so the same glyph appears in both builder UIs.

Since: 4.4.0
Line: 81

static public function enqueue_icon_css(  ): void;

Returns: void

render() static

Render callback for the element.

WPBakery calls {shortcode}( $atts, $content ) for the crp_related_posts base — a dedicated tag rather than crp, since other_attributes, exclude_cat_slugs, el_class and css all need resolving here before the WordPress core [crp] handler ever sees them.

Since: 4.4.0
Line: 380

static public function render( $atts, $content = ... ): string;
Type Name Description
array $atts Shortcode attributes.
string|null $content Shortcode content.

Returns: string