- 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:
nikitasinelnikov
2021-01-07 02:01:17 +02:00
parent 1eabb9430a
commit e1954d3d8e
4 changed files with 12 additions and 8 deletions
+5 -2
View File
@@ -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 ] );
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -4
View File
@@ -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',
+1 -1
View File
@@ -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(