So I ran into a need to validate an email address for a frontend posting of a custom post type using Cozmos Labs WordPress Creation Toolkit. Here is the code that I used to be able to accomplish that. There is some commented out code that allows for you to see what...
Sometimes you will want to output the current year within your site. It is very useful with not having to update the Copyright notice in the footer of your site. Place the following code within your functions.php in the child theme and you are good to use the...
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...
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...