blade2wp
v0.0.6
Published
Convert Blade(syntax) templates to WordPress
Downloads
3
Readme
blade2wp
Convert Blade(syntax) templates to WordPress
Install:
npm i blade2wp
Usage:
const blade2wp = require('blade2wp')
// ...
const bladeSyntax = "<a href="{{ esc_url($this->get('url') ?? '#') }}" class="wep-button">{{ $this->get('link_text') }}</a>";
// Convert Blade style string to WordPress:
const content = blade2wp(bladeSyntax)
// "content" equals to:
//
// <a href="<?php echo esc_url($this->get('url') ?? '#') ?>" class="wep-button"><?php echo $this->get('link_text') ?></a>
//