This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'; | |
*/ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Afghanistan", | |
"flag": "🇦🇫", | |
"code": "AF", | |
"dial_code": "+93" | |
}, | |
{ | |
"name": "Åland Islands", | |
"flag": "🇦🇽", |