- removed "About" page;

- added tooltips to Profile menu;
- some fixes;
This commit is contained in:
nikitozzzzzzz
2017-07-28 13:33:14 +03:00
parent 1db8a9ae3a
commit a0eca5f350
11 changed files with 17 additions and 224 deletions
+1 -20
View File
@@ -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' ) ) {
<?php
} else if ( $page == 'ultimatemember-extensions' ) {
} elseif ( $page == 'ultimatemember-extensions' ) {
include_once UM()->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';
}
}
@@ -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 '<div id="um-settings-wrap" class="wrap"><h2>Ultimate Member - Settings</h2>';
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 { ?>
<!-- <?php /*if ( empty( $settings_struct['sections'][$current_subtab] ) )
$title = $this->settings_structure[$current_tab]['title'];
else
$title = $this->settings_structure[$current_tab]['sections'][$current_subtab]['title'];
*/?>
<h3><?php /*echo $title */?></h3>-->
<form method="post" action="" name="um-settings-form" id="um-settings-form">
<input type="hidden" value="save" name="um-settings-action" />
@@ -1197,6 +1207,8 @@ if ( ! class_exists( 'Admin_Settings' ) ) {
</form>
<?php }
/*echo '</div>';*/
}
@@ -1,69 +0,0 @@
<?php include_once UM()->admin()->templates_path . 'welcome/about_header.php'; ?>
<div class="changelog">
<h3>Create beautiful community websites with WordPress!</h3>
<div class="feature-section">
<p>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.</p>
<p>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 <a href="http://docs.ultimatemember.com/" target="_blank">documentation</a> and if you cant find an answer to your issue in our docs, then you can create a topic on the <a href="https://wordpress.org/support/plugin/ultimate-member" target="_blank">support forum</a>. We also have an official <a href="https://github.com/ultimatemember/ultimatemember" target="_blank">GitHub repository</a> where you can contribute directly to the plugin.</p>
</div>
</div>
<div class="changelog">
<h3>Key Features</h3>
<div class="feature-section under-the-hood three-col">
<div class="col">
<h4>Front-end Registration &amp; Login</h4>
<p>Create unlimited, custom frontend registration &amp; login forms easily with our drag-and-drop form builder.</p>
</div>
<div class="col">
<h4>User Profiles</h4>
<p>Instant front-end user profiles that look beautiful. Allow users to view/edit profile from frontend, view each other's profile and more.</p>
</div>
<div class="col">
<h4>User Roles</h4>
<p>Create unlimited, custom <a href="<?php echo admin_url('edit.php?post_type=um_role'); ?>">user roles</a> and set up permissions for each user role easily.</p>
</div>
<div class="col">
<h4>Profile Fields</h4>
<p>Create unlimited profile fields from image and file upload to ratings, checkboxes, and more, plus support for <strong><em>conditional fields</em></strong></p>
</div>
<div class="col">
<h4>Member Directories</h4>
<p>Create member directories with our <a href="<?php echo admin_url('edit.php?post_type=um_directory'); ?>">directory creator</a> and make them show the member levels you want.</p>
</div>
<div class="col">
<h4>Content Restriction</h4>
<p>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.</p>
</div>
<div class="col">
<h4>Conditional Menus</h4>
<p> Show different menu links to logged in users, logged out users, and individual member levels with our conditional menu feature.</p>
</div>
<div class="col">
<h4>Mobile Adaptive</h4>
<p>Ultimate Member has been built with a mobile adaptive approach meaning the front-end features have a different layout depending on the device size.</p>
</div>
<div class="col">
<h4>Advanced Form Builder</h4>
<p>Use our advanced drag and drop form builder to easily create unique registration, login and profiles with multiple-column support.</p>
</div>
</div>
</div>
<?php include_once UM()->admin()->templates_path . 'welcome/about_footer.php'; ?>
@@ -1,8 +0,0 @@
<div class="return-to-dashboard">
<a href="<?php echo admin_url('admin.php?page=ultimatemember'); ?>">Go to Plugin Dashboard &rarr;</a>
</div>
</div>
@@ -1,43 +0,0 @@
<?php
// Random tweet - must be kept to 102 chars to "fit"
$tweets = array(
'The easiest way to create powerful online communities and beautiful user profiles with #WordPress'
);
shuffle( $tweets );
?>
<div class="wrap about-wrap um-about-wrap">
<h1>Welcome to Ultimate Member</h1>
<div class="about-text"><?php _e('Thank you for installing! Ultimate Member is a powerful community and membership plugin that allows you to create beautiful community and membership sites with WordPress.','ultimate-member'); ?></div>
<div class="wp-badge um-badge">Version <?php echo ultimatemember_version; ?></div>
<p class="um-admin-notice ultimatemember-actions">
<a href="<?php echo admin_url('admin.php?page=um_options'); ?>" class="button button-primary"><?php _e('Settings','ultimate-member'); ?></a>
<a href="http://docs.ultimatemember.com/" class="button button-secondary" target="_blank"><?php _e('Docs','ultimate-member'); ?></a>
<a href="https://wordpress.org/support/plugin/ultimate-member" class="button button-secondary" target="_blank"><?php _e('Support','ultimate-member'); ?></a>
<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://ultimatemember.com/" data-text="<?php echo esc_attr( $tweets[0] ); ?>" data-via="umplugin" data-size="large">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
<h2 class="nav-tab-wrapper">
<?php foreach( $this->about_tabs as $k => $tab ) {
if ( isset( $_REQUEST['page'] ) && 'ultimatemember-'.$k == $_REQUEST['page'] ) {
$active = 'nav-tab-active';
} else {
$active = '';
}
?>
<a href="<?php echo admin_url('admin.php?page=ultimatemember-' . $k); ?>" class="nav-tab <?php echo $active; ?>"><?php echo $tab; ?></a>
<?php } ?>
</h2>
@@ -1,61 +0,0 @@
<?php include_once UM()->admin()->templates_path . 'welcome/about_header.php'; ?>
<div class="changelog">
<h3>Getting Started</h3>
<div class="feature-section">
<p>Ultimate Member has been designed to be as easy to use as possible and you shouldnt 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.</p>
</div>
</div>
<div class="changelog">
<div class="feature-section under-the-hood two-col">
<div class="col">
<h4>Automatically installed pages</h4>
<p>Upon activation the plugin will install 7 core pages. These pages are required for the plugin to function correctly and cannot be deleted.</p>
<p>
<ul>
<li><a href="<?php echo um_get_core_page('register'); ?>" target="_blank">Register</a></li>
<li><a href="<?php echo um_get_core_page('login'); ?>" target="_blank">Login</a></li>
<li><a href="<?php echo um_get_core_page('user'); ?>" target="_blank">User</a></li>
<li><a href="<?php echo um_get_core_page('members'); ?>" target="_blank">Members</a></li>
<li><a href="<?php echo um_get_core_page('account'); ?>" target="_blank">Account</a></li>
<li><a href="<?php echo admin_url('post.php?post=' . UM()->config()->permalinks['logout'] . '&action=edit'); ?>" target="_blank">Logout</a></li>
<li><a href="<?php echo um_get_core_page('password-reset'); ?>" target="_blank">Password Reset</a></li>
</ul>
</p>
</div>
<div class="col">
<h4>Getting started</h4>
<p>The plugin has several different elements in the WordPress admin that allow you to customize your community/membership site:</p>
<p>
<ul>
<li><a href="<?php echo admin_url('admin.php?page=ultimatemember'); ?>" target="_blank">Dashboard</a></li>
<li><a href="<?php echo admin_url('admin.php?page=um_options'); ?>" target="_blank">Settings</a></li>
<li><a href="<?php echo admin_url('edit.php?post_type=um_form'); ?>" target="_blank">Forms</a></li>
<li><a href="<?php echo admin_url('edit.php?post_type=um_role'); ?>" target="_blank">Member Levels</a></li>
<li><a href="<?php echo admin_url('edit.php?post_type=um_directory'); ?>" target="_blank">Member Directories</a></li>
</ul>
</p>
</div>
</div>
</div>
<div class="changelog feature-list">
<h2>Need more help?</h2>
<div class="feature-section">
<p>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 <a href="https://wordpress.org/support/plugin/ultimate-member" target="_blank">support ticket</a>.</p>
<p class="um-admin-notice" style="text-align:center"><a href="http://docs.ultimatemember.com/" target="_blank" class="button button-primary">View Documentation</a></p>
</div>
</div>
<?php include_once UM()->admin()->templates_path . 'welcome/about_footer.php'; ?>
+1 -15
View File
@@ -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;
}
}
+1 -1
View File
@@ -651,7 +651,7 @@
?>
<div class="um-profile-nav-item um-profile-nav-<?php echo $id; ?> <?php if ( !um_get_option('profile_menu_icons') ) { echo 'without-icon'; } ?> <?php if ( $id == $active_tab ) { echo 'active'; } ?>">
<a href="<?php echo $nav_link; ?>" title="<?php echo $tab['name']; ?>">
<a href="<?php echo $nav_link; ?>" class="um-tip-n" title="<?php echo $tab['name']; ?>" original-title="<?php echo $tab['name']; ?>">
<i class="<?php echo $tab['icon']; ?>"></i>