This file contains hidden or 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
/* | |
Show a renew link instead of Your Level | |
for recurring subscriptions on the levels page. | |
Add this code to a custom plugin. | |
*/ | |
function pmpro_is_level_expiring_soon_yes_on_levels_page($expiring) { | |
//only adjust this on the levels page so we don't mess anything up | |
global $pmpro_pages; | |
if(!is_admin() && !empty($pmpro_pages) && is_page($pmpro_pages['levels'])) |
This file contains hidden or 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 | |
/* | |
Plugin Name: PMPro Customizations | |
Plugin URI: https://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Customizations for my Paid Memberships Pro Setup | |
Version: .1 | |
Author: Paid Memberships Pro | |
Author URI: https://www.paidmembershipspro.com | |
*/ |
This file contains hidden or 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 this function to a custom plugin. | |
Update your membership confirmation text then to include a reminder about confirming your email. | |
*/ | |
function pmpro_hide_account_page_until_validated() { | |
//bail if pmpro or the email confirmation addon is not loaded | |
if(!function_exists('pmpro_getMembershipLevelForUser') || !function_exists('pmproec_isEmailConfirmationLevel')) | |
return; |
This file contains hidden or 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 | |
/* DON'T copy the first line (above) if your functions.php already has it. | |
* ---------------------------------------------------------------------- */ | |
function my_et_theme_setup() { | |
if ( class_exists( 'ET_Builder_Module_Filterable_Portfolio' ) && file_exists( 'my-main-modules.php' ) ) { | |
get_template_part( 'my-main-modules' ); | |
$et_pb_filterable_portfolio = new My_ET_Builder_Module_Filterable_Portfolio(); | |
remove_shortcode('et_pb_filterable_portfolio'); | |
add_shortcode('et_pb_filterable_portfolio', array( $et_pb_filterable_portfolio, '_shortcode_callback' ) ); |
This file contains hidden or 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 | |
/* | |
Show Members Reports on the WordPress Admin Dashboard. | |
Update the my_pmpro_dashboard_report() function to remove or add core or custom reports. | |
*/ | |
//Create a Dashboard Reports widget for Paid Memberships Pro | |
function add_my_report_dashboard() { | |
if( ! defined( 'PMPRO_DIR' ) || ! current_user_can( 'manage_options' ) ) | |
{ |
This file contains hidden or 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 | |
/* DON'T copy the first line (above) if your functions.php already has it. | |
* ---------------------------------------------------------------------- */ | |
function my_et_theme_image_sizes( $sizes ) { | |
$sizes['200x200'] = 'my-et-pb-portfolio-image'; | |
return $sizes; | |
} | |
add_filter( 'et_theme_image_sizes', 'my_et_theme_image_sizes' ); |
This file contains hidden or 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 | |
// Limit the number of revisions to 3 | |
add_filter( 'wp_revisions_to_keep', 'divi_limit_revisions', 10, 2 ); | |
function divi_limit_revisions( $num ) { | |
$num = 3; | |
return $num; | |
} | |
//Disable Emoji |
This file contains hidden or 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
//Open external links into new tab | |
<script type="text/javascript"> | |
jQuery('a').filter(function () { | |
return this.hostname != window.location.hostname; | |
}).attr('target', '_blank'); | |
</script> | |
//Adding Fly-in Animations To Any Divi Section, Row and Module | |
//thanks to Gino Quiroz : https://quiroz.co/adding-fly-in-animations-to-any-divi-module/ | |
//Below are the CSS Class groups for each animation. |
This file contains hidden or 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 my_et_contact_page_headers( $headers, $contact_name, $contact_email ) { | |
/* ================================================================== | |
* >>>> Replace the "your-domain" below with your actual domain. <<<< | |
* ================================================================== | |
*/ $from = '[email protected]'; | |
$headers[0] = "From: \"{$contact_name}\" <{$from}>"; |
This file contains hidden or 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 | |
/* DON'T copy the first line (above) if your functions.php already has it. | |
* ---------------------------------------------------------------------- */ | |
function my_et_theme_setup() { | |
if ( class_exists( 'ET_Builder_Module_Contact_Form' ) ) { | |
get_template_part( 'my-main-modules' ); | |
$et_pb_contact = new My_ET_Builder_Module_Contact_Form(); | |
remove_shortcode('et_pb_contact'); |
NewerOlder