From 09eb56f1b5f22f4c17d8b6e98f2eb3af30ba00ba Mon Sep 17 00:00:00 2001 From: nikitasinelnikov Date: Mon, 7 Oct 2019 00:48:51 +0300 Subject: [PATCH] - changed dependencies before release; --- includes/admin/class-admin.php | 13 +++++++++++++ includes/class-dependencies.php | 32 +++++++++++++++++--------------- includes/class-extensions.php | 4 ++-- includes/class-init.php | 19 +++---------------- 4 files changed, 35 insertions(+), 33 deletions(-) diff --git a/includes/admin/class-admin.php b/includes/admin/class-admin.php index 2b091bbc..66bb40e8 100644 --- a/includes/admin/class-admin.php +++ b/includes/admin/class-admin.php @@ -432,5 +432,18 @@ if ( ! class_exists( 'um\admin\Admin' ) ) { } return $parent_file; } + + + /** + * @since 2.0 + * + * @return core\Admin_Notices() + */ + function notices() { + if ( empty( UM()->classes['admin_notices'] ) ) { + UM()->classes['admin_notices'] = new core\Admin_Notices(); + } + return UM()->classes['admin_notices']; + } } } \ No newline at end of file diff --git a/includes/class-dependencies.php b/includes/class-dependencies.php index d7bbbe72..3bf0f59b 100644 --- a/includes/class-dependencies.php +++ b/includes/class-dependencies.php @@ -37,27 +37,29 @@ if ( ! class_exists( 'um\Dependencies' ) ) { 'followers' => '2.1.6', 'forumwp' => '2.0.1', 'friends' => '2.1.4', + /*need to review*/ 'groups' => '2.0', 'instagram' => '2.0.5', 'mailchimp' => '2.2.0', 'messaging' => '2.2.5', 'mycred' => '2.1.6', - 'notices' => '2.0.1', - 'notifications' => '2.0.1', - 'online' => '2.0', - 'private-content' => '2.0', - 'profile-completeness' => '2.0.1', - 'recaptcha' => '2.0.2', - 'reviews' => '2.0.3', - 'social-activity' => '2.0.6', + 'notices' => '2.0.5', + 'notifications' => '2.1.3', + 'online' => '2.1.1', + 'private-content' => '2.0.5', + 'profile-completeness' => '2.1.2', + 'recaptcha' => '2.1.2', + 'reviews' => '2.1.5', + 'social-activity' => '2.2.0', + /*need Champ's feedback */ 'social-login' => '2.0.1', - 'terms-conditions' => '2.0', - 'unsplash' => '2.0', - 'user-bookmarks' => '2.0', - 'user-photos' => '2.0.1', - 'user-tags' => '2.0', - 'verified-users' => '2.0.1', - 'woocommerce' => '2.0.1', + 'terms-conditions' => '2.1.1', + 'unsplash' => '2.0.2', + 'user-bookmarks' => '2.0.2', + 'user-photos' => '2.0.4', + 'user-tags' => '2.1.0', + 'verified-users' => '2.0.5', + 'woocommerce' => '2.1.9', /*????*/ 'restrict-content' => '2.0', diff --git a/includes/class-extensions.php b/includes/class-extensions.php index 145c5db5..1bd39193 100644 --- a/includes/class-extensions.php +++ b/includes/class-extensions.php @@ -57,13 +57,13 @@ if ( ! class_exists( 'um\Extensions' ) ) { $compare_version_result = UM()->dependencies()->compare_versions( $extension['min_core_version'], $extension['version'], $slug, $extension['title'] ); if ( true !== $compare_version_result ) { - UM()->notices()->add_notice( "{$slug}_dependencies", array( + UM()->admin()->notices()->add_notice( "{$slug}_dependencies", array( 'class' => 'error', 'message' => '

' . $compare_version_result . '

', ), 1 ); } } elseif ( ! $run && ! empty( $message ) ) { - UM()->notices()->add_notice( "{$slug}_dependencies", array( + UM()->admin()->notices()->add_notice( "{$slug}_dependencies", array( 'class' => 'error', 'message' => $message, ), 1 ); diff --git a/includes/class-init.php b/includes/class-init.php index 6d025e2a..73b7d177 100644 --- a/includes/class-init.php +++ b/includes/class-init.php @@ -16,7 +16,7 @@ if ( ! class_exists( 'UM' ) ) { * @method UM_Mailchimp Mailchimp() * @method UM_Messaging_API Messaging_API() * @method UM_myCRED myCRED() - * @method UM_Notices_API Notices_API() + * @method UM_Notices Notices() * @method UM_Notifications_API Notifications_API() * @method UM_Online Online() * @method UM_Profile_Completeness_API Profile_Completeness_API() @@ -517,7 +517,7 @@ if ( ! class_exists( 'UM' ) ) { $this->admin_upgrade()->init_packages_ajax_handlers(); $this->admin_gdpr(); $this->columns(); - $this->notices(); + $this->admin()->notices(); $this->admin_navmenu(); $this->theme_updater(); $this->access(); @@ -529,7 +529,7 @@ if ( ! class_exists( 'UM' ) ) { $this->columns(); $this->admin_enqueue(); $this->metabox(); - $this->notices(); + $this->admin()->notices(); $this->users(); $this->dragdrop(); $this->plugin_updater(); @@ -855,19 +855,6 @@ if ( ! class_exists( 'UM' ) ) { } - /** - * @since 2.0 - * - * @return um\admin\core\Admin_Notices() - */ - function notices() { - if ( empty( $this->classes['admin_notices'] ) ) { - $this->classes['admin_notices'] = new um\admin\core\Admin_Notices(); - } - return $this->classes['admin_notices']; - } - - /** * @since 2.0 *