mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-20 07:04:06 +09:00
Improved load time
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.um-admin.post-type-um_form .manage-column.column-id {width: 40px}
|
||||
.um-admin.post-type-um_form .manage-column.column-id {width: 60px}
|
||||
.um-admin.post-type-um_form .manage-column.column-mode {width: 100px}
|
||||
.um-admin.post-type-um_form .manage-column.column-title {width: 200px}
|
||||
.um-admin.post-type-um_form .manage-column.column-shortcode {width: 200px}
|
||||
@@ -32,7 +32,7 @@
|
||||
.um-admin.post-type-um_directory td.column-shortcode,
|
||||
.um-admin.post-type-um_directory td.column-id,
|
||||
.um-admin.post-type-um_role td.column-count
|
||||
{color: #aaa;font-size: 14px;}
|
||||
{font-size: 14px;}
|
||||
|
||||
.um-admin.users-php td.column-um_actions {padding-top: 12px}
|
||||
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
/*
|
||||
- Columns
|
||||
- Welcome
|
||||
*/
|
||||
|
||||
.um-badge {
|
||||
color: #fff;
|
||||
background: none !important;
|
||||
background: #3ba1da url(../img/logo_small.png) no-repeat center 0px !important;
|
||||
}
|
||||
|
||||
/*
|
||||
- General
|
||||
*/
|
||||
|
||||
body.um-admin-modal-open {
|
||||
@@ -8,9 +18,6 @@ body.um-admin-modal-open {
|
||||
|
||||
.um-admin #major-publishing-actions{background-color: #fff !important;border-top:0}
|
||||
|
||||
.um-admin .postbox h3 {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.um-admin .postbox h3 i {
|
||||
font-size: 1.3em !important;
|
||||
vertical-align: middle !important;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
@@ -1299,6 +1299,9 @@
|
||||
* @return void
|
||||
*/
|
||||
public function _options_page() {
|
||||
|
||||
$um_admin = new UM_Admin_API();
|
||||
|
||||
$this->import_export->in_field();
|
||||
|
||||
if ( $this->args['menu_type'] == 'submenu' ) {
|
||||
@@ -1307,7 +1310,11 @@
|
||||
|
||||
add_menu_page( __('Ultimate Member', $this->slug), __('Ultimate Member', $this->slug), 'manage_options', $this->slug, array(&$this, 'admin_page'), 'dashicons-admin-users', '50.78578');
|
||||
|
||||
add_submenu_page( '_welcome_to_um', __('Welcome to Ultimate Member!', $this->slug), __('Welcome to Ultimate Member!', $this->slug), 'manage_options', $this->slug . '-welcome', array(&$this, 'admin_page') );
|
||||
foreach( $um_admin->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') );
|
||||
|
||||
}
|
||||
|
||||
add_submenu_page( $this->slug, __('Dashboard', $this->slug), __('Dashboard', $this->slug), 'manage_options', $this->slug, array(&$this, 'admin_page') );
|
||||
|
||||
@@ -1321,11 +1328,11 @@
|
||||
|
||||
add_submenu_page( $this->slug, __('Forms', $this->slug), __('Forms', $this->slug), 'manage_options', 'edit.php?post_type=um_form', '', '' );
|
||||
|
||||
add_submenu_page( $this->slug, __('Roles', $this->slug), __('Roles', $this->slug), 'manage_options', 'edit.php?post_type=um_role', '', '' );
|
||||
add_submenu_page( $this->slug, __('Member Levels', $this->slug), __('Member Levels', $this->slug), 'manage_options', 'edit.php?post_type=um_role', '', '' );
|
||||
|
||||
add_submenu_page( $this->slug, __('Member Directories', $this->slug), __('Member Directories', $this->slug), 'manage_options', 'edit.php?post_type=um_directory', '', '' );
|
||||
|
||||
add_submenu_page( $this->slug, __('Members', $this->slug), __('Members', $this->slug), 'manage_options', 'users.php', '', '' );
|
||||
|
||||
add_submenu_page( $this->slug, __('Directories', $this->slug), __('Directories', $this->slug), 'manage_options', 'edit.php?post_type=um_directory', '', '' );
|
||||
|
||||
} else {
|
||||
$this->page = add_menu_page(
|
||||
@@ -4311,11 +4318,26 @@
|
||||
|
||||
public function admin_page(){
|
||||
|
||||
$um_admin = new UM_Admin_API();
|
||||
|
||||
$page = $_REQUEST['page'];
|
||||
|
||||
if ( $page == 'ultimatemember')
|
||||
|
||||
if ( $page == 'ultimatemember' ) {
|
||||
include_once um_path . 'admin/templates/dashboard.php';
|
||||
}
|
||||
|
||||
if ( strstr( $page, 'ultimatemember-' ) ) {
|
||||
|
||||
$template = str_replace('ultimatemember-','',$page);
|
||||
$file = um_path . 'admin/templates/'. $template . '.php';
|
||||
|
||||
if ( file_exists( $file ) ){
|
||||
include_once um_path . 'admin/templates/'. $template . '.php';
|
||||
} else {
|
||||
echo '<h4>' . __('Please create a team.php template in admin templates.','ultimatemember') . '</h4>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ class UM_Admin_Columns {
|
||||
$admin = new UM_Admin_Metabox();
|
||||
|
||||
$new_columns['cb'] = '<input type="checkbox" />';
|
||||
$new_columns['id'] = __('ID');
|
||||
$new_columns['id'] = __('ID') . $admin->_tooltip( 'Unique ID for each form' );
|
||||
$new_columns['title'] = __('Title');
|
||||
$new_columns['mode'] = __('Type');
|
||||
$new_columns['shortcode'] = __('Shortcode') . $admin->_tooltip( 'Copy this shortcode to any post/page to display the relevant form' );
|
||||
$new_columns['mode'] = __('Type') . $admin->_tooltip( 'This is the type of the form' );
|
||||
$new_columns['shortcode'] = __('Shortcode') . $admin->_tooltip( 'Use this shortcode to display the form' );
|
||||
$new_columns['impressions'] = __('Impressions') . $admin->_tooltip( 'The total number of times this form has been viewed' );
|
||||
$new_columns['conversions'] = __('Conversions') . $admin->_tooltip( 'The total number of conversions. e.g. Successful sign-ups' );
|
||||
$new_columns['date'] = __('Date');
|
||||
@@ -33,6 +33,23 @@ class UM_Admin_Columns {
|
||||
return $new_columns;
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Custom columns for Directory
|
||||
***/
|
||||
function manage_edit_um_directory_columns($columns) {
|
||||
|
||||
$admin = new UM_Admin_Metabox();
|
||||
|
||||
$new_columns['cb'] = '<input type="checkbox" />';
|
||||
$new_columns['id'] = __('ID') . $admin->_tooltip( 'Unique ID for each form' );
|
||||
$new_columns['title'] = __('Title');
|
||||
$new_columns['shortcode'] = __('Shortcode') . $admin->_tooltip( 'Use this shortcode to display the member directory' );
|
||||
$new_columns['date'] = __('Date');
|
||||
|
||||
return $new_columns;
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Display cusom columns for Form
|
||||
@@ -75,18 +92,6 @@ class UM_Admin_Columns {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Custom columns for Directory
|
||||
***/
|
||||
function manage_edit_um_directory_columns($columns) {
|
||||
$new_columns['cb'] = '<input type="checkbox" />';
|
||||
$new_columns['id'] = __('ID');
|
||||
$new_columns['title'] = __('Title');
|
||||
$new_columns['shortcode'] = __('Shortcode');
|
||||
$new_columns['date'] = __('Date');
|
||||
return $new_columns;
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Display cusom columns for Directory
|
||||
|
||||
@@ -12,10 +12,25 @@ class UM_Admin_Enqueue {
|
||||
|
||||
add_filter('admin_body_class', array(&$this, 'admin_body_class'), 9 );
|
||||
|
||||
add_filter( 'enter_title_here', array(&$this, 'enter_title_here') );
|
||||
add_filter('enter_title_here', array(&$this, 'enter_title_here') );
|
||||
|
||||
add_filter('admin_footer_text', array(&$this, 'admin_footer_text') );
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Show footer text
|
||||
***/
|
||||
function admin_footer_text() {
|
||||
$copyright = sprintf(__('Thank you for creating with <a href="http://ultimatemember.com">Ultimate Member</a> and <a href="https://wordpress.org">WordPress</a>.','ultimatemember'));
|
||||
|
||||
if ( um_get_option('admin_load_time') == 1 ) {
|
||||
$copyright .= '<br />' . sprintf(__('%1$s queries made in %2$s seconds','ultimatemember'), get_num_queries(), timer_stop(0) );
|
||||
}
|
||||
|
||||
return '<span id="footer-thankyou">' . $copyright . '</span>';
|
||||
}
|
||||
|
||||
/***
|
||||
*** @enter title placeholder
|
||||
***/
|
||||
@@ -42,8 +57,8 @@ class UM_Admin_Enqueue {
|
||||
|
||||
if ( strstr($screen_id, 'um_form') ) $highlighted_id = 3;
|
||||
if ( strstr($screen_id, 'um_role') ) $highlighted_id = 4;
|
||||
if ( strstr($screen_id, 'um_directory') ) $highlighted_id = 6;
|
||||
if ( strstr($screen_id, 'user') || strstr($screen_id, 'profile') ) $highlighted_id = 5;
|
||||
if ( strstr($screen_id, 'um_directory') ) $highlighted_id = 5;
|
||||
if ( strstr($screen_id, 'user') || strstr($screen_id, 'profile') ) $highlighted_id = 6;
|
||||
|
||||
if ( isset($highlighted_id) ) { ?>
|
||||
|
||||
|
||||
@@ -5,9 +5,6 @@ class UM_Admin_Notices {
|
||||
function __construct() {
|
||||
|
||||
add_action('admin_notices', array(&$this, 'admin_notices'));
|
||||
|
||||
add_action('admin_notices', array(&$this, 'um_admin_notices'));
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -47,21 +44,4 @@ class UM_Admin_Notices {
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @For custom-styled notices
|
||||
***/
|
||||
function um_admin_notices() {
|
||||
|
||||
$notices = get_option('um_admin_notices');
|
||||
if ( $notices ) {
|
||||
|
||||
foreach($notices as $notice){
|
||||
echo "<div class='um-admin-notice'>
|
||||
<div>$notice</div>
|
||||
</div>";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
'google_api_key' => '', // Must be defined to add google fonts to the typography module
|
||||
'async_typography' => true, // Use a asynchronous font on the front end or font string
|
||||
'admin_bar' => true, // Show the panel pages on the admin bar
|
||||
'admin_bar' => false, // Show the panel pages on the admin bar
|
||||
'global_variable' => '', // Set a different name for your global variable other than the opt_name
|
||||
'dev_mode' => false, // Show the time the page took to load, etc
|
||||
'customizer' => false, // Enable basic customizer support
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
<div class="wrap about-wrap">
|
||||
|
||||
<?php include_once um_path . 'admin/templates/about_header.php'; ?>
|
||||
|
||||
<div class="changelog headline-feature">
|
||||
<h2>Introducing Twenty Fifteen</h2>
|
||||
<div class="featured-image">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="feature-section">
|
||||
<div class="col">
|
||||
<h3>Our newest default theme, Twenty Fifteen, is a blog-focused theme designed for clarity.</h3>
|
||||
<p>Twenty Fifteen has flawless language support, with help from <a href="https://www.google.com/get/noto/">Google’s Noto font family</a>.</p>
|
||||
<p>The straightforward typography is readable on any screen size.</p>
|
||||
<p>Your content always takes center stage, whether viewed on a phone, tablet, laptop, or desktop computer.</p>
|
||||
</div>
|
||||
<div class="col">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="changelog headline-feature dfw">
|
||||
<h2>Distraction-free writing</h2>
|
||||
<div class="feature-section">
|
||||
<div class="dfw-container">
|
||||
|
||||
</div>
|
||||
<h3><em>Just write.</em></h3>
|
||||
<p>Sometimes, you just need to concentrate on putting your thoughts into words. Try turning on <strong>distraction-free writing mode</strong>. When you start typing, all the distractions will fade away, letting you focus solely on your writing. All your editing tools instantly return when you need them.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="changelog feature-list finer-points">
|
||||
<h2>The Finer Points</h2>
|
||||
|
||||
<div class="feature-section col two-col">
|
||||
<div>
|
||||
<h4>Choose a language</h4>
|
||||
<p>Right now, WordPress 4.1 is already translated into <span id="translations-count">40</span> languages, with more always in progress. You can switch to any translation on the <a href="http://localhost/wp-admin/options-general.php">General Settings</a> screen.</p>
|
||||
</div>
|
||||
|
||||
<div class="last-feature">
|
||||
<h4>Vine embeds</h4>
|
||||
<p>Embedding videos from Vine is as simple as pasting a URL onto its own line in a post. See the <a href="http://codex.wordpress.org/Embeds">full list</a> of supported embeds.</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Log out everywhere</h4>
|
||||
<p>If you’ve ever worried you forgot to sign out from a shared computer, you can now go to <a href="http://localhost/wp-admin/profile.php">your profile</a> and log out everywhere.</p>
|
||||
</div>
|
||||
|
||||
<div class="last-feature">
|
||||
<h4>Plugin recommendations</h4>
|
||||
<p>The <a href="http://localhost/wp-admin/plugin-install.php?tab=recommended">plugin installer</a> suggests plugins for you to try. Recommendations are based on the plugins you and other users have installed.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="changelog feature-list">
|
||||
<h2>Under the Hood</h3>
|
||||
|
||||
<div class="feature-section col two-col">
|
||||
<div>
|
||||
<h4>Complex Queries</h4>
|
||||
<p>Metadata, date, and term queries now support advanced conditional logic, like nested clauses and multiple operators — <code>A AND ( B OR C )</code>.</p>
|
||||
|
||||
<h4>Customizer API</h4>
|
||||
<p>Expanded JavaScript APIs in the customizer enable a new media experience as well as dynamic and contextual controls, sections, and panels.</p>
|
||||
</div>
|
||||
<div class="last-feature">
|
||||
<h4><code><title></code> tags in themes</h4>
|
||||
<p><code>add_theme_support( 'title-tag' )</code> tells WordPress to handle the complexities of document titles.</p>
|
||||
|
||||
<h4>Developer Reference</h4>
|
||||
<p>Continued improvements to inline code documentation have made the <a href="https://developer.wordpress.org/reference/">developer reference</a> more complete than ever.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="return-to-dashboard">
|
||||
<a href="<?php echo admin_url('admin.php?page=ultimatemember'); ?>">Go to Plugin Dashboard →</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
<h1>Welcome to Ultimate Member</h1>
|
||||
|
||||
<div class="about-text">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.</div>
|
||||
|
||||
<div class="wp-badge um-badge">Version <?php echo ULTIMATEMEMBER_VERSION; ?></div>
|
||||
|
||||
<h2 class="nav-tab-wrapper">
|
||||
|
||||
<?php foreach( $um_admin->about_tabs as $k => $tab ) {
|
||||
|
||||
if ( $k == $template ) {
|
||||
$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>
|
||||
@@ -0,0 +1,99 @@
|
||||
<div class="wrap about-wrap">
|
||||
|
||||
<?php include_once um_path . 'admin/templates/about_header.php'; ?>
|
||||
|
||||
<div class="changelog headline-feature">
|
||||
<h2>Introducing Twenty Fifteen</h2>
|
||||
<div class="featured-image">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="feature-section">
|
||||
<div class="col">
|
||||
<h3>Our newest default theme, Twenty Fifteen, is a blog-focused theme designed for clarity.</h3>
|
||||
<p>Twenty Fifteen has flawless language support, with help from <a href="https://www.google.com/get/noto/">Google’s Noto font family</a>.</p>
|
||||
<p>The straightforward typography is readable on any screen size.</p>
|
||||
<p>Your content always takes center stage, whether viewed on a phone, tablet, laptop, or desktop computer.</p>
|
||||
</div>
|
||||
<div class="col">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="changelog headline-feature dfw">
|
||||
<h2>Distraction-free writing</h2>
|
||||
<div class="feature-section">
|
||||
<div class="dfw-container">
|
||||
|
||||
</div>
|
||||
<h3><em>Just write.</em></h3>
|
||||
<p>Sometimes, you just need to concentrate on putting your thoughts into words. Try turning on <strong>distraction-free writing mode</strong>. When you start typing, all the distractions will fade away, letting you focus solely on your writing. All your editing tools instantly return when you need them.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="changelog feature-list finer-points">
|
||||
<h2>The Finer Points</h2>
|
||||
|
||||
<div class="feature-section col two-col">
|
||||
<div>
|
||||
<h4>Choose a language</h4>
|
||||
<p>Right now, WordPress 4.1 is already translated into <span id="translations-count">40</span> languages, with more always in progress. You can switch to any translation on the <a href="http://localhost/wp-admin/options-general.php">General Settings</a> screen.</p>
|
||||
</div>
|
||||
|
||||
<div class="last-feature">
|
||||
<h4>Vine embeds</h4>
|
||||
<p>Embedding videos from Vine is as simple as pasting a URL onto its own line in a post. See the <a href="http://codex.wordpress.org/Embeds">full list</a> of supported embeds.</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Log out everywhere</h4>
|
||||
<p>If you’ve ever worried you forgot to sign out from a shared computer, you can now go to <a href="http://localhost/wp-admin/profile.php">your profile</a> and log out everywhere.</p>
|
||||
</div>
|
||||
|
||||
<div class="last-feature">
|
||||
<h4>Plugin recommendations</h4>
|
||||
<p>The <a href="http://localhost/wp-admin/plugin-install.php?tab=recommended">plugin installer</a> suggests plugins for you to try. Recommendations are based on the plugins you and other users have installed.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="changelog feature-list">
|
||||
<h2>Under the Hood</h3>
|
||||
|
||||
<div class="feature-section col two-col">
|
||||
<div>
|
||||
<h4>Complex Queries</h4>
|
||||
<p>Metadata, date, and term queries now support advanced conditional logic, like nested clauses and multiple operators — <code>A AND ( B OR C )</code>.</p>
|
||||
|
||||
<h4>Customizer API</h4>
|
||||
<p>Expanded JavaScript APIs in the customizer enable a new media experience as well as dynamic and contextual controls, sections, and panels.</p>
|
||||
</div>
|
||||
<div class="last-feature">
|
||||
<h4><code><title></code> tags in themes</h4>
|
||||
<p><code>add_theme_support( 'title-tag' )</code> tells WordPress to handle the complexities of document titles.</p>
|
||||
|
||||
<h4>Developer Reference</h4>
|
||||
<p>Continued improvements to inline code documentation have made the <a href="https://developer.wordpress.org/reference/">developer reference</a> more complete than ever.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="return-to-dashboard">
|
||||
<a href="<?php echo admin_url('admin.php?page=ultimatemember'); ?>">Go to Plugin Dashboard →</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -8,6 +8,17 @@ class UM_Admin_API {
|
||||
|
||||
add_action('admin_init', array(&$this, 'admin_init'), 0);
|
||||
|
||||
if ( !class_exists( 'ReduxFramework' ) && file_exists( um_path . 'admin/core/lib/ReduxFramework/ReduxCore/framework.php' ) ) {
|
||||
require_once( um_path . 'admin/core/lib/ReduxFramework/ReduxCore/framework.php' );
|
||||
}
|
||||
if ( file_exists ( um_path . 'admin/core/um-admin-redux.php' ) ) {
|
||||
require_once( um_path . 'admin/core/um-admin-redux.php' );
|
||||
}
|
||||
|
||||
|
||||
$this->about_tabs['about'] = 'About';
|
||||
$this->about_tabs['start'] = 'Getting Started';
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
Reference in New Issue
Block a user