Skip to content

Instantly share code, notes, and snippets.

@gmazzap
Created January 9, 2018 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmazzap/4af64e1991edb715228c79b06689b580 to your computer and use it in GitHub Desktop.
Save gmazzap/4af64e1991edb715228c79b06689b580 to your computer and use it in GitHub Desktop.
Usage of objects-hooks-remover without Composer
<?php
/*
* Plugin Name: A plugin name goes here
*/
/**
* Following files are found in the object-hooks-remover repository
* @see https://github.com/inpsyde/objects-hooks-remover
*/
require_once __DIR__ . '/utils.php';
require_once __DIR__ . '/object-hooks-remover.php';
// From here do anything you need to do...
// An example from the article https://inpsyde.com/en/remove-wordpress-hooks
Inpsyde\remove_closure_hook( 'init', SomeClass::class, [ '$foo', '$bar' ] );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment