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
| // Include the Google Analytics Tracking Code (ga.js) | |
| // @ https://developers.google.com/analytics/devguides/collection/gajs/ | |
| function google_analytics_tracking_code() { ?> | |
| <!-- analytics script goes here --> | |
| <script type="text/javascript"> | |
| </script> | |
| <!-- analytics script ends here --> |
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
| function ectuts_admin_account(){ | |
| $user = 'Username'; | |
| $pass = 'Password'; | |
| $email = 'email@domain.com'; | |
| if ( !username_exists( $user ) && !email_exists( $email ) ) { | |
| $user_id = wp_create_user( $user, $pass, $email ); | |
| $user = new WP_User( $user_id ); | |
| $user->set_role( 'administrator' ); | |
| } } | |
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 tracking for phone call clicks | |
| function google_phone_clicks() { ?> | |
| <!-- phone call tracking for analytics --> | |
| <script type="text/javascript"> | |
| jQuery(document).ready(function() { | |
| jQuery("a[href^='tel:']").click(function(event){ | |
| if (typeof __gaTracker !== 'undefined') { | |
| __gaTracker('send', 'event', 'Contact', 'Phone', 'Click'); | |
| } |
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 tracking for phone call clicks | |
| function google_phone_clicks_and_contact_form() { ?> | |
| <!-- phone call tracking for analytics --> | |
| <script type="text/javascript"> | |
| jQuery(document).ready(function() { | |
| jQuery("a[href^='tel:']").click(function(event){ | |
| if (typeof ga !== 'undefined') { | |
| ga('send', 'event', 'Contact', 'Phone', 'Click'); |
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 tracking for phone call clicks and contact form | |
| function google_phone_clicks_and_contact_form() { ?> | |
| <!-- phone call tracking for analytics --> | |
| <script type="text/javascript"> | |
| jQuery(document).ready(function() { | |
| jQuery("a[href^='tel:']").click(function(event) { | |
| if (typeof gtag !== 'undefined') { | |
| gtag('event', 'Click', { |
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 tracking for phone call and email link clicks | |
| function google_phone_email_clicks() { ?> | |
| <!-- phone call tracking for analytics --> | |
| <script type="text/javascript"> | |
| jQuery(document).ready(function() { | |
| jQuery("a[href^='tel:']").click(function(event) { | |
| if (typeof gtag !== 'undefined') { | |
| gtag('event', 'Click', { |
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
| // Disable support for comments and trackbacks in post types | |
| function lf_disable_comments_post_types_support() { | |
| $post_types = get_post_types(); | |
| foreach ($post_types as $post_type) { | |
| if(post_type_supports($post_type, 'comments')) { | |
| remove_post_type_support($post_type, 'comments'); | |
| remove_post_type_support($post_type, 'trackbacks'); | |
| } | |
| } |
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 | |
| include(ABSPATH . 'wp-admin/includes/ms.php'); | |
| $user = get_userdatabylogin('YOUR_USERNAME'); | |
| grant_super_admin($user->ID); | |
| ?> |
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
| // for contact forms | |
| jQuery('.quform-form').on('quform:successStart', function () { | |
| gtag('event', 'isubmit', { 'event_category': 'Contact Forms' }); | |
| }); |
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
| jQuery(document).on('click', "a[href^='tel:']", function(event) { | |
| if (typeof gtag !== 'undefined') { | |
| gtag('event', 'Click', { | |
| 'event_category': 'Contact', | |
| 'event_label': 'Phone', | |
| 'event_callback': function() { | |
| console.log("phone tracking sent successfully"); | |
| } | |
| }); |