View mi-email-filter-hooks.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
<?php | |
/** MonsterInsights Email Hooks */ | |
// Sender email address filter hook. | |
function my_custom_sender_email_address( $original_sender_email_address ) { | |
return 'YOURSENDEREMAILADDRESS'; | |
} | |
add_filter( 'monsterinsights_email_from_address', 'my_custom_sender_email_address' ); | |
// Sender name filter hook. |
View mi-outbound-amazon-apple-affiliate.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
<?php | |
function monsterinsights_amz_appl_affiliate_links() { | |
?> | |
<script> | |
jQuery( document ).ready(function() { | |
jQuery('a[href*="amazon.com"],a[href*="amzn.to"],a[href*="tv.apple"]').each(function() { | |
jQuery(this).attr('data-vars-ga-category', 'outbound-link-affiliate' ); | |
}); | |
}); | |
</script> |
View monsterinsights-add-custom-dimensions-via-filter.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
/** | |
* This would add custom dimension to the admin list inside settings. | |
*/ | |
function monsterinsights_add_dimensions_to_admin_list( $dimensions ) { | |
// Add dimension to array with a unique key 'services' | |
$dimensions['services'] = array( | |
'title' => __( 'Services', 'monsterinsights-dimensions' ), // Label | |
'label' => __( 'Services', 'monsterinsights-dimensions' ), // Description | |
'enabled' => true, |
View pmpro_monsterinsights_level_custom_dimension.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
<?php | |
/** | |
* Add a new "Membership Level" Custom Dimension to your Google Analytics tracking code. | |
* | |
* Requires Paid Memberships Pro, MonsterInsights Pro and the MonsterInsights - Dimensions Addon. | |
*/ | |
/** | |
* Filter for adding the new dimension as under Insights > Settings > Dimensions | |
*/ |
View Commands
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
# delete all monsterinsight option values | |
wp option delete monsterinsights_usage_tracking_config | |
wp option delete monsterinsights_over_time | |
wp option delete monsterinsights_db_version | |
wp option delete monsterinsights_settings_version | |
wp option delete monsterinsights_current_version | |
wp option delete monsterinsights_settings | |
wp option delete monsterinsights_site_tt | |
wp option delete monsterinsights_site_profile | |
wp option delete monsterinsights_version_upgraded_from |
View monsterinsights-dimensions-userrole.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
<?php | |
/** | |
* Plugin Name: MonsterInsights User Role Dimension | |
* Description: Add a user role to the dimensions options in MonsterInsights. | |
* Version: 1.0.0 | |
* Author: MonsterInsights Support Team | |
* Author URI: https://www.monsterinsights.com | |
*/ | |
function monsterinsights_add_user_role_to_dimensions( $dimensions ) { |
View gist:2b1100d0e20291b14115199a98c5191a
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
define( 'WP_HTTP_BLOCK_EXTERNAL', TRUE ); | |
define( 'WP_ACCESSIBLE_HOSTS', 'example.com, domain.com' ); |
View custom-file-upload-form-in-wordpress.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
<?php | |
if ( ! function_exists( 'wpcfu_output_file_upload_form' ) ) { | |
/** | |
* Output the form. | |
* | |
* @param array $atts User defined attributes in shortcode tag | |
*/ | |
function wpcfu_output_file_upload_form( $atts ) { |
View gist:895435d42d6b54aaab608f0b02657921
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
# This is a workflow to compile and deploy to WPEngine Production | |
name: PROD Deploy to WPEngine | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the release-1 branch | |
push: | |
branches: [ main ] |
NewerOlder