A PHP function to generate a list of information of all dates for a given month and year. Input: month and year in number. Output: Two-dimensional array of all dates. PHP FUNCTION /** * Generate a list of information of all dates for a given month and year. * @param int $month month number...
WordPress Gravity Forms plugin lets you set dynamic values for fields via shortcode ( merge tag ). You can populate a field with a date value using the merge tag {date_mdy}, {date_dmy} etc. These tags Display the current date in the MM/DD/YYYY or DD/MM/YYYY format. But there is no tag for...
I need to send WooCommerce webhook requests only when an order is completed. But WooCommerce does not have any webhook topic for order completion. I created the custom topic ‘Custom Order Completed‘. Here is my code below. .gist table { margin-bottom: 0;...
If your PHP script is running on Pantheon hosting , you might be noticed that PHP rename function is not working. In PHP rename function is used to rename a file or directory and to move any file or directory. PHP rename function fails on Pantheon Hosting Pantheon server is configured in...
You can delete a directory using rmdir() function. But rmdir function has limitation. To remove a directory using rmdir , the directory must be blank. If a directory contains multiple directory and files then we have to apply recursive process. Custom PHP function to delete folder including...
I keep having the strangest reoccurring dream. In my dream, I’m playing a turret defense game. 1 However, it is no ordinary tower game. It’s actually a thread process model. In the dream, each turret type represents a thread synchronization mechanism, generally some sort of atomic primitive. The...
On Friday, an article ran on Slashdot making note that Microsoft is “banning” the C function memcpy in favor of the new memcpy_s. While memcpy_s has in truth been around for a while, the notion that it would now generate compiler warnings has created quite an uproar. Some people seem curious as to...