Commit 56ada537 authored by Erick Hitter's avatar Erick Hitter

Better singelton implementation

parent 94e87d3f
......@@ -39,7 +39,7 @@ class external_permalinks_redux {
*/
static function get_instance() {
if ( ! isset( self::$instance ) )
self::$instance = new external_permalinks_redux;
self::$instance = new self;
return self::$instance;
}
......@@ -51,7 +51,7 @@ class external_permalinks_redux {
* @uses add_filter
* @return null
*/
function __construct() {
private function __construct() {
add_action( 'init', array( $this, 'action_init' ), 0 ); // other init actions may rely on permalinks so filter early
add_action( 'admin_init', array( $this, 'action_admin_init' ) );
add_action( 'save_post', array( $this, 'action_save_post' ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment