This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ================================ | |
// CLEAN ALL SCRIPT TAGS FROM POSTS | |
// ================================ | |
// | |
// Usage: Drop this file in your /wp-content/mu-plugins/ folder. | |
// | |
// Any post or page that contains a script tag will have it removed automatically. | |
// This helps prevent re-infection while hardening your site security. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ------------------------ | |
// Email Image AutoEmbedder | |
// ------------------------ | |
add_action('phpmailer_init', 'email_images_embedder'); | |
function email_images_embedder($phpmailer) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* === AutoDelete new Administrators === */ | |
/* (last line of defence against hackers) */ | |
/* Usage: 1. set the admin username list to existing real admin(s) */ | |
/* 2. place this file in your /wp-content/mu-plugins/ directory */ | |
/* 3. remember to update the username list if you add a new admin */ | |
/* 4. harden your security in other ways - do not rely on this */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Delete All Attachments for a Specified Post | |
// ------------------------------------------- | |
function wp_delete_post_attachments($post, $deletethumbnail = false); | |
if (!is_object( $post )) {$post = get_post( $post );} | |
$uploads = wp_upload_dir(); | |
$args = array( | |
'post_type' => 'attachment', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* ================ */ | |
/* WP Debug Session */ | |
/* ---------------- */ | |
/* . Version 1.04 . */ | |
/* ================ */ | |
// Home: https://gist.github.com/majick777/6c4e4074ce4a59fe09f7baa855732aee | |
// Author: DreamJester of http://wordquest.org/ |