Skip to content

Instantly share code, notes, and snippets.

@IronGhost63
IronGhost63 / functions.php
Created December 7, 2017 12:27
lock version for specific plugin
<?php
function wp63_lock_plugin_version($data){
$lock = apply_filters( "wp63_lock_plugin_version", array() );
if(isset( $data->response )){
foreach( $data->response as $key => $value ){
if( isset($lock[$value->slug]) && $value->new_version != $lock[$value->slug]){
$data->no_update[] = $value;
unset($data->response[$key]);
}
INITIALISATION
==============
load wp-config.php
set up default constants
load wp-content/advanced-cache.php if it exists
load wp-content/db.php if it exists
connect to mysql, select db
load object cache (object-cache.php if it exists, or wp-include/cache.php if not)
load wp-content/sunrise.php if it exists (multisite only)