self::class . '::render_callback', ) ); } /** * The Server-side render_callback for the wp-parsely/recommendations block. * * @since 3.2.0 * * @param array $attributes The user-controlled settings for this block. * @return string|false */ public static function render_callback( array $attributes ) { /** * In block.json we define a `viewScript` that is mean to only be loaded * on the front end. We need to manually enqueue this script here. * * The slug is automatically generated as {namespace}-{block-name}-view-script */ wp_enqueue_script( 'wp-parsely-recommendations-view-script' ); ob_start(); ?>
$value ) { echo ' data-' . esc_attr( $name ) . '="' . esc_attr( $value ) . '"'; } ?> >