Skip to content

Instantly share code, notes, and snippets.

View mahircoding's full-sized avatar
🏠
Working from home

MahirCoding mahircoding

🏠
Working from home
  • surakarta Indonesia
  • 20:00 (UTC +07:00)
View GitHub Profile
@Qubadi
Qubadi / gist:2ec33798ddeed715b3060c47ba498ee2
Last active December 16, 2024 15:50
JetEngine Listing grid title
We have developed a custom code that adds a new feature to the default JetEngine Listing Grid widget in Elementor.
This enhancement allows users to easily add a title or label directly from Elementor's controls. With full styling options,
including alignment, typography, colors, and spacing, the label integrates seamlessly with the existing widget for a dynamic
and customizable experience.
Copy the following PHP code and create a PHP snippet using your snippet plugins.
Paste the code into the plugin and save it.
________________________________________
@Lonsdale201
Lonsdale201 / code
Last active November 10, 2024 12:15
JetFormBuilder - Check ajax submit success or other status
// place the code in the child theme functions.php or a custom code snippets plugin like FluentSnippets
// if you want to handle other error statuses, change "invalid_email" to the one you want to monitor.
document.addEventListener( 'DOMContentLoaded', function() {
const { addAction } = window.JetPlugins.hooks;
addAction( 'jet.fb.observe.after', 'test/onSubmit', init );
function init( observable ) {
observable.form.submitter.status.watch( onFormSubmit );
<?php
/*
Plugin Name: Custom Registration Fields
Plugin URI:
Description:
Version: 0.1
Author: CSSIgniter
Author URI:
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@abdurrahmanekr
abdurrahmanekr / gist:2747d704edec93a06e454eba2653e0df
Last active May 24, 2025 21:36
WhatsApp original chat background image

WhatsApp original chat background image

WhatsApp original darkmoda background image

<?php
/*
This script will allow you to send a custom email from anywhere within wordpress
but using the woocommerce template so that your emails look the same.
Created by [email protected] on 27th of July 2017
Put the script below into a function or anywhere you want to send a custom email
*/
@bmarshall511
bmarshall511 / template-functions.php
Last active June 29, 2023 10:23
Locate a WordPress plugin template.
<?php
/**
* Locate template.
*
* Locate the called template.
* Search Order:
* 1. /themes/theme/templates/$template_name
* 2. /themes/theme/$template_name
* 3. /plugins/plugin/templates/$template_name.
*
@lmcneel
lmcneel / remove-node-modules.md
Last active May 25, 2025 04:24
How to remove node_modules after they have been added to a repo

How to remove node_modules

Create a .gitignore file

  1. Check for an existing .gitignore file in the project directory
ls -a
@andrewlimaza
andrewlimaza / honeypot-example.php
Last active November 16, 2024 11:47
Simple honeypot for an HTML form using PHP
<?php
//check if form was sent
if($_POST){
$to = '[email protected]';
$subject = 'Testing HoneyPot';
$header = "From: $name <$name>";
$name = $_POST['name'];
@ashleyfae
ashleyfae / edd-auto-apply-discount-code.php
Created August 30, 2016 12:13
Automatically applies an EDD discount code if certain cart conditions are met.
<?php
/**
* Plugin Name: EDD - Discounts for Subscribers
* Plugin URI: https://www.nosegraze.com/apply-edd-discount-code-cart-contents
* Description: Automatically applies an EDD discount code if certain cart conditions are met.
* Version: 1.0
* Author: Nose Graze
* Author URI: https://www.nosegraze.com
* License: GPL2
*
@wpweb101
wpweb101 / replace_cur.php
Last active July 28, 2021 17:21
replace edd currency symbol with points
<?php
if( class_exists( 'Easy_Digital_Downloads' ) ) {
$currency = edd_get_currency(); // get edd base currency
add_filter( 'edd_' . strtolower( $currency ) . '_currency_filter_before', 'edd_cur_change_before_format', 10, 3 );
add_filter( 'edd_' . strtolower( $currency ) . '_currency_filter_after', 'edd_cur_change_after_format', 10, 3 );
function edd_cur_change_before_format($formatted, $currency, $price) {