Skip to content

Commit 4c2c9b5

Browse files
Merge pull request #10 from alex-storojenko/develop
Fix small bags
2 parents a74604b + d30705f commit 4c2c9b5

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

customizer/class-think-customizer.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ class Think_Customizer {
1313
/**
1414
* @var $instance
1515
*
16-
* Container for only one exemplar of @self
16+
* Container for only one exemplar of @static
1717
*
1818
* According with realization singleton
1919
*/
20-
static private $instance = null;
20+
protected static $instance = null;
2121

2222
/**
2323
* <code>
@@ -294,17 +294,17 @@ protected function get_control( $wp_customize, $setting_id, $class_args, $type =
294294
}
295295

296296
/**
297-
* Method returned only one exemplar of @self
297+
* Method returned only one exemplar of @static
298298
*
299299
* According with realization singleton
300300
*
301301
* @param array $structure
302302
*
303303
* @return mixed
304304
*/
305-
public static function customizer( array $structure ) {
305+
public static function instance( array $structure ) {
306306
if ( null === static::$instance ) {
307-
static::$instance = new self( $structure );
307+
static::$instance = new static( $structure );
308308
}
309309

310310
return static::$instance;
@@ -316,14 +316,16 @@ public static function customizer( array $structure ) {
316316
* According with realization singleton
317317
*/
318318
private function __clone() {
319+
//
319320
}
320321

321322
/**
322323
* The ban on unserialization from outside the class
323324
*
324325
* According with realization singleton
325326
*/
326-
private function __wakeup() {
327+
protected function __wakeup() {
328+
//
327329
}
328330
}
329331
}

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,8 @@ WordPress Think Framework gives you the ability to quickly and easily create inc
5555
* Fix bug preview image popup
5656

5757
= 1.12.0 - June 12 2017 =
58-
* Change mechanism of framework installation
58+
* Change mechanism of framework installation
59+
60+
= 1.12.2 - June 13 2017 =
61+
* Fix small bags
62+
* And Change Think_Customizer caller Think_Customizer::customizer($structure) to Think_Customizer::instance($structure)

utility/trait-think-singleton.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@ trait Think_Singleton {
1717
*
1818
* According with realization singleton
1919
*/
20-
static private $instance = null;
20+
protected static $instance = null;
2121

2222
/**
2323
* Singleton constructor
2424
* The ban on the creation of a class outside
2525
*
2626
* According with realization singleton
2727
*/
28-
private function __construct() {
28+
protected function __construct() {
29+
//
2930
}
3031

3132
/**
@@ -37,7 +38,7 @@ private function __construct() {
3738
*/
3839
public static function get_instance() {
3940
if ( null === static::$instance ) {
40-
static::$instance = new self();
41+
static::$instance = new static();
4142
}
4243

4344
return static::$instance;
@@ -49,14 +50,16 @@ public static function get_instance() {
4950
* According with realization singleton
5051
*/
5152
private function __clone() {
53+
//
5254
}
5355

5456
/**
5557
* The ban on unserialization from outside the class
5658
*
5759
* According with realization singleton
5860
*/
59-
private function __wakeup() {
61+
protected function __wakeup() {
62+
//
6063
}
6164
}
6265
}

0 commit comments

Comments
 (0)