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 | |
/******************************************************************* | |
* as seen on - https://www.youtube.com/watch?v=oWXjVUcPSPk | |
* by: Tom McFarlin | |
********************/ | |
add_filter( 'posts_request', 'my_show_query' ); | |
function my_show_query( $query ){ | |
if ( isset( $_GET['show_query'] ) && 'true' === $_GET['show_query'] ) { | |
var_dump( $query ); |
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
/* --------------------------------------------------------------------------- | |
* Override iCustomize on front end - Must be iCustomize V | |
* --------------------------------------------------------------------------- */ | |
if( ! defined( 'ICUSTOMIZE_OVERRIDE' ) ){ | |
/* | |
* 1. uncomment to override icustomize scripts on front end | |
* 2. set to true to load scripts from child theme using function below | |
***************************************/ | |
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
/********************************************* | |
* Add custom PMP series drip menu shortcode | |
* | |
* Use: [pmp-series-list] | |
* *******************************************/ | |
add_shortcode( 'pmp-series-list', 'pmp_series_list_shortcode' ); | |
function pmp_series_list_shortcode( $atts ) { | |
// Attributes - future maybe? | |
$atts = shortcode_atts( |
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
function MfnUpload(){ | |
(function($) { | |
jQuery( 'img[src=""]' ).attr( 'src', mfn_upload.url ); | |
jQuery( '.mfn-opts-upload' ).click( function( event ) { | |
event.preventDefault(); | |
var activeFileUploadContext = jQuery( this ).parent(); | |
var type = jQuery( 'input', activeFileUploadContext ).attr( 'class' ); |
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
/********************************************* | |
* OVERRIDE - Disable initial "new content" outgoing email | |
* | |
* Members have access to intial drip content, the disables the intial "you have new content" email | |
* *******************************************/ | |
function gfc_pmpro_email_filter($email) { | |
//Only continue for "new_content" template emails. | |
if($email->template != 'new_content') | |
return $email; |
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 | |
/********************************************* | |
* ADDON - Add user meta to profile pages | |
* Adds option to disable PMPro invoice/billing emails | |
* | |
* OVERRIDE - Disable PMPro billing emails per user | |
* Disable billing emails if user meta gfc_disable_billing_notice = Yes | |
********************************************/ | |
add_action( 'show_user_profile', 'gfc_pmpro_membership_disable_billing' ); | |
add_action( 'edit_user_profile', 'gfc_pmpro_membership_disable_billing' ); |
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 | |
/** | |
* The template for displaying all pages. | |
* | |
* @package Betheme | |
* @author Muffin group | |
* @link http://muffingroup.com | |
*/ | |
get_header(); |
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
/* --------------------------------------------------------------------------- | |
* Force Elementor Library to use Canvas Template | |
* - this gist file name can also be used in your theme to override the template instead of this | |
* --------------------------------------------------------------------------- */ | |
function get_elementor_library_post_type_template( $single_template ) { | |
global $post; | |
if ($post->post_type == 'elementor_library') { | |
$single_template = WP_PLUGIN_DIR . '/elementor/includes/page-templates/canvas.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
/** | |
* add custom widget to switch city page map preferences | |
* | |
* Simply performs an audit on City Pages to check if | |
* the preference is to output custom code or use the | |
* automatic map search by city name | |
* | |
**/ | |
class Custom_City_Map_Widget extends WP_Widget { | |