Skip to content

Instantly share code, notes, and snippets.

View moxet's full-sized avatar

Abdul Muqsit moxet

View GitHub Profile
@andrewjmead
andrewjmead / jetformbuilder-submit-hook.php
Last active March 22, 2025 20:31
JetFormBuilder form submission hook for WordPress
<?php
/**
* JetFormBuilder has no documentation about what hooks they fire or when they fire them.
*
* I ended up digging into their source code to try and find an action that fires for all
* form submission, even if they don't have a custom "post submit action" set up.
*
* Using jet-form-builder/form-handler/after-send gets the job done.
*/
@Lonsdale201
Lonsdale201 / gist:cd73b2340a0ca12697a3c92763c61dea
Last active November 23, 2023 13:10
JetSmartfilter Checkbox filter - Group parent toggle
// make your Checkbox filter, and ensure that "Group terms by parents" option is checkhed.
// In the Checkbox filter widget enable the Dropdown additions. You can use the search option also. (Mixed filter type not tested)
// Paste this code in a specific js file, plugin, or use the Elementor custom code function. (if elementor custom code, dont forget to
// use the tags, like <script> and <style>
// Multi level not tested, only one level.
// Warning this script will affect all of your checkbox filter, where you settinged up the "Group terms by parents" option.
// PREVIEW : https://prnt.sc/5fPJ6iebdDCy
@Crocoblock
Crocoblock / jet-relations-rest.md
Last active April 3, 2025 06:17
JetEngine Update relation with REST API
@MjHead
MjHead / rest-api-terms-with-labels.php
Last active September 5, 2024 12:00
WordPress Rest API. Add post terms with labels to API response
<?php
/**
* Add this code without opening PHP tag into funcitons.php og your active theme or with any code snippets plugin
*/
add_action(
'rest_api_init',
function() {
/**
* Here you can set taxonomies slugs you wnat to add to Rest API response
@MjHead
MjHead / featured-media-url.php
Last active September 6, 2024 08:46
WordPress REST API. Add featured image to REST API response
@Crocoblock
Crocoblock / cct-crud.md
Last active February 20, 2025 08:28
JetEngine CCT CRUD

Get/Create/Update/Delete CCT item

Check if CCT module active

$module_active = jet_engine()->modules->is_module_active( 'custom-content-types' );

Get type object and handler

$type_object is an instance of \jet-engine\includes\modules\custom-content-types\inc\factory.php \

@Crocoblock
Crocoblock / get-related.md
Last active April 25, 2025 05:46
Get JetEngine Related Items programmatically / Update related items / Get/Update relation meta
@MjHead
MjHead / jet-engine-cct-api.php
Last active November 19, 2024 16:30
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';
*/
/**
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MediaCapture and Streams API</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="main.css">
</head>
<body>
<header>