-
-
Save almone/072b0125ff23522917c5 to your computer and use it in GitHub Desktop.
Override/Extends a plugin
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 | |
/** | |
* Plugin Name: Extend a plugin | |
* Version: 0.0.1 | |
* Author: Jonathan Bardo | |
* License: GPLv2+ | |
* Author URI: http://jonathanbardo.com | |
*/ | |
class Test extends Date_Range_Filter { | |
public static function setup() { | |
parent::setup(); // optionnal | |
} | |
public static function OVERRIDE_PARENT_FUNCTION() { | |
// Isn't that beautiful? | |
} | |
} | |
remove_action( 'plugins_loaded', array( 'Date_Range_Filter', 'setup' ) ); | |
add_action( 'plugins_loaded', array( 'Test', 'setup' ), 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment