Skip to content

Instantly share code, notes, and snippets.

@jwenerd
Forked from Pross/pl-security-patcher.php
Created January 22, 2015 22:13
Show Gist options
  • Save jwenerd/213232eef4ebc2936331 to your computer and use it in GitHub Desktop.
Save jwenerd/213232eef4ebc2936331 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: PageLines Security Patcher
Description: Blocks the recent exploits for legacy themes in the event you cant update the themes.
Version: 1.0
Author: PageLines
*/
class Fix_Pagelines_Legacy {
function __construct() {
add_action( 'after_setup_theme', array( $this, 'sanitize' ) );
}
function sanitize() {
if( ! current_user_can( 'edit_theme_options' ) ) {
remove_all_actions( 'wp_ajax_pagelines_ajax_save_option' );
remove_action( 'admin_init', 'pagelines_register_settings', 5 );
}
}
}
new Fix_Pagelines_Legacy;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment