mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- added JS hook 'um_member_directory_grid_masonry_attrs' for customizing Masonry grid settings;
- added conditional logic for 'Allow users to hide their profiles from directory' option; - fixed getting upgrades process for the User Locations extension;
This commit is contained in:
@@ -390,11 +390,14 @@ function um_build_template( directory, data ) {
|
||||
function UM_Member_Grid( container ) {
|
||||
if ( container.find( '.um-member' ).length ) {
|
||||
container.imagesLoaded( function() {
|
||||
var $grid = container.masonry({
|
||||
|
||||
var masonry_args = wp.hooks.applyFilters( 'um_member_directory_grid_masonry_attrs', {
|
||||
itemSelector: '.um-member',
|
||||
columnWidth: '.um-member',
|
||||
gutter: '.um-gutter-sizer'
|
||||
});
|
||||
}, container );
|
||||
|
||||
var $grid = container.masonry( masonry_args );
|
||||
|
||||
$grid.on( 'layoutComplete', function( event, laidOutItems ) {
|
||||
jQuery( document ).trigger( "um_grid_initialized", [ event, laidOutItems ] );
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -717,10 +717,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'tooltip' => __( 'Enable or disable a strong password rules on account page / change password tab', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'account_hide_in_directory',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Allow users to hide their profiles from directory', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Whether to allow users changing their profile visibility from member directory in account page.', 'ultimate-member' ),
|
||||
'id' => 'account_hide_in_directory',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Allow users to hide their profiles from directory', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Whether to allow users changing their profile visibility from member directory in account page.', 'ultimate-member' ),
|
||||
'conditional' => array( 'account_tab_privacy', '=', '1' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'account_hide_in_directory_default',
|
||||
|
||||
@@ -172,7 +172,7 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) {
|
||||
'title' => 'Unsplash',
|
||||
),
|
||||
'um-user-locations/um-user-locations.php' => array(
|
||||
'key' => 'user-locations',
|
||||
'key' => 'user_locations',
|
||||
'title' => 'User Locations',
|
||||
),
|
||||
'um-profile-tabs/um-profile-tabs.php' => array(
|
||||
|
||||
Reference in New Issue
Block a user