WordPress.org

Plugin Directory

Changeset 632100


Ignore:
Timestamp:
11/30/12 05:03:26 (17 months ago)
Author:
ethitter
Message:

Fix singleton implementation in Jetpack's Photon module.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/photon.php

    r632068 r632100  
    3131     */ 
    3232    public static function instance() { 
    33         if ( ! is_a( self::$__instance, 'Jetpack_Photon' ) ) 
     33        if ( ! is_a( self::$__instance, 'Jetpack_Photon' ) ) { 
    3434            self::$__instance = new Jetpack_Photon; 
     35            self::$__instance->setup(); 
     36        } 
    3537 
    3638        return self::$__instance; 
    3739    } 
     40 
     41    /** 
     42     * Silence is golden. 
     43     */ 
     44    private function __construct() {} 
    3845 
    3946    /** 
     
    4451     * @return null 
    4552     */ 
    46     private function __construct() { 
     53    private function setup() { 
    4754        // Display warning if site is private 
    4855        add_action( 'jetpack_activate_module_photon', array( $this, 'action_jetpack_activate_module_photon' ) ); 
Note: See TracChangeset for help on using the changeset viewer.