Skip to content

Instantly share code, notes, and snippets.

View Mohsin-Shakeel's full-sized avatar
🏠
Working from home

Mohsin Shakeel Mohsin-Shakeel

🏠
Working from home
View GitHub Profile
@Crocoblock
Crocoblock / macro-example.php
Last active May 21, 2025 15:04
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(){