Embedding PHP in Content

Would you like to embed and run some PHP code in a blog post? Need to include a PHP file in a sidebar widget? Recently discovered this curious┬áplugin?┬áDon’t, you’re about to make an awful mistake. Lets walk through why it’s bad, and what you should be doing instead. Why Might Somebody Embed PHP? Perhaps you […]

Emailing on Image Attachment Uploads

Sometimes it’s useful to know when an image or audio attachment is added. Here I’ll outline how to send an emailwhen it happens. How It Works We start by hooking into add_attachment, and grabbing the user IDs of all administrators: // send to admins of the current blog/site $args = array(); $args[0] = ‘user_email’; $wp_user_search […]


By Month