[DRAFT]
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 // Don't copy this line if adding this gist to a functions.php file. | |
function get_mepr_id() { | |
if ( !class_exists('MeprUtils') ) { | |
return 0; | |
} | |
$mepr_user = MeprUtils::get_currentuserinfo(); | |
if ( $mepr_user === false ) { |
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 // Remove this line when adding to child functions.php | |
/** | |
* This example sets custom dimension #14 to be the HTTP | |
* user agent. | |
* | |
* This is compatible with MonsterInsights gtag code. This filter supercedes | |
* the monsterinsights_frontend_tracking_options_analytics_before_pageview | |
* filter. | |
* |
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
/** Permanent fix to force Popular Post to fix on mobile portrait. */ | |
.monsterinsights-inline-popular-posts.monsterinsights-popular-posts-styled.monsterinsights-inline-popular-posts-november .monsterinsights-inline-popular-posts-title { | |
white-space: normal; | |
} |
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(rn) { | |
let customerURL; | |
const customerURLElt = | |
document.querySelector(`#ex-templateBody td.ex-mcnTextContent table:nth-child(${rn}) tbody tr:nth-child(2) td a`); | |
if (customerURLElt) { | |
customerURL = customerURLElt.innerText; | |
} |
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 // This line is not needed for functions.php. | |
function monsterinsights_eu_compliance_tracking_didomi( $attributes ) { | |
$attributes['data-vendor'] = "didomi:google"; | |
$attributes['type'] = "didomi/javascript"; | |
return $attributes; | |
} | |
add_filter( 'monsterinsights_tracking_analytics_script_attributes', 'monsterinsights_eu_compliance_tracking_didomi' ); |
NewerOlder