Two Google Analytics to Track Too

Here is a sample code of how to send data to two different Google Analytics accounts and not have it be sending twice to the same account. <script> (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject']=r;i[r]=i[r]||function(){...

Unwanted Characters in XML handling in php

So I ran into an issue where there was unwanted characters where spaces where suppose to be or nothing at all.  Here is a sample of those characters.  †“ Here is the fix that I implemented and it cleaned up the code right away. echo “<META...

Updates using Transient Data

Here some useful activation and update hooks. <?php add_action( ‘upgrader_process_complete', ‘some_plugin_upgrade_completed', 10, 2 ); function some_plugin_upgrade_completed( $upgrader_object, $options ) { // The path to our plugin's main file...

WordPress Databases – Using dbDelta

There are plenty of times you need to create extra database tables for storing data within WordPress.  Sometimes a scope of an addon has changed and you need to modify the table.  Using dbDelta within WordPress can allow you to modify the table without having to use...

WordPress Plugin Header Requirements

Here is the code sample of what is required for developing a plugin.  This needs to go into the main php file within the plugin folder. <?php /* Plugin Name: WordPress.org Plugin Plugin URI: https://developer.wordpress.org/plugins/the-basics/ Description: Basic...