diff --git a/addons/generate_random_users.php b/addons/generate_random_users.php index c36ad627..f1ed5e5a 100644 --- a/addons/generate_random_users.php +++ b/addons/generate_random_users.php @@ -22,8 +22,6 @@ class UM_ADDON_generate_random_users { } function um_admin_addon_hook( $hook ) { - global $ultimatemember; - switch ( $hook ) { case 'generate_random_users': $json_url = "https://randomuser.me/api/"; diff --git a/addons/gravatar_transfer.php b/addons/gravatar_transfer.php index cfc54847..e5ac26b0 100644 --- a/addons/gravatar_transfer.php +++ b/addons/gravatar_transfer.php @@ -31,7 +31,6 @@ class UM_ADDON_gravatar_transfer { } function um_admin_addon_hook( $hook ) { - global $ultimatemember; switch( $hook ) { case 'gravatar_transfer': if( $this->gravatar_hash() ){ diff --git a/addons/install_info.php b/addons/install_info.php index 464acad8..46784aba 100644 --- a/addons/install_info.php +++ b/addons/install_info.php @@ -22,8 +22,6 @@ class UM_ADDON_install_info { } function um_admin_addon_hook( $hook ) { - global $ultimatemember; - switch ( $hook ) { case 'download_install_info': @@ -53,7 +51,7 @@ class UM_ADDON_install_info { } function content() { - global $wpdb, $ultimatemember; + global $wpdb; if( !class_exists( 'Browser' ) ) require_once um_path . 'core/lib/browser.php'; @@ -257,7 +255,7 @@ foreach($result['avail_roles'] as $role => $count){ query->get_roles() as $role_id => $role ) { + foreach( UM()->roles()->get_roles() as $role_id => $role ) { echo $role." ({$role_id})\n"; } diff --git a/includes/admin/core/class-admin-menu.php b/includes/admin/core/class-admin-menu.php index d04e6ef3..7524c5c7 100644 --- a/includes/admin/core/class-admin-menu.php +++ b/includes/admin/core/class-admin-menu.php @@ -8,15 +8,10 @@ if ( ! defined( 'ABSPATH' ) ) exit; if ( ! class_exists( 'Admin_Menu' ) ) { class Admin_Menu { - var $about_tabs = array(); function __construct() { - $this->slug = 'ultimatemember'; - $this->about_tabs['about'] = 'About'; - $this->about_tabs['start'] = 'Getting Started'; - add_action('admin_menu', array(&$this, 'primary_admin_menu'), 0); add_action('admin_menu', array(&$this, 'secondary_menu_items'), 1000); add_action('admin_menu', array(&$this, 'extension_menu'), 9999); @@ -34,7 +29,6 @@ if ( ! class_exists( 'Admin_Menu' ) ) { // Add the dashboard pages $um_pages[] = 'toplevel_page_ultimatemember'; - $um_pages[] = 'admin_page_ultimatemember-about'; $um_pages[] = 'ultimate-member_page_um_options'; $um_pages[] = 'edit-um_form'; $um_pages[] = 'edit-um_role'; @@ -104,11 +98,6 @@ if ( ! class_exists( 'Admin_Menu' ) ) { add_action( 'load-' . $this->pagehook, array( &$this, 'on_load_page' ) ); add_submenu_page( $this->slug, __('Dashboard', $this->slug), __('Dashboard', $this->slug), 'manage_options', $this->slug, array(&$this, 'admin_page') ); - - foreach( $this->about_tabs as $k => $tab ) { - add_submenu_page( '_'. $k . '_um', sprintf(__('%s | Ultimate Member', $this->slug), $tab), sprintf(__('%s | Ultimate Member', $this->slug), $tab), 'manage_options', $this->slug . '-' . $k, array(&$this, 'admin_page') ); - } - } @@ -301,18 +290,10 @@ if ( ! class_exists( 'Admin_Menu' ) ) { admin()->templates_path . 'extensions.php'; - } else if ( $page == 'ultimatemember-about' ) { - - include_once UM()->admin()->templates_path . 'welcome/about.php'; - - } else if ( $page == 'ultimatemember-start' ) { - - include_once UM()->admin()->templates_path . 'welcome/start.php'; - } } diff --git a/includes/admin/core/class-admin-settings.php b/includes/admin/core/class-admin-settings.php index 1834705e..ccae94c4 100644 --- a/includes/admin/core/class-admin-settings.php +++ b/includes/admin/core/class-admin-settings.php @@ -1170,6 +1170,8 @@ if ( ! class_exists( 'Admin_Settings' ) ) { um_js_redirect( add_query_arg( array( 'page' => 'um_options', 'tab' => $current_tab ), admin_url( 'admin.php' ) ) ); } + echo '

Ultimate Member - Settings

'; + echo $this->generate_tabs_menu() . $this->generate_subtabs_menu( $current_tab ); do_action( "um_settings_page_before_" . $current_tab . "_" . $current_subtab . "_content" ); @@ -1182,6 +1184,14 @@ if ( ! class_exists( 'Admin_Settings' ) ) { } else { ?> + +
@@ -1197,6 +1207,8 @@ if ( ! class_exists( 'Admin_Settings' ) ) {
';*/ } diff --git a/includes/admin/templates/welcome/about.php b/includes/admin/templates/welcome/about.php deleted file mode 100644 index fc3a624e..00000000 --- a/includes/admin/templates/welcome/about.php +++ /dev/null @@ -1,69 +0,0 @@ - admin()->templates_path . 'welcome/about_header.php'; ?> - -
-

Create beautiful community websites with WordPress!

-
- -

We'd like to thank you for installing Ultimate Member and we hope you enjoy using the plugin on your site. We created Ultimate Member with the aim of building a lightweight and powerful plugin that makes it extremely easy to make community and membership sites with WordPress.

- -

We have big plans for Ultimate Member and we hope you will join us on our journey to creating the most popular community/membership plugin. The plugin has been built to be extremely easy to use but if you run into any issues you can search our documentation and if you can’t find an answer to your issue in our docs, then you can create a topic on the support forum. We also have an official GitHub repository where you can contribute directly to the plugin.

- -
-
- -
- -

Key Features

- -
- -
-

Front-end Registration & Login

-

Create unlimited, custom frontend registration & login forms easily with our drag-and-drop form builder.

-
- -
-

User Profiles

-

Instant front-end user profiles that look beautiful. Allow users to view/edit profile from frontend, view each other's profile and more.

-
- -
-

User Roles

-

Create unlimited, custom user roles and set up permissions for each user role easily.

-
- -
-

Profile Fields

-

Create unlimited profile fields from image and file upload to ratings, checkboxes, and more, plus support for conditional fields

-
- -
-

Member Directories

-

Create member directories with our directory creator and make them show the member levels you want.

-
- -
-

Content Restriction

-

Global and individual (per page/post) content restriction settings have been built to give you flexibility on what content should be visible, and who exactly can see it.

-
- -
-

Conditional Menus

-

Show different menu links to logged in users, logged out users, and individual member levels with our conditional menu feature.

-
- -
-

Mobile Adaptive

-

Ultimate Member has been built with a mobile adaptive approach meaning the front-end features have a different layout depending on the device size.

-
- -
-

Advanced Form Builder

-

Use our advanced drag and drop form builder to easily create unique registration, login and profiles with multiple-column support.

-
- -
- -
- - admin()->templates_path . 'welcome/about_footer.php'; ?> \ No newline at end of file diff --git a/includes/admin/templates/welcome/about_footer.php b/includes/admin/templates/welcome/about_footer.php deleted file mode 100644 index 826ba30e..00000000 --- a/includes/admin/templates/welcome/about_footer.php +++ /dev/null @@ -1,8 +0,0 @@ - -
- - Go to Plugin Dashboard → - -
- -
\ No newline at end of file diff --git a/includes/admin/templates/welcome/about_header.php b/includes/admin/templates/welcome/about_header.php deleted file mode 100644 index bb5296a6..00000000 --- a/includes/admin/templates/welcome/about_header.php +++ /dev/null @@ -1,43 +0,0 @@ - - -
- -

Welcome to Ultimate Member

- -
- -
Version
- -

- - - - - -

- - \ No newline at end of file diff --git a/includes/admin/templates/welcome/start.php b/includes/admin/templates/welcome/start.php deleted file mode 100644 index 775408ff..00000000 --- a/includes/admin/templates/welcome/start.php +++ /dev/null @@ -1,61 +0,0 @@ - admin()->templates_path . 'welcome/about_header.php'; ?> - -
-

Getting Started

-
- -

Ultimate Member has been designed to be as easy to use as possible and you shouldn’t run into any difficulties. However, the plugin contains lots of different elements so we have created the following page to help you get started with Ultimate Member.

- -
-
- -
- -
- -
-

Automatically installed pages

-

Upon activation the plugin will install 7 core pages. These pages are required for the plugin to function correctly and cannot be deleted.

-

-

-

-
- -
-

Getting started

-

The plugin has several different elements in the WordPress admin that allow you to customize your community/membership site:

-

-

-

-
- -
- -
- -
-

Need more help?

-
- -

If you have run into an issue with Ultimate Member, you should first have a look at our documentation and perform a search of the docs. If, after performing a search of the docs you can not find anything related to your issue/question then you can submit a support ticket.

- -

View Documentation

- -
-
- - admin()->templates_path . 'welcome/about_footer.php'; ?> \ No newline at end of file diff --git a/includes/class-init.php b/includes/class-init.php index 6925b0e8..bd268163 100644 --- a/includes/class-init.php +++ b/includes/class-init.php @@ -28,6 +28,7 @@ if ( ! class_exists( 'UM' ) ) { * @method UM_User_Tags_API User_Tags_API() * @method UM_Verified_Users_API Verified_Users_API() * @method UM_WooCommerce_API WooCommerce_API() + * @method UM_Terms_Conditions_API Terms_Conditions_API() * */ final class UM extends UM_Functions { @@ -184,8 +185,6 @@ if ( ! class_exists( 'UM' ) ) { add_action( 'plugins_loaded', array( &$this, 'init' ), 0 ); // init widgets add_action( 'widgets_init', array( &$this, 'widgets_init' ) ); - - add_action( 'admin_init', array( &$this, 'redirect_to_about' ) ); } } @@ -230,19 +229,6 @@ if ( ! class_exists( 'UM' ) ) { //run setup $this->setup()->run_setup(); - - if ( $version != ultimatemember_version ) { - update_option( 'um_need_show_about', true ); - } - } - - - function redirect_to_about() { - if ( get_option( 'um_need_show_about' ) ) { - delete_option( 'um_need_show_about' ); - wp_redirect( admin_url( 'admin.php?page=ultimatemember-about' ) ); - exit; - } } diff --git a/includes/core/um-actions-profile.php b/includes/core/um-actions-profile.php index 470072dd..f8504716 100644 --- a/includes/core/um-actions-profile.php +++ b/includes/core/um-actions-profile.php @@ -651,7 +651,7 @@ ?>
- +