- upgrade Extensions page;

This commit is contained in:
Nikita Sinelnikov
2023-01-03 01:11:26 +02:00
parent ce5adf050b
commit 4984acb3bc
46 changed files with 268 additions and 122 deletions
+152 -69
View File
@@ -1,97 +1,180 @@
#um-extensions-wrap a.plugin-image,
#um-extensions-wrap a.plugin-image img {
max-width: 100%;
display: block;
#um-extensions-wrap #the-list {
margin: 0;
width: 100%;
display: grid;
grid-template-rows: auto 1fr;
grid-template-columns: repeat(3, 1fr);
grid-gap: 10px;
grid-auto-rows: minmax(max-content, auto);
-ms-grid-template-rows: auto 1fr;
-ms-grid-template-columns: repeat(3, 1fr);
-ms-grid-gap: 10px;
-ms-grid-auto-rows: minmax(max-content, auto);
align-items: center;
}
#um-extensions-wrap .plugin-card {
width: calc( 33% - 8px );
clear: none !important;
margin-right: 8px !important;
margin-left: 0 !important;
padding: 20px;
display: flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: stretch;
width: 100%;
margin: 0;
}
#um-extensions-wrap .plugin-image img {
display: inline-block;
width: 70px;
margin: auto;
/* padding-top: 40px; */
border-radius: 500px;
#um-extensions-wrap .plugin-image-wrapper {
color: #fff;
height: 70px;
padding: 5px;
background: #fff;
box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
margin-top: 20px;
width: 70px;
margin: 0 auto;
border-radius: 60px;
box-shadow: 0 2px 9px rgb(50 50 93 / 21%);
border: solid 4px #fff;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
#um-extensions-wrap .plugin-image-wrapper a {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background-color: #7856ff;
}
#um-extensions-wrap a.plugin-image.svg-image {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
flex-wrap: nowrap;
}
#um_bbpress_image {
background-color: #fff !important;
filter: none !important;
width: 70px !important;
}
#um_mycred_image {
background-color: #fff;
}
#um_groups_image,
#um_profile-tabs_image,
#um_user-tags_image,
#um_friends_image,
#um_user-reviews_image,
#um_verified-users_image,
#um_private-content_image,
#um_online-users_image {
width: 36px !important;
}
#um_notices_image,
#um_social-activity_image,
#um_profile-completeness_image,
#um_private-messages_image,
#um_user-photos_image,
#um_terms-conditions_image {
width: 29px !important;
}
#um_social-login_image {
width: 28px !important;
}
#um_real-time-notifications_image,
#um_user-notes_image {
width: 26px !important;
}
#um_followers_image,
#um_user-locations_image {
width: 32px !important;
}
#um_user-bookmarks_image {
width: 23px !important;
}
#um-extensions-wrap a.plugin-image.svg-image img {
filter: invert(1);
background-color: transparent;
width: 38px;
height: auto;
}
#um-extensions-wrap a.plugin-image,
#um-extensions-wrap a.plugin-image img {
display: block;
}
#um-extensions-wrap .plugin-image:not(.svg-image) img {
width: 70px;
margin: 0;
height: 70px;
padding: 0;
}
#um-extensions-wrap .plugin-card-top {
margin: 0;
padding: 20px 0 0 0;
width: 100%;
min-height: 100px;
}
#um-extensions-wrap .plugin-card-top h3 {
text-align: center;
margin: 0 0 20px 0;
padding: 0;
}
#um-extensions-wrap .plugin-card-top .desc {
text-align: center;
margin: 0 !important;
padding: 10px 0 0 0 !important;
padding: 0 !important;
}
#um-extensions-wrap .action-links {
margin: 0 !important;
padding: 20px 0 0 0 !important;
position: static;
#um-extensions-wrap .plugin-action-links {
padding: 20px 0 0 0;
width: 100%;
}
#um-extensions-wrap .action-links ul {
margin: 0 0 10px 0 !important;
width: 100%;
}
#um-extensions-wrap .action-links ul li {
display: inline;
float: left;
clear: none;
line-height: 28px;
margin: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: baseline;
flex-wrap: nowrap;
}
@media (max-width: 992px) {
#um-extensions-wrap .plugin-card {
width: calc( 50% - 8px );
}
}
@media (max-width: 782px) {
#um-extensions-wrap .plugin-card {
width: calc( 100% - 8px );
}
}
#um-extensions-wrap .action-links ul li:last-child {
float: right;
}
#um-extensions-wrap .plugin-card-top {
min-height: 140px;
}
@media screen and (max-width: 782px) {
#um-extensions-wrap .plugin-card {
width: 100%;
}
@media (max-width: 1152px) {
#um-extensions-wrap .plugin-card-top {
min-height: 120px;
}
}
#um-extensions-wrap .plugin-card .name,
#um-extensions-wrap .plugin-card .desc {
margin-left: 0;
@media (max-width: 992px) {
#um-extensions-wrap #the-list {
grid-template-columns: repeat(2, 1fr);
-ms-grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 782px) {
#um-extensions-wrap #the-list {
grid-template-columns: repeat(1, 1fr);
-ms-grid-template-columns: repeat(1, 1fr);
}
}
@media screen and (max-width: 782px) {
#um-extensions-wrap .plugin-card-top {
min-height: 80px;
}
}
#um-metaboxes-general h1 sup {
@@ -209,4 +292,4 @@
color: #777 !important;
font-size: 22px !important;
}
.um-admin-dash-share a:hover {color: #0085ba !important}
.um-admin-dash-share a:hover {color: #0085ba !important}
@@ -50,6 +50,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
$this->lock_registration();
$this->extensions_page();
// removed for now to avoid the bad reviews
//$this->reviews_notice();
@@ -239,6 +241,39 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
), 10 );
}
/**
* Checking if the "Membership - Anyone can register" WordPress general setting is active
*/
public function extensions_page() {
global $pagenow;
if ( isset( $pagenow ) && 'admin.php' === $pagenow && isset( $_GET['page'] ) && 'ultimatemember-extensions' === $_GET['page'] ) {
ob_start();
?>
<p>
<?php _e( '<strong>All Access Pass</strong> Get access to all Ultimate Member extensions at a significant discount with our All Access Pass.', 'ultimate-member' ) ?>
</p>
<p>
<a href="https://ultimatemember.com/pricing/" class="button button-primary" target="_blank">
<?php _e( 'View Pricing', 'ultimate-member' ) ?>
</a>
</p>
<?php
$message = ob_get_clean();
$this->add_notice(
'extensions_all_access',
array(
'class' => 'info',
'message' => $message,
'dismissible' => false,
),
10
);
}
}
/**
* To store plugin languages
+60 -53
View File
@@ -2,72 +2,84 @@
$premium['bbpress'] = array(
'url' => 'https://ultimatemember.com/extensions/bbpress/',
'img' => 'bbpress.svg',
'name' => 'bbPress',
'desc' => 'With the bbPress extension you can integrate Ultimate Member with bbPress',
);
$premium['profile-completeness'] = array(
'url' => 'https://ultimatemember.com/extensions/profile-completeness/',
'img' => 'profile-completeness.svg',
'name' => 'Profile Completeness',
'desc' => 'Encourage or force users to complete their profile on your site',
);
$premium['verified-users'] = array(
'url' => 'https://ultimatemember.com/extensions/verified-users/',
'img' => 'verified-users.svg',
'name' => 'Verified Users',
'desc' => 'Add a user verficiation system to your site so user accounts can be verified',
);
$premium['friends'] = array(
'url' => 'https://ultimatemember.com/extensions/friends/',
'img' => 'friends.svg',
'name' => 'Friends',
'desc' => 'Increase user interaction on your site by allowing users to become friends',
);
$premium['woocommerce'] = array(
'url' => 'https://ultimatemember.com/extensions/woocommerce/',
'img' => 'woocommerce.png',
'name' => 'WooCommerce',
'desc' => 'Integrates the popular e-commerce plugin WooCommerce with Ultimate Member',
);
$premium['notices'] = array(
'url' => 'https://ultimatemember.com/extensions/notices/',
'img' => 'notices.svg',
'name' => 'Notices',
'desc' => 'Alert users to important information using conditional notices',
);
$premium['followers'] = array(
'url' => 'https://ultimatemember.com/extensions/followers/',
'img' => 'followers.svg',
'name' => 'Followers',
'desc' => 'Increase user interaction on your site by allowing users to follow each other',
);
$premium['mycred'] = array(
'url' => 'https://ultimatemember.com/extensions/mycred/',
'img' => 'mycred.png',
'name' => 'myCRED',
'desc' => 'With the myCRED extension you can integrate Ultimate Member with myCRED',
);
$premium['private-messages'] = array(
'url' => 'https://ultimatemember.com/extensions/private-messages/',
'img' => 'private-messages.svg',
'name' => 'Private Messages',
'desc' => 'Add a private messaging system to your site & allow users to message each other',
);
$premium['social-activity'] = array(
'url' => 'https://ultimatemember.com/extensions/social-activity/',
'img' => 'social-activity.svg',
'name' => 'Social Activity',
'desc' => 'Let users create public wall posts & see the activity of other users',
);
$premium['social-login'] = array(
'url' => 'https://ultimatemember.com/extensions/social-login/',
'img' => 'social-login.svg',
'name' => 'Social Login',
'desc' => 'Let users register & login to your site via Facebook, Twitter, G+, LinkedIn, and more',
);
$premium['user-tags'] = array(
'url' => 'https://ultimatemember.com/extensions/user-tags/',
'img' => 'user-tags.svg',
'name' => 'User Tags',
'desc' => 'With this extension you can add a user tag system to your website',
);
@@ -75,6 +87,7 @@ $premium['user-tags'] = array(
$premium['mailchimp'] = array(
'url' => 'https://ultimatemember.com/extensions/mailchimp/',
'img' => 'mailchimp.png',
'name' => 'MailChimp',
'desc' => 'Allow users to subscribe to your mailchimp lists when they signup on your site',
);
@@ -82,24 +95,28 @@ $premium['mailchimp'] = array(
$premium['user-reviews'] = array(
'url' => 'https://ultimatemember.com/extensions/user-reviews/',
'img' => 'user-reviews.svg',
'name' => 'User Reviews',
'desc' => 'Allow users to rate & review each other using a 5 star rate/review system',
);
$premium['real-time-notifications'] = array(
'url' => 'https://ultimatemember.com/extensions/real-time-notifications/',
'img' => 'real-time-notifications.svg',
'name' => 'Real-time Notifications',
'desc' => 'Add a notifications system to your site so users can receive real-time notifications',
);
$premium['private-content'] = array(
'url' => 'https://ultimatemember.com/extensions/private-content/',
'img' => 'private-content.svg',
'name' => 'Private Content',
'desc' => 'Display private content to logged in users that only they can access',
);
$premium['groups'] = array(
'url' => 'https://ultimatemember.com/extensions/groups/',
'img' => 'groups.svg',
'name' => 'Groups',
'desc' => 'Allow users to create and join groups around shared topics, interests etc.',
);
@@ -107,65 +124,76 @@ $premium['groups'] = array(
$premium['user-photos'] = array(
'url' => 'https://ultimatemember.com/extensions/user-photos/',
'name' => 'User Photos',
'img' => 'user-photos.svg',
'desc' => 'Allow users to upload photos to their profile',
);
$premium['user-bookmarks'] = array(
'url' => 'https://ultimatemember.com/extensions/user-bookmarks/',
'img' => 'user-bookmarks.svg',
'name' => 'User Bookmarks',
'desc' => 'Allow users to bookmark content from your website',
);
$premium['unsplash'] = array(
'url' => 'https://ultimatemember.com/extensions/unsplash/',
'img' => 'unsplash.png',
'name' => 'Unsplash',
'desc' => 'Allow users to select a profile cover photo from <a href="https://unsplash.com/" target="_blank">Unsplash</a> from their profile',
);
$premium['user-locations'] = array(
'url' => 'https://ultimatemember.com/extensions/user-locations/',
'img' => 'user-locations.svg',
'name' => 'User Locations',
'desc' => 'Using the Google Maps API, display users on a map on the member directory page and allow users to add their location via their profile',
);
$premium['user-notes'] = array(
'url' => 'https://ultimatemember.com/extensions/user-notes/',
'img' => 'user-notes.svg',
'name' => 'User Notes',
'desc' => 'Allow users to create public and private notes from their profile',
);
$premium['profile-tabs'] = array(
'url' => 'https://ultimatemember.com/extensions/profile-tabs/',
'img' => 'profile-tabs.svg',
'name' => 'Profile Tabs',
'desc' => 'Add custom tabs to profiles',
);
$free['jobboardwp'] = array(
'url' => 'https://wordpress.org/plugins/um-jobboardwp',
'img' => 'jobboardwp.png',
'name' => 'JobBoardWP',
'desc' => 'Integrates Ultimate Member with the job board plugin <a href="https://wordpress.org/plugins/jobboardwp" target="_blank">JobBoardWP</a>',
);
$free['forumwp'] = array(
'url' => 'https://ultimatemember.com/extensions/forumwp/',
'img' => 'forumwp.png',
'name' => 'ForumWP',
'desc' => 'Integrates Ultimate Member with the forum plugin <a href="https://forumwpplugin.com" target="_blank">ForumWP</a>',
);
$free['online-users'] = array(
'url' => 'https://ultimatemember.com/extensions/online-users/',
'img' => 'online-users.svg',
'name' => 'Online Users',
'desc' => 'Display online users on your site so users can see who is online'
);
$free['google-recaptcha'] = array(
'url' => 'https://ultimatemember.com/extensions/google-recaptcha/',
'img' => 'google-recaptcha.png',
'name' => 'Google reCAPTCHA',
'desc' => 'Stop bots on your registration & login forms with Google reCAPTCHA',
);
$free['terms-conditions'] = array(
'url' => 'https://ultimatemember.com/extensions/terms-conditions/',
'url' => 'https://ultimatemember.com/extensions/terms-conditions/',
'img' => 'terms-conditions.svg',
'name' => 'Terms & Conditions',
'desc' => 'Add terms & conditions to your registration form',
); ?>
@@ -174,17 +202,6 @@ $free['terms-conditions'] = array(
<h2>Ultimate Member - Extensions</h2>
<div class="wp-filter um-admin-notice um-filter">
<div class="alignleft">
<?php _e( '<strong>All Access Pass</strong> Get access to all Ultimate Member extensions at a significant discount with our All Access Pass.', 'ultimate-member' ) ?>
</div>
<div class="alignright">
<a href="https://ultimatemember.com/pricing/" class="button button-primary" target="_blank">
<?php _e( 'View Pricing', 'ultimate-member' ) ?>
</a>
</div>
</div>
<div class="wp-filter">
<ul class="filter-links">
<li>
@@ -206,31 +223,26 @@ $free['terms-conditions'] = array(
foreach ( $premium as $key => $info ) { ?>
<div class="plugin-card">
<a href="<?php echo esc_url( $info['url'] ); ?>" class="plugin-image">
<img src="<?php echo esc_url( um_url . 'assets/img/extensions/' . $key . '.png' ); ?>" alt="<?php echo esc_attr( $info['name'] ) ?>" />
</a>
<div class="plugin-image-wrapper">
<a href="<?php echo esc_url( $info['url'] ); ?>" class="plugin-image<?php if ( false !== strpos( $info['img'], '.svg' ) ) { ?> svg-image<?php } ?>">
<img id="<?php echo esc_attr( 'um_' . $key . '_image' ); ?>" src="<?php echo esc_url( um_url . 'assets/img/extensions/' . $info['img'] ); ?>" alt="<?php echo esc_attr( $info['name'] ) ?>" />
</a>
</div>
<div class="plugin-card-top">
<h3><a href="<?php echo esc_url( $info['url'] ); ?>"><?php echo $info['name']; ?></a></h3>
<h3><a href="<?php echo esc_url( $info['url'] ); ?>"><?php echo esc_html( $info['name'] ); ?></a></h3>
<div class="desc column-description">
<?php echo $info['desc']; ?>
</div>
<div class="action-links">
<ul class="plugin-action-buttons">
<li>
<a class="install-now button" href="<?php echo esc_url( $info['url'] ); ?>">
<?php _e( 'Get this Add on', 'ultimate-member' ) ?>
</a>
</li>
<li>
<a href="<?php echo esc_url( $info['url'] ); ?>">
<?php _e( 'More Details', 'ultimate-member' ) ?>
</a>
</li>
</ul>
<?php echo wp_kses( $info['desc'], UM()->get_allowed_html( 'admin_notice' ) ); ?>
</div>
</div>
<div class="plugin-action-links">
<a class="button" href="<?php echo esc_url( $info['url'] ); ?>">
<?php esc_html_e( 'Get this Add on', 'ultimate-member' ) ?>
</a>
<a href="<?php echo esc_url( $info['url'] ); ?>">
<?php esc_html_e( 'More Details', 'ultimate-member' ) ?>
</a>
</div>
</div>
<?php }
@@ -240,31 +252,26 @@ $free['terms-conditions'] = array(
foreach ( $free as $key => $info ) { ?>
<div class="plugin-card">
<a href="<?php echo esc_url( $info['url'] ); ?>" class="plugin-image">
<img src="<?php echo esc_url( um_url . 'assets/img/extensions/' . $key . '.png' ); ?>" alt="<?php echo esc_attr( $info['name'] ) ?>" />
</a>
<div class="plugin-image-wrapper">
<a href="<?php echo esc_url( $info['url'] ); ?>" class="plugin-image<?php if ( false !== strpos( $info['img'], '.svg' ) ) { ?> svg-image<?php } ?>">
<img id="<?php echo esc_attr( 'um_' . $key . '_image' ); ?>" src="<?php echo esc_url( um_url . 'assets/img/extensions/' . $info['img'] ); ?>" alt="<?php echo esc_attr( $info['name'] ) ?>" />
</a>
</div>
<div class="plugin-card-top">
<h3><a href="<?php echo esc_url( $info['url'] ); ?>"><?php echo $info['name']; ?></a></h3>
<h3><a href="<?php echo esc_url( $info['url'] ); ?>"><?php echo esc_html( $info['name'] ); ?></a></h3>
<div class="desc column-description">
<?php echo $info['desc']; ?>
</div>
<div class="action-links">
<ul class="plugin-action-buttons">
<li>
<a class="install-now button" href="<?php echo esc_url( $info['url'] ); ?>">
<?php _e( 'Get this Add on', 'ultimate-member' ) ?>
</a>
</li>
<li>
<a href="<?php echo $info['url']; ?>">
<?php _e( 'More Details', 'ultimate-member' ) ?>
</a>
</li>
</ul>
<?php echo wp_kses( $info['desc'], UM()->get_allowed_html( 'admin_notice' ) ); ?>
</div>
</div>
<div class="plugin-action-links">
<a class="button" href="<?php echo esc_url( $info['url'] ); ?>">
<?php esc_html_e( 'Get this Add on', 'ultimate-member' ) ?>
</a>
<a href="<?php echo esc_url( $info['url'] ); ?>">
<?php esc_html_e( 'More Details', 'ultimate-member' ) ?>
</a>
</div>
</div>
<?php }
@@ -273,4 +280,4 @@ $free['terms-conditions'] = array(
</div>
</div>
</div>
<div class="um-admin-clear"></div>
<div class="um-admin-clear"></div>