Skip to content

Instantly share code, notes, and snippets.

View mharis's full-sized avatar

Haris Zulfiqar mharis

View GitHub Profile
@dwayne
dwayne / 0-intro.md
Last active February 28, 2023 22:10
My notes from the book "Authority by Nathan Barry".

A Step-By-Step Guide To Self-Publishing

Become an expert, build a following, and gain financial independence.

by Nathan Barry

Table of Contents

@danieliser
danieliser / functions.php
Created November 3, 2022 22:41
EDD Subscription Cancellation UX using Gravity Forms & WP Fusion
<?php
/**
* Assumptions:
* - Form ID is #28
* - Page ID is 406200
* - Fields include radio for reason & extra details where needed.
*/
@bitfade
bitfade / gist:4555047
Last active January 21, 2022 03:06
WordPress - Remove empty p tags for custom shortcodes
<?php
add_filter("the_content", "the_content_filter");
function the_content_filter($content) {
// array of custom shortcodes requiring the fix
$block = join("|",array("col","shortcode2","shortcode3"));
// opening tag
@wpscholar
wpscholar / functions.php
Last active March 1, 2021 13:26
Enqueueing IE conditional stylesheets in WordPress the right way
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' );
/**
* Example callback function that demonstrates how to properly enqueue conditional stylesheets in WordPress for IE.
* IE10 and up does not support conditional comments in standards mode.
*
* @uses wp_style_add_data() WordPress function to add the conditional data.
* @link https://developer.wordpress.org/reference/functions/wp_style_add_data/
@dovy
dovy / SMOF2Redux.php
Last active December 28, 2015 23:19
Add the following file somewhere within your theme. It will create a demo panel with your SMOF data as well as a SMOF2Redux Export menu item, to grab a functioning Redux configuration file.
<?php
if( !class_exists( 'SMOFtoRedux' ) ) {
class SMOFtoRedux {
public function __construct( ) {
add_action('init', array($this, 'addPanel'), 100);
add_action( 'admin_menu', array($this, 'addExportMenu') );