Skip to content

Instantly share code, notes, and snippets.

View estevan-ulian's full-sized avatar
🏠
Working from home

Estevan Ulian estevan-ulian

🏠
Working from home
View GitHub Profile
@Crocoblock
Crocoblock / rel-get-items-by-relation.php
Created March 27, 2023 18:55
JetEngine Related Items by Sibling Relation Macro
<?php
add_action( 'jet-engine/register-macros', function(){
class Related_Items_By_Sibling_Relation extends \Jet_Engine_Base_Macros {
public function macros_tag() {
return 'rel_get_items_by_relation';
}
@MjHead
MjHead / get-jet-engine-meta-fields.php
Last active June 11, 2024 15:07
JetEngine. Get registered meta fields by given context - post type, taxonomy or user
<?php
/**
* Get fields for the given context and object
* Should be called on hook 'init' with priority 11 or later
*/
// Fields for Post post type
$post_fields = jet_engine()->meta_boxes->get_fields_for_context( 'post_type', 'post' );
// Fields for Product post type
@MjHead
MjHead / jet-engine-cct-api.php
Last active June 22, 2024 22:09
API to interact with JetEngine CCT from directly PHP code
<?php
/**
* JetEngine CCT-related API functions to use in theme or plugin
*
* Theme usage - include get_theme_file_path( 'jet-engine-cct-api.php' );
* Plugin usage - include PLUGIN_PATH . 'path-to-file-inside-plugin/jet-engine-cct-api.php';
*/
/**
@devhammed
devhammed / countries.json
Created October 17, 2020 05:21
Countries with Name, Dial Code, Emoji Flag and ISO Code
[
{
"name": "Afghanistan",
"flag": "🇦🇫",
"code": "AF",
"dial_code": "+93"
},
{
"name": "Åland Islands",
"flag": "🇦🇽",