mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Update 1.2.93
This commit is contained in:
@@ -1,3 +1,31 @@
|
||||
.um-admin-notice {
|
||||
border-color: #3ba1da !important;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.um-admin-notice a.button-primary {
|
||||
background-color: #3ba1da !important;
|
||||
border-color: #3ba1da !important;
|
||||
}
|
||||
|
||||
.um-admin-notice a.button-primary:hover {
|
||||
background-color: #2295d8 !important;
|
||||
border-color: #2295d8 !important;
|
||||
}
|
||||
|
||||
.um-admin-notice a.button-secondary {opacity: 0.7}
|
||||
.um-admin-notice a.button-secondary:hover {opacity: 0.9}
|
||||
.um-admin-notice a {text-decoration: none;color: #3ba1da}
|
||||
.um-admin-notice a:hover {color: #44b0ec}
|
||||
|
||||
.um-filter {
|
||||
padding: 12px;
|
||||
border-color: #ddd !important;
|
||||
margin: 20px 0 0 0 !important;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
/*
|
||||
- General metabox styling
|
||||
*/
|
||||
|
||||
@@ -23,12 +23,15 @@
|
||||
background: #3ba1da url(../img/logo_small.png) no-repeat center 0px !important;
|
||||
}
|
||||
|
||||
.um-about-wrap a.button-primary {
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
padding: 0 20px !important;
|
||||
font-size: 14px;
|
||||
border: none;
|
||||
.um-about-wrap .ultimatemember-actions a.button-primary,
|
||||
.um-about-wrap .ultimatemember-actions a.button {
|
||||
vertical-align: top;
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
|
||||
.changelog a.button-primary {
|
||||
height: 40px;
|
||||
line-height: 38px;
|
||||
}
|
||||
|
||||
.um-about-wrap a {text-decoration: none}
|
||||
@@ -93,16 +96,6 @@ body.um-admin-modal-open {
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.um-admin a.button-primary,
|
||||
.um-admin input.button-primary {
|
||||
background: #3ba1da;
|
||||
box-shadow: none !important;
|
||||
border-radius: 2px;
|
||||
color: #fff;
|
||||
}
|
||||
.um-admin a.button-primary:hover,
|
||||
.um-admin input.button-primary:hover {background: #44b0ec;}
|
||||
|
||||
/*
|
||||
- Form Inputs
|
||||
*/
|
||||
|
||||
@@ -4,9 +4,16 @@
|
||||
*** @when role is saved
|
||||
***/
|
||||
function um_admin_delete_role_cache($post_id, $post){
|
||||
global $ultimatemember;
|
||||
if(get_post_type( $post_id ) == 'um_role'){
|
||||
$slug = $post->post_name;
|
||||
delete_option("um_cached_role_{$slug}");
|
||||
|
||||
// need to remove cache of all users
|
||||
$users = get_users( array( 'fields' => array( 'ID' ), 'meta_key' => 'role', 'meta_value' => $slug ) );
|
||||
foreach( $users as $user ) {
|
||||
$ultimatemember->user->remove_cache( $user->ID );
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action('save_post', 'um_admin_delete_role_cache', 1111, 2);
|
||||
|
||||
@@ -15,6 +15,52 @@ class UM_Admin_Dashboard {
|
||||
|
||||
add_action( 'admin_head', array( $this, 'menu_order_count' ) );
|
||||
|
||||
add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1000 );
|
||||
|
||||
add_action( 'wp_ajax_ultimatemember_rated', array( $this, 'ultimatemember_rated' ) );
|
||||
add_action( 'wp_ajax_nopriv_ultimatemember_rated', array( $this, 'ultimatemember_rated' ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the admin footer text on UM admin pages
|
||||
*/
|
||||
public function admin_footer_text( $footer_text ) {
|
||||
$current_screen = get_current_screen();
|
||||
|
||||
// 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';
|
||||
$um_pages[] = 'edit-um_directory';
|
||||
$um_pages[] = 'ultimate-member_page_ultimatemember-extensions';
|
||||
|
||||
if ( isset( $current_screen->id ) && in_array( $current_screen->id, $um_pages ) ) {
|
||||
// Change the footer text
|
||||
if ( ! get_option( 'um_admin_footer_text_rated' ) ) {
|
||||
|
||||
$footer_text = sprintf( __( 'If you like Ultimate Member please consider leaving a %s★★★★★%s review. It will help us to grow the plugin and make it more popular. Thank you.', 'ultimatemember' ), '<a href="https://wordpress.org/support/view/plugin-reviews/ultimate-member?filter=5#postform" target="_blank" class="um-admin-rating-link" data-rated="' . __( 'Thanks :)', 'ultimatemember' ) . '">', '</a>' );
|
||||
|
||||
$footer_text .= "<script type='text/javascript'>
|
||||
jQuery('a.um-admin-rating-link').click(function() {
|
||||
jQuery.post( '" . admin_url( 'admin-ajax.php', 'relative' ) . "', { action: 'ultimatemember_rated' } );
|
||||
jQuery(this).parent().text( jQuery(this).data( 'rated' ) );
|
||||
});
|
||||
</script>";
|
||||
}
|
||||
}
|
||||
|
||||
return $footer_text;
|
||||
}
|
||||
|
||||
/**
|
||||
* When user clicks the review link in backend
|
||||
*/
|
||||
function ultimatemember_rated() {
|
||||
update_option('um_admin_footer_text_rated', 1 );
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,6 +98,8 @@ class UM_Admin_Dashboard {
|
||||
public function menu_order_count() {
|
||||
global $menu, $submenu;
|
||||
|
||||
if ( !current_user_can( 'list_users' ) ) return;
|
||||
|
||||
$count = $this->get_pending_users_count();
|
||||
|
||||
foreach( $menu as $key => $menu_item ) {
|
||||
|
||||
@@ -172,7 +172,7 @@ class UM_Admin_Enqueue {
|
||||
|
||||
wp_register_style('um_admin_columns', um_url . 'admin/assets/css/um-admin-columns.css' );
|
||||
wp_enqueue_style('um_admin_columns');
|
||||
|
||||
|
||||
wp_register_style('um_admin_misc', um_url . 'admin/assets/css/um-admin-misc.css' );
|
||||
wp_enqueue_style('um_admin_misc');
|
||||
|
||||
@@ -277,6 +277,10 @@ class UM_Admin_Enqueue {
|
||||
wp_enqueue_style('um_admin_rtl');
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$this->load_global_css();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -83,6 +83,11 @@
|
||||
|
||||
<h2>Ultimate Member - Extensions</h2>
|
||||
|
||||
<div class="wp-filter um-admin-notice um-filter">
|
||||
<div class="alignleft"><strong>Core Extensions Bundle</strong> – Check out our extensions bundle which includes all extensions at a significant discount.</div>
|
||||
<div class="alignright"><a href="https://ultimatemember.com/core-extensions-bundle/" class="button button-primary" target="_blank">View our Extensions Bundle</a></div>
|
||||
</div>
|
||||
|
||||
<div class="wp-filter">
|
||||
<ul class="filter-links">
|
||||
<li><a href='?page=ultimatemember-extensions&filter=premium' class='<?php if ( !isset($_REQUEST['filter']) || isset( $_REQUEST['filter'] ) && $_REQUEST['filter'] == 'premium' ) { echo 'current'; } ?>'>Premium</a></li>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
<?php global $ultimatemember; include_once um_path . 'admin/templates/welcome/about_header.php'; ?>
|
||||
|
||||
<div class="changelog headline-feature dfw">
|
||||
<div class="changelog feature-list">
|
||||
<h2>Introducing Ultimate Member</h2>
|
||||
<div class="feature-section">
|
||||
<div class="feature-section headline-feature">
|
||||
|
||||
<h3><em>Create beautiful community websites with WordPress!</em></h3>
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="changelog feature-list">
|
||||
|
||||
<h2>Key Features</h2>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<hr />
|
||||
|
||||
|
||||
<div class="return-to-dashboard">
|
||||
|
||||
<a href="<?php echo admin_url('admin.php?page=ultimatemember'); ?>">Go to Plugin Dashboard →</a>
|
||||
|
||||
@@ -1,10 +1,28 @@
|
||||
<?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">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="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.','ultimatemember'); ?></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','ultimatemember'); ?></a>
|
||||
<a href="https://ultimatemember.com/docs/" class="button button-secondary" target="_blank"><?php _e('Docs','ultimatemember'); ?></a>
|
||||
<a href="https://ultimatemember.com/forums/" class="button button-secondary" target="_blank"><?php _e('Support','ultimatemember'); ?></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">
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
<?php global $ultimatemember; include_once um_path . 'admin/templates/welcome/about_header.php'; ?>
|
||||
|
||||
<div class="changelog headline-feature dfw">
|
||||
<div class="changelog feature-list">
|
||||
<h2>Getting Started</h2>
|
||||
<div class="feature-section">
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="changelog feature-list">
|
||||
|
||||
@@ -50,15 +48,13 @@
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="changelog headline-feature dfw">
|
||||
<div class="changelog feature-list">
|
||||
<h2>Need more help?</h2>
|
||||
<div class="feature-section">
|
||||
|
||||
<p>If you want to learn more about Ultimate Member you’ll need to register on our website where you will be able to interact and get help from other Ultimate Member users via our community forum and also be able to access other useful resources including the plugin’s documentation.</p>
|
||||
|
||||
<p style="text-align:center"><a href="https://ultimatemember.com/forums/" target="_blank" class="button button-primary">Join the Ultimate Member Community</a></p>
|
||||
<p class="um-admin-notice" style="text-align:center"><a href="https://ultimatemember.com/forums/" target="_blank" class="button button-primary">Join the Ultimate Member Community</a></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user