Skip to content

Instantly share code, notes, and snippets.

@Crocoblock
Crocoblock / macro-example.php
Last active June 22, 2024 20:42
Add custom macro for JetEngine. Example - get the current user property, such as ID, user_email, etc.
<?php
/**
* Note!
* Register macros on jet-engine/register-macros action only,
* as the base macro class \Jet_Engine_Base_Macros is not available before that action;
* after it - all macros are registered already
*/
add_action( 'jet-engine/register-macros', function(){