Skip to content

Instantly share code, notes, and snippets.

View soyket's full-sized avatar
🎯
Focusing

Soyket Chowdhury soyket

🎯
Focusing
View GitHub Profile
@Crocoblock
Crocoblock / jfb-call-hook.php
Last active August 21, 2025 05:12
JetFormBuilder Call Hook action
<?php
add_action( 'jet-form-builder/custom-action/test-hook', function( $request, $action_handler ) {
//get value of field field1
$value = $request['field1'];
//or using jet_fb_context()->resolve_request()
$value = jet_fb_context()->resolve_request()['field1'];
@MjHead
MjHead / form-custom-hook.php
Created September 19, 2021 08:07
JetFormBuilder. Example of custom hook with API request and redirect.
<?php
/**
* 'api-request' - is a customm hook name
*/
add_action( 'jet-form-builder/custom-action/api-request', function( $request, $action_handler ) {
$post_id = ! empty( $request['inserted_post_id'] ) ? $request['inserted_post_id'] : false;
if ( ! $post_id ) {
return;
@iqbalrony
iqbalrony / custom-control-init.php
Last active July 28, 2025 10:56
Create Elementor Custom Control. Image selector control
<?php
namespace ElementorControls;
if (!defined('ABSPATH')) exit; // Exit if accessed directly
class Elementor_Custom_Controls {
public function includes() {
require_once(plugin_dir_path(__FILE__).'inc/elementor/image-selector-control.php');
}
@iqbalrony
iqbalrony / functions.php
Last active February 3, 2026 10:41
How to add/use/register elementor dynamic tag with elementor free version. This is a very easy and useful system of Elementor. Especially I feel the need for this when I use URL control. Help link -> (https://developers.elementor.com/dynamic-tags/)
<?php
/**
* Post URL list
*/
if (!function_exists('prefix_get_all_posts_url')) {
function prefix_get_all_posts_url($posttype = 'post') {
$args = array(
'post_type' => $posttype,
'post_status' => 'publish',
<?php
namespace Aepro;
use Elementor\Group_Control_Background;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Group_Control_Border;
@devinsays
devinsays / class-nf-hubspot.php
Created January 25, 2018 23:42
Custom Ninja Forms + Hubspot integration.
<?php
/**
* Hubspot Integration for Ninja Forms.
*
* @package Nano
*/
class NF_Hubspot {
// Hooks into ninja_forms_after_submission
public function init() {
@atwellpub
atwellpub / store-lead.php
Created September 13, 2016 23:27
For Ninja Forms Devs
<?php if (!defined('ABSPATH')) exit;
/**
* Class NF_Action_Save
*/
if (class_exists('NF_Abstracts_Action')) {
final class NF_Actions_Inbound_Store_Lead extends NF_Abstracts_Action {
/**
* @var string
@vybstat
vybstat / ds_store_removal
Last active September 18, 2025 18:40
How to remove .DS_Store file from GitHub that Mac OS X creates
# remove .DS_Store file from GitHub that MAC OS X creates
# find and remove .DS_Store
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
# create .gitignore file, if needed
touch .gitignore
echo .DS_Store > .gitignore
# push changes to GitHub
@ramiabraham
ramiabraham / affwp_resend_approval_email.php
Last active September 11, 2021 20:10
An example of how to re-send emails using AffiliateWP
<?php
/**
* Plugin Name: Re-send AffiliateWP affiliate approval email example
*/
function affwp_custom_notify_on_approval( $affiliate_id = 0, $status = '', $old_status = '' ) {
if( empty( $affiliate_id ) ) {
return;
}
if( 'active' != $status || 'pending' != $old_status ) {
@nadar
nadar / PostMessageToSlackChannel.php
Last active June 5, 2024 17:05
Post a message to a slack channel with PHP
<?php
/**
* Send a Message to a Slack Channel.
*
* In order to get the API Token visit:
*
* 1.) Create an APP -> https://api.slack.com/apps/
* 2.) See menu entry "Install App"
* 3.) Use the "Bot User OAuth Token"