Tag: theme-development
-
Quick Tip: DreamHost cron and WP-CLI
in WordPressEnsure your WordPress cron events fire correctly on DreamHost by setting the correct PHP version in your code. Be mindful of PHP compatibility issues between your code and the version running via WP-CLI in DreamHost’s cron system to avoid syntax errors like “unexpected ‘?’.” Use the `WP_CLI_PHP` environment variable to specify the PHP version needed…
-
Disabling plugin deactivation in WordPress
The problem came up recently about how to make sure plugins activated in the WordPress plugin UI don’t get deactivated if they are necessary for a site to function. I thought that was an interesting thought puzzle worth spending 15 minutes on, so I came up with this function as a solution: Which can be…