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 | |
function pm_remove_all_scripts() { | |
global $wp_scripts; | |
$wp_scripts->queue = array(); | |
} | |
add_action('wp_print_scripts', 'pm_remove_all_scripts', 100); | |
function pm_remove_all_styles() { | |
global $wp_styles; |
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
<?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
/* --------------------------------------------------------------------------- | |
* 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
public function apply_builder_in_content( $content ) { | |
if ( ! $this->_is_frontend_mode ) | |
return $content; | |
$post_id = get_the_ID(); | |
if ( post_password_required( $post_id ) ) | |
return $content; | |
$data = Plugin::instance()->db->get_plain_editor( $post_id ); | |
$edit_mode = Plugin::instance()->db->get_edit_mode( $post_id ); |
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($){ | |
'use strict'; | |
/* | |
* jQuery htmlDoc "fixer" - v0.2pre - 8/8/2011 | |
* http://benalman.com/projects/jquery-misc-plugins/ | |
* | |
* Copyright (c) 2010 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. |
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' ); |