diff --git a/assets/img/extensions/profile-tabs.png b/assets/img/extensions/profile-tabs.png new file mode 100644 index 00000000..2c45ca7f Binary files /dev/null and b/assets/img/extensions/profile-tabs.png differ diff --git a/includes/admin/templates/extensions.php b/includes/admin/templates/extensions.php index 420484b9..d54df331 100644 --- a/includes/admin/templates/extensions.php +++ b/includes/admin/templates/extensions.php @@ -128,6 +128,12 @@ $premium['unsplash'] = array( 'desc' => 'Allow users to select a profile cover photo from Unsplash from their profile', ); +$premium['profile-tabs'] = array( + 'url' => 'https://ultimatemember.com/extensions/profile-tabs/', + 'name' => 'Profile Tabs', + 'desc' => 'Allow users to add custom tabs to profiles', +); + $free['forumwp'] = array( 'url' => 'https://ultimatemember.com/extensions/forumwp/', 'name' => 'ForumWP', diff --git a/includes/class-dependencies.php b/includes/class-dependencies.php index 315a3759..a75b4495 100644 --- a/includes/class-dependencies.php +++ b/includes/class-dependencies.php @@ -47,6 +47,7 @@ if ( ! class_exists( 'um\Dependencies' ) ) { 'online' => '2.1.1', 'private-content' => '2.0.5', 'profile-completeness' => '2.1.2', + 'profile-tabs' => '1.0.0', 'recaptcha' => '2.1.2', 'reviews' => '2.1.5', 'social-activity' => '2.2.0', @@ -64,7 +65,7 @@ if ( ! class_exists( 'um\Dependencies' ) ) { /*rc*/ 'user-notes' => '2.0', - 'profile-tabs' => '1.6', + /*beta*/ 'frontend-posting' => '1.0', diff --git a/includes/class-init.php b/includes/class-init.php index 5397c187..e50c75e7 100644 --- a/includes/class-init.php +++ b/includes/class-init.php @@ -37,6 +37,7 @@ if ( ! class_exists( 'UM' ) ) { * @method UM_User_Bookmarks User_Bookmarks() * @method UM_Unsplash Unsplash() * @method UM_ForumWP ForumWP() + * @method UM_Profile_Tabs Profile_Tabs() */ final class UM extends UM_Functions { diff --git a/includes/core/class-enqueue.php b/includes/core/class-enqueue.php index 3a815b8a..dbe487fd 100644 --- a/includes/core/class-enqueue.php +++ b/includes/core/class-enqueue.php @@ -43,6 +43,22 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) { $this->js_baseurl = um_url . 'assets/js/'; $this->css_baseurl = um_url . 'assets/css/'; + add_action( 'init', array( &$this, 'scripts_enqueue_priority' ) ); + } + + + /** + * + */ + function scripts_enqueue_priority() { + add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ), $this->get_priority() ); + } + + + /** + * @return int + */ + function get_priority() { /** * UM hook * @@ -63,8 +79,7 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) { * } * ?> */ - $priority = apply_filters( 'um_core_enqueue_priority', 100 ); - add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ), $priority ); + return apply_filters( 'um_core_enqueue_priority', 100 ); } @@ -80,7 +95,7 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) { wp_dequeue_script( 'select2'); wp_deregister_script('select2'); } - wp_register_script( 'select2', $this->js_baseurl . 'select2/select2.full.min.js', array( 'jquery', 'jquery-masonry' ), ultimatemember_version, true ); + wp_register_script( 'select2', $this->js_baseurl . 'select2/select2.full.min.js', array( 'jquery' ), ultimatemember_version, true ); wp_register_script( 'um_scrollbar', $this->js_baseurl . 'simplebar' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true ); @@ -141,7 +156,7 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) { wp_register_script('um_dropdown', $this->js_baseurl . 'dropdown' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true ); - wp_register_script('um_members', $this->js_baseurl . 'um-members' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'jquery-ui-slider', 'um_dropdown', 'wp-hooks', 'jquery-masonry' ), ultimatemember_version, true ); + wp_register_script('um_members', $this->js_baseurl . 'um-members' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'jquery-ui-slider', 'um_dropdown', 'wp-hooks', 'jquery-masonry', 'um_scripts' ), ultimatemember_version, true ); wp_register_script('um_profile', $this->js_baseurl . 'um-profile' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'wp-i18n' ), ultimatemember_version, true ); wp_register_script('um_account', $this->js_baseurl . 'um-account' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true ); diff --git a/includes/core/class-plugin-updater.php b/includes/core/class-plugin-updater.php index b6c7bbe2..1e3e198b 100644 --- a/includes/core/class-plugin-updater.php +++ b/includes/core/class-plugin-updater.php @@ -159,10 +159,14 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) { 'key' => 'filesharing', 'title' => 'File Sharing', ), - 'um-user-location/um-user-location.php' => array( + 'um-user-location/um-user-location.php' => array( 'key' => 'user-location', 'title' => 'User Location', ), + 'um-profile-tabs/um-profile-tabs.php' => array( + 'key' => 'profile_tabs', + 'title' => 'Profile tabs', + ), ); $active_um_plugins = array(); diff --git a/readme.txt b/readme.txt index b1e54b9c..0ec16527 100644 --- a/readme.txt +++ b/readme.txt @@ -42,6 +42,7 @@ Read about all of the plugin's features at [Ultimate Member](https://ultimatemem Ultimate Member has a range of extensions that allow you to extend the power of the plugin. You can purchase all of these extensions at a significant discount with our [All Access Pass](https://ultimatemember.com/pricing/) or you can purchase extensions individually. +* [Profile Tabs](https://ultimatemember.com/extensions/profile-tabs/) - Allow users to add custom tabs to profiles * [Unsplash](https://ultimatemember.com/extensions/unsplash/) - Allow users to select a profile cover photo from [Unsplash](https://unsplash.com/) from their profile * [User Bookmarks](https://ultimatemember.com/extensions/user-bookmarks/) - Allow users to bookmark content from your website * [User Photos](https://ultimatemember.com/extensions/user-photos/) - Allow users to upload photos to their profile