Skip to content

Instantly share code, notes, and snippets.

@tokkonopapa
tokkonopapa / class-ip-geo-block.php
Created December 19, 2018 22:38
Updated for registration issue
<?php
/**
* IP Geo Block
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-3.0
* @link https://www.ipgeoblock.com/
* @copyright 2013-2018 tokkonopapa
*/
@tokkonopapa
tokkonopapa / drop-in-admin.php
Created November 11, 2018 01:37
Give permission to upload any files when administrator uses Elementor Page Builder
<?php
/**
* Drop-in for IP Geo Block custom filters for admin
*
* This file should be named as `drop-in-admin.php`.
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-3.0
* @link http://www.ipgeoblock.com/
@tokkonopapa
tokkonopapa / drop-in.php
Created September 29, 2018 16:52
Block specific countries on public facing pages.
<?php
/**
* Drop-in for IP Geo Block custom filters
*
* This file should be renamed to `drop-in.php`.
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-3.0
* @link https://www.ipgeoblock.com/
@tokkonopapa
tokkonopapa / drop-in-admin.php
Last active October 26, 2018 14:26
Drop-in for IP Geo Block custom filters for admin
<?php
/**
* Drop-in for IP Geo Block custom filters for admin
*
* This file should be named as `drop-in-admin.php`.
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-3.0
* @link http://www.ipgeoblock.com/
@tokkonopapa
tokkonopapa / wph.class.php
Last active February 12, 2019 21:13
WP Hide & Security Enhancer 1.4.9.1
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class WPH
{
var $default_variables = array();
var $templates_data = array();
var $urls_replacement = array();
@tokkonopapa
tokkonopapa / authenticate.min.js
Last active April 24, 2018 14:29
Possible fixed version as 3.0.10.5
/*
Project: WP-ZEP - Zero-day exploit Prevention for wp-admin
Copyright (c) 2013-2018 tokkonopapa ([email protected])
This software is released under the MIT License.
*/
!function(e,t,n){"use strict";function r(e){return e=e.replace(y.home+y.admin,""),C.hasOwnProperty(e)?C[e]:null}function o(e){var t=n.createElement("div");return t.appendChild(n.createTextNode(e)),e=t.innerHTML.replace(/["']/g,function(e){return{'"':"&quot;","'":"&#39;"}[e]}),t="",e}function a(e){e=e?e.toString():"";var t=e.match(/^(?:([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return{scheme:t[1]||"",relative:t[2]||"",authority:t[3]||"",path:t[4]||"",query:t[5]||"",fragment:t[6]||""}}function i(e){return(e.scheme?e.scheme+":":"")+(e.relative+e.path)+(e.query?"?"+e.query:"")+(e.fragment?"#"+e.fragment:"")}function c(e,n){"object"!=typeof e&&(e=a(e||t.location.href));for(var r=e.query?e.query.split("&"):[],o=r.length;o-- >0;)if(0===r[o].indexOf(w.name)){r.splice(o,1);break}return r.push(w.name+"="+encodeURIComponent
@tokkonopapa
tokkonopapa / class-ip-geo-block-logs.php
Created April 4, 2018 13:41
Add fallback to alter the field `last` and `view` for MariaDB
<?php
/**
* IP Geo Block - Handling validation log
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-3.0
* @link http://www.ipgeoblock.com/
* @copyright 2013-2018 tokkonopapa
*/
@tokkonopapa
tokkonopapa / class-ip-geo-block-util.php
Created April 3, 2018 17:18
PHP less than 5.4 code.
<?php
/**
* IP Geo Block - Utilities
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-3.0
* @link http://www.ipgeoblock.com/
* @copyright 2013-2018 tokkonopapa
*/
<?php
/**
* IP Geo Block
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-3.0
* @link http://www.ipgeoblock.com/
* @copyright 2013-2018 tokkonopapa
*/
@tokkonopapa
tokkonopapa / class-maxmind.php
Created January 29, 2018 23:02
Force to use legacy databases
<?php
/**
* IP Geo Block API class library for Maxmind
*
* @version 1.1.10
* @author tokkonopapa <[email protected]>
* @license GPL-3.0
* @link http://www.ipgeoblock.com/
* @copyright 2013-2018 tokkonopapa
*/