Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit 336ebe1

Browse files
1 parent b205da1 commit 336ebe1

File tree

7 files changed

+53
-56
lines changed

7 files changed

+53
-56
lines changed

composer.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/composer/installed.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -238,17 +238,17 @@
238238
},
239239
{
240240
"name": "wp-content-framework/common",
241-
"version": "v0.0.49",
242-
"version_normalized": "0.0.49.0",
241+
"version": "v0.0.50",
242+
"version_normalized": "0.0.50.0",
243243
"source": {
244244
"type": "git",
245245
"url": "https://github.com/wp-content-framework/common.git",
246-
"reference": "2adfa15306b6baf8c752696a4454727ea52c94e4"
246+
"reference": "c102fc0763662dfbd3b378a2b24ea84f1d6d7064"
247247
},
248248
"dist": {
249249
"type": "zip",
250-
"url": "https://api.github.com/repos/wp-content-framework/common/zipball/2adfa15306b6baf8c752696a4454727ea52c94e4",
251-
"reference": "2adfa15306b6baf8c752696a4454727ea52c94e4",
250+
"url": "https://api.github.com/repos/wp-content-framework/common/zipball/c102fc0763662dfbd3b378a2b24ea84f1d6d7064",
251+
"reference": "c102fc0763662dfbd3b378a2b24ea84f1d6d7064",
252252
"shasum": ""
253253
},
254254
"require": {
@@ -258,7 +258,7 @@
258258
"phake/phake": "~2.0",
259259
"phpunit/phpunit": "~5.7"
260260
},
261-
"time": "2019-05-19T15:21:01+00:00",
261+
"time": "2019-06-01T19:08:56+00:00",
262262
"type": "library",
263263
"installation-source": "dist",
264264
"notification-url": "https://packagist.org/downloads/",
@@ -321,17 +321,17 @@
321321
},
322322
{
323323
"name": "wp-content-framework/core",
324-
"version": "v0.0.55",
325-
"version_normalized": "0.0.55.0",
324+
"version": "v0.0.56",
325+
"version_normalized": "0.0.56.0",
326326
"source": {
327327
"type": "git",
328328
"url": "https://github.com/wp-content-framework/core.git",
329-
"reference": "e2d9de93243fe6cfc326c6202705feb7f1ca35a5"
329+
"reference": "8b53896e8dec2aaded3ebff6674901423e729ae1"
330330
},
331331
"dist": {
332332
"type": "zip",
333-
"url": "https://api.github.com/repos/wp-content-framework/core/zipball/e2d9de93243fe6cfc326c6202705feb7f1ca35a5",
334-
"reference": "e2d9de93243fe6cfc326c6202705feb7f1ca35a5",
333+
"url": "https://api.github.com/repos/wp-content-framework/core/zipball/8b53896e8dec2aaded3ebff6674901423e729ae1",
334+
"reference": "8b53896e8dec2aaded3ebff6674901423e729ae1",
335335
"shasum": ""
336336
},
337337
"require": {
@@ -343,7 +343,7 @@
343343
"phake/phake": "~2.0",
344344
"phpunit/phpunit": "~5.7"
345345
},
346-
"time": "2019-05-18T07:53:20+00:00",
346+
"time": "2019-06-01T19:05:54+00:00",
347347
"type": "library",
348348
"installation-source": "dist",
349349
"autoload": {
@@ -540,24 +540,24 @@
540540
},
541541
{
542542
"name": "wp-content-framework/update",
543-
"version": "v0.0.7",
544-
"version_normalized": "0.0.7.0",
543+
"version": "v0.0.8",
544+
"version_normalized": "0.0.8.0",
545545
"source": {
546546
"type": "git",
547547
"url": "https://github.com/wp-content-framework/update.git",
548-
"reference": "213b9be613148ef3c62b8aeda70afff894c34de1"
548+
"reference": "470b95036dd2c155c1aceb0a5fc719b05e0bdede"
549549
},
550550
"dist": {
551551
"type": "zip",
552-
"url": "https://api.github.com/repos/wp-content-framework/update/zipball/213b9be613148ef3c62b8aeda70afff894c34de1",
553-
"reference": "213b9be613148ef3c62b8aeda70afff894c34de1",
552+
"url": "https://api.github.com/repos/wp-content-framework/update/zipball/470b95036dd2c155c1aceb0a5fc719b05e0bdede",
553+
"reference": "470b95036dd2c155c1aceb0a5fc719b05e0bdede",
554554
"shasum": ""
555555
},
556556
"require": {
557557
"php": ">=5.6.0",
558558
"wp-content-framework/presenter": "~0.0.1"
559559
},
560-
"time": "2019-05-19T15:04:17+00:00",
560+
"time": "2019-06-01T19:12:39+00:00",
561561
"type": "library",
562562
"installation-source": "dist",
563563
"notification-url": "https://packagist.org/downloads/",

vendor/wp-content-framework/common/src/classes/models/filter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* WP_Framework_Common Classes Models Filter
44
*
5-
* @version 0.0.49
5+
* @version 0.0.50
66
* @author Technote
77
* @copyright Technote All Rights Reserved
88
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
@@ -95,7 +95,7 @@ public function register_filter( $class, $tag, array $methods ) {
9595
* @return false|WP_Framework|Singleton
9696
*/
9797
private function get_target_app( $class ) {
98-
if ( ! $this->app->system->is_enough_version() ) {
98+
if ( ! $this->app->is_uninstall() && ! $this->app->system->is_enough_version() ) {
9999
return false;
100100
}
101101
if ( ! isset( $this->_target_app[ $class ] ) ) {

vendor/wp-content-framework/common/src/classes/models/system.php

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* WP_Framework_Common Classes Models System
44
*
5-
* @version 0.0.49
5+
* @version 0.0.50
66
* @author Technote
77
* @copyright Technote All Rights Reserved
88
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
@@ -60,6 +60,8 @@ protected function initialize() {
6060
if ( $this->app->is_theme ) {
6161
$this->deactivate_theme();
6262
}
63+
} elseif ( $this->app->is_uninstall() ) {
64+
$this->app_initialized();
6365
} elseif ( ! self::$_setup_initialized_action ) {
6466
self::$_setup_initialized_action = true;
6567
add_action( 'init', function () {
@@ -77,7 +79,10 @@ private function app_initialized() {
7779
return;
7880
}
7981

80-
$this->setup_property();
82+
if ( $this->app->is_uninstall() ) {
83+
$this->app->load_all_packages();
84+
$this->app->uninstall->get_class_list();
85+
}
8186
$this->do_action( 'app_initialized', $this->app );
8287

8388
if ( ! $this->app->option->is_app_activated() ) {
@@ -95,16 +100,6 @@ private function deactivate_theme() {
95100
}, 999 );
96101
}
97102

98-
/**
99-
* setup property
100-
*/
101-
private function setup_property() {
102-
if ( $this->app->is_uninstall() ) {
103-
$this->app->load_all_packages();
104-
$this->app->uninstall->get_class_list();
105-
}
106-
}
107-
108103
/**
109104
* @return bool
110105
*/

vendor/wp-content-framework/core/src/classes/main.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* WP_Framework_Core Classes Main
44
*
5-
* @version 0.0.54
5+
* @version 0.0.56
66
* @author Technote
77
* @copyright Technote All Rights Reserved
88
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
@@ -322,6 +322,9 @@ public function main_init() {
322322
$this->_initialized = true;
323323

324324
$this->filter->do_action( 'app_initialize', $this );
325+
if ( $this->app->is_uninstall() ) {
326+
$this->system;
327+
}
325328
}
326329

327330
/**
@@ -350,16 +353,16 @@ public function is_loaded( $name ) {
350353
}
351354

352355
/**
353-
* @deprecated
354356
* @return string
357+
* @deprecated
355358
*/
356359
public function get_plugin_uri() {
357360
return $this->app->get_plugin_data( $this->app->is_theme ? 'ThemeURI' : 'PluginURI' );
358361
}
359362

360363
/**
361-
* @deprecated
362364
* @return array
365+
* @deprecated
363366
*/
364367
public function get_package_versions() {
365368
return $this->app->array->combine( array_map( function ( $package ) {

vendor/wp-content-framework/core/src/framework.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* WP_Framework
44
*
5-
* @version 0.0.54
5+
* @version 0.0.56
66
* @author Technote
77
* @copyright Technote All Rights Reserved
88
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
@@ -318,8 +318,7 @@ public function __call( $name, $arguments ) {
318318
*/
319319
public static function __callStatic( $name, $arguments ) {
320320
if ( preg_match( '#register_uninstall_(.+)\z#', $name, $matches ) ) {
321-
$plugin_base_name = $matches[1];
322-
self::uninstall( $plugin_base_name );
321+
self::uninstall( $matches[1] );
323322
}
324323
}
325324

vendor/wp-content-framework/update/src/classes/models/update.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* WP_Framework_Update Classes Models Update
44
*
5-
* @version 0.0.7
5+
* @version 0.0.8
66
* @author Technote
77
* @copyright Technote All Rights Reserved
88
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
@@ -160,8 +160,8 @@ private function get_upgrade_notices( $version, $url ) {
160160
* @return false|string
161161
*/
162162
private function get_plugin_slug( $url ) {
163-
if ( $this->app->string->starts_with( $url, 'https://wordpress.org/plugins/' ) ) {
164-
return trim( str_replace( 'https://wordpress.org/plugins/', '', $url ), '/' );
163+
if ( preg_match( '#\Ahttps://(\w+\.)?wordpress.org/plugins/(.+?)/?\z#', $url, $matches ) ) {
164+
return $matches[2];
165165
}
166166

167167
return false;

0 commit comments

Comments
 (0)