Version Description
Download this release
Release Info
Developer | ultimatemember |
Plugin | ![]() |
Version | 1.3.18 |
Comparing to | |
See all releases |
Code changes from version 1.3.17 to 1.3.18
- admin/templates/extensions.php +7 -0
- assets/js/um-scrollto.js +210 -0
- assets/js/um.min.js +2 -0
- core/um-enqueue.php +12 -0
- core/um-fields.php +2 -0
- core/um-query.php +1 -0
- core/um-short-functions.php +1 -0
- index.php +1 -1
- readme.txt +9 -2
admin/templates/extensions.php
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
$premium['woocommerce'] = array(
|
4 |
'url' => 'https://ultimatemember.com/extensions/woocommerce/',
|
5 |
'image' => 'https://ultimatemember.com/wp-content/uploads/2015/05/woocommerce-01-copy.png',
|
1 |
<?php
|
2 |
|
3 |
+
$premium['social-activity'] = array(
|
4 |
+
'url' => 'https://ultimatemember.com/extensions/social-activity/',
|
5 |
+
'image' => 'https://ultimatemember.com/wp-content/uploads/2015/08/socialactivity1.png',
|
6 |
+
'name' => 'Social Activity',
|
7 |
+
'desc' => 'Increase engagement and allow users to interact with each other by adding an activity system to your site.',
|
8 |
+
);
|
9 |
+
|
10 |
$premium['woocommerce'] = array(
|
11 |
'url' => 'https://ultimatemember.com/extensions/woocommerce/',
|
12 |
'image' => 'https://ultimatemember.com/wp-content/uploads/2015/05/woocommerce-01-copy.png',
|
assets/js/um-scrollto.js
ADDED
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery.scrollTo
|
3 |
+
* Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
|
4 |
+
* Licensed under MIT
|
5 |
+
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
|
6 |
+
* @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery
|
7 |
+
* @author Ariel Flesler
|
8 |
+
* @version 2.1.1
|
9 |
+
*/
|
10 |
+
;(function(factory) {
|
11 |
+
'use strict';
|
12 |
+
if (typeof define === 'function' && define.amd) {
|
13 |
+
// AMD
|
14 |
+
define(['jquery'], factory);
|
15 |
+
} else if (typeof module !== 'undefined' && module.exports) {
|
16 |
+
// CommonJS
|
17 |
+
module.exports = factory(require('jquery'));
|
18 |
+
} else {
|
19 |
+
// Global
|
20 |
+
factory(jQuery);
|
21 |
+
}
|
22 |
+
})(function($) {
|
23 |
+
'use strict';
|
24 |
+
|
25 |
+
var $scrollTo = $.scrollTo = function(target, duration, settings) {
|
26 |
+
return $(window).scrollTo(target, duration, settings);
|
27 |
+
};
|
28 |
+
|
29 |
+
$scrollTo.defaults = {
|
30 |
+
axis:'xy',
|
31 |
+
duration: 0,
|
32 |
+
limit:true
|
33 |
+
};
|
34 |
+
|
35 |
+
function isWin(elem) {
|
36 |
+
return !elem.nodeName ||
|
37 |
+
$.inArray(elem.nodeName.toLowerCase(), ['iframe','#document','html','body']) !== -1;
|
38 |
+
}
|
39 |
+
|
40 |
+
$.fn.scrollTo = function(target, duration, settings) {
|
41 |
+
if (typeof duration === 'object') {
|
42 |
+
settings = duration;
|
43 |
+
duration = 0;
|
44 |
+
}
|
45 |
+
if (typeof settings === 'function') {
|
46 |
+
settings = { onAfter:settings };
|
47 |
+
}
|
48 |
+
if (target === 'max') {
|
49 |
+
target = 9e9;
|
50 |
+
}
|
51 |
+
|
52 |
+
settings = $.extend({}, $scrollTo.defaults, settings);
|
53 |
+
// Speed is still recognized for backwards compatibility
|
54 |
+
duration = duration || settings.duration;
|
55 |
+
// Make sure the settings are given right
|
56 |
+
var queue = settings.queue && settings.axis.length > 1;
|
57 |
+
if (queue) {
|
58 |
+
// Let's keep the overall duration
|
59 |
+
duration /= 2;
|
60 |
+
}
|
61 |
+
settings.offset = both(settings.offset);
|
62 |
+
settings.over = both(settings.over);
|
63 |
+
|
64 |
+
return this.each(function() {
|
65 |
+
// Null target yields nothing, just like jQuery does
|
66 |
+
if (target === null) return;
|
67 |
+
|
68 |
+
var win = isWin(this),
|
69 |
+
elem = win ? this.contentWindow || window : this,
|
70 |
+
$elem = $(elem),
|
71 |
+
targ = target,
|
72 |
+
attr = {},
|
73 |
+
toff;
|
74 |
+
|
75 |
+
switch (typeof targ) {
|
76 |
+
// A number will pass the regex
|
77 |
+
case 'number':
|
78 |
+
case 'string':
|
79 |
+
if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) {
|
80 |
+
targ = both(targ);
|
81 |
+
// We are done
|
82 |
+
break;
|
83 |
+
}
|
84 |
+
// Relative/Absolute selector
|
85 |
+
targ = win ? $(targ) : $(targ, elem);
|
86 |
+
if (!targ.length) return;
|
87 |
+
/* falls through */
|
88 |
+
case 'object':
|
89 |
+
// DOMElement / jQuery
|
90 |
+
if (targ.is || targ.style) {
|
91 |
+
// Get the real position of the target
|
92 |
+
toff = (targ = $(targ)).offset();
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset;
|
97 |
+
|
98 |
+
$.each(settings.axis.split(''), function(i, axis) {
|
99 |
+
var Pos = axis === 'x' ? 'Left' : 'Top',
|
100 |
+
pos = Pos.toLowerCase(),
|
101 |
+
key = 'scroll' + Pos,
|
102 |
+
prev = $elem[key](),
|
103 |
+
max = $scrollTo.max(elem, axis);
|
104 |
+
|
105 |
+
if (toff) {// jQuery / DOMElement
|
106 |
+
attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]);
|
107 |
+
|
108 |
+
// If it's a dom element, reduce the margin
|
109 |
+
if (settings.margin) {
|
110 |
+
attr[key] -= parseInt(targ.css('margin'+Pos), 10) || 0;
|
111 |
+
attr[key] -= parseInt(targ.css('border'+Pos+'Width'), 10) || 0;
|
112 |
+
}
|
113 |
+
|
114 |
+
attr[key] += offset[pos] || 0;
|
115 |
+
|
116 |
+
if (settings.over[pos]) {
|
117 |
+
// Scroll to a fraction of its width/height
|
118 |
+
attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos];
|
119 |
+
}
|
120 |
+
} else {
|
121 |
+
var val = targ[pos];
|
122 |
+
// Handle percentage values
|
123 |
+
attr[key] = val.slice && val.slice(-1) === '%' ?
|
124 |
+
parseFloat(val) / 100 * max
|
125 |
+
: val;
|
126 |
+
}
|
127 |
+
|
128 |
+
// Number or 'number'
|
129 |
+
if (settings.limit && /^\d+$/.test(attr[key])) {
|
130 |
+
// Check the limits
|
131 |
+
attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max);
|
132 |
+
}
|
133 |
+
|
134 |
+
// Don't waste time animating, if there's no need.
|
135 |
+
if (!i && settings.axis.length > 1) {
|
136 |
+
if (prev === attr[key]) {
|
137 |
+
// No animation needed
|
138 |
+
attr = {};
|
139 |
+
} else if (queue) {
|
140 |
+
// Intermediate animation
|
141 |
+
animate(settings.onAfterFirst);
|
142 |
+
// Don't animate this axis again in the next iteration.
|
143 |
+
attr = {};
|
144 |
+
}
|
145 |
+
}
|
146 |
+
});
|
147 |
+
|
148 |
+
animate(settings.onAfter);
|
149 |
+
|
150 |
+
function animate(callback) {
|
151 |
+
var opts = $.extend({}, settings, {
|
152 |
+
// The queue setting conflicts with animate()
|
153 |
+
// Force it to always be true
|
154 |
+
queue: true,
|
155 |
+
duration: duration,
|
156 |
+
complete: callback && function() {
|
157 |
+
callback.call(elem, targ, settings);
|
158 |
+
}
|
159 |
+
});
|
160 |
+
$elem.animate(attr, opts);
|
161 |
+
}
|
162 |
+
});
|
163 |
+
};
|
164 |
+
|
165 |
+
// Max scrolling position, works on quirks mode
|
166 |
+
// It only fails (not too badly) on IE, quirks mode.
|
167 |
+
$scrollTo.max = function(elem, axis) {
|
168 |
+
var Dim = axis === 'x' ? 'Width' : 'Height',
|
169 |
+
scroll = 'scroll'+Dim;
|
170 |
+
|
171 |
+
if (!isWin(elem))
|
172 |
+
return elem[scroll] - $(elem)[Dim.toLowerCase()]();
|
173 |
+
|
174 |
+
var size = 'client' + Dim,
|
175 |
+
doc = elem.ownerDocument || elem.document,
|
176 |
+
html = doc.documentElement,
|
177 |
+
body = doc.body;
|
178 |
+
|
179 |
+
return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]);
|
180 |
+
};
|
181 |
+
|
182 |
+
function both(val) {
|
183 |
+
return $.isFunction(val) || $.isPlainObject(val) ? val : { top:val, left:val };
|
184 |
+
}
|
185 |
+
|
186 |
+
// Add special hooks so that window scroll properties can be animated
|
187 |
+
$.Tween.propHooks.scrollLeft =
|
188 |
+
$.Tween.propHooks.scrollTop = {
|
189 |
+
get: function(t) {
|
190 |
+
return $(t.elem)[t.prop]();
|
191 |
+
},
|
192 |
+
set: function(t) {
|
193 |
+
var curr = this.get(t);
|
194 |
+
// If interrupt is true and user scrolled, stop animating
|
195 |
+
if (t.options.interrupt && t._last && t._last !== curr) {
|
196 |
+
return $(t.elem).stop();
|
197 |
+
}
|
198 |
+
var next = Math.round(t.now);
|
199 |
+
// Don't waste CPU
|
200 |
+
// Browsers don't render floating point scroll
|
201 |
+
if (curr !== next) {
|
202 |
+
$(t.elem)[t.prop](next);
|
203 |
+
t._last = this.get(t);
|
204 |
+
}
|
205 |
+
}
|
206 |
+
};
|
207 |
+
|
208 |
+
// AMD requirement
|
209 |
+
return $scrollTo;
|
210 |
+
});
|
assets/js/um.min.js
CHANGED
@@ -111,6 +111,8 @@ this.data("tipsy");if(f)f[a]();return this}a=b.extend({},b.fn.tipsy.defaults,a);
|
|
111 |
b.data(this,"tipsy-pointee"),c;if(!(c=!a)){a:{for(;a=a.parentNode;)if(a==document){a=true;break a}a=false}c=!a}c&&b(this).remove()})};b.fn.tipsy.elementOptions=function(a,c){return b.metadata?b.extend({},c,b(a).metadata()):c};b.fn.tipsy.autoNS=function(){return b(this).offset().top>b(document).scrollTop()+b(window).height()/2?"s":"n"};b.fn.tipsy.autoWE=function(){return b(this).offset().left>b(document).scrollLeft()+b(window).width()/2?"e":"w"};b.fn.tipsy.autoBounds=function(a,c){return function(){var d=
|
112 |
{ns:c[0],ew:c.length>1?c[1]:false},h=b(document).scrollTop()+a,f=b(document).scrollLeft()+a,g=b(this);if(g.offset().top<h)d.ns="n";if(g.offset().left<f)d.ew="w";if(b(window).width()+b(document).scrollLeft()-g.offset().left<a)d.ew="e";if(b(window).height()+b(document).scrollTop()-g.offset().top<a)d.ns="s";return d.ns+(d.ew?d.ew:"")}}})(jQuery);
|
113 |
|
|
|
|
|
114 |
var live_field;var live_value;function um_conditional(){jQuery('.um-field.um-is-conditional').each(function(){for(var i = 0;i < 5;i++){var action0 = jQuery(this).data('cond-'+i+'-action');var field0 = jQuery(this).data('cond-'+i+'-field');var operator0 = jQuery(this).data('cond-'+i+'-operator');var value0 = jQuery(this).data('cond-'+i+'-value');if(action0 == 'show' && field0 == live_field){if(operator0 == 'empty'){if(!live_value||live_value == ''){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'not empty'){if(live_value&&live_value!= ''){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'equals to'){if(value0 == live_value){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'not equals'){if(jQuery.isNumeric(value0) && parseInt(live_value)!= parseInt(value0) && live_value){jQuery(this).fadeIn()}else if(!jQuery.isNumeric(value0) && value0!= live_value){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'greater than'){if(jQuery.isNumeric(value0) && parseInt(live_value)>parseInt(value0)){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'less than'){if(jQuery.isNumeric(value0) && parseInt(live_value) < parseInt(value0) && live_value){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'contains'){if(live_value && live_value.indexOf(value0)>= 0){jQuery(this).fadeIn()}else{jQuery(this).hide()}}}if(action0 == 'hide' && field0 == live_field){if(operator0 == 'empty'){if(!live_value||live_value == ''){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'not empty'){if(live_value&&live_value!= ''){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'equals to'){if(value0 == live_value){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'not equals'){if(jQuery.isNumeric(value0) && parseInt(live_value)!= parseInt(value0) && live_value){jQuery(this).hide()}else if(!jQuery.isNumeric(value0) && value0!= live_value){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'greater than'){if(jQuery.isNumeric(value0) && parseInt(live_value)>parseInt(value0)){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'less than'){if(jQuery.isNumeric(value0) && parseInt(live_value) < parseInt(value0) && live_value){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'contains'){if(live_value && live_value.indexOf(value0)>= 0){jQuery(this).hide()}else{jQuery(this).fadeIn()}}}}})}function UM_hide_menus(){menu = jQuery('.um-dropdown');menu.parents('div').find('a').removeClass('active');menu.hide()}function UM_domenus(){jQuery('.um-dropdown').each(function(){var menu = jQuery(this);var element = jQuery(this).attr('data-element');var position = jQuery(this).attr('data-position');jQuery(element).addClass('um-trigger-menu-on-'+menu.attr('data-trigger'));if(jQuery(window).width() <= 1200 && element == 'div.um-profile-edit'){position = 'lc'}if(position == 'lc'){if(200>jQuery(element).find('img').width()){left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)+((jQuery(element).find('img').width() - 200) / 2)}else{left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)}top_ = parseInt(jQuery(element).find('a').css('top'));if(top_){top_p = jQuery(element).find('img').height()+4+top_;left_gap = 4}else{top_p = jQuery(element).find('img').height()+4;left_gap = 0}if(top_p == 4 && element == 'div.um-cover'){top_p = jQuery(element).height() / 2+(menu.height() / 2)}else if(top_p == 4){top_p = jQuery(element).height()+20}gap_right = jQuery(element).width()+17;menu.css({'top':0,'width':200,'left':'auto','right':gap_right+'px','text-align':'center'});menu.find('.um-dropdown-arr').find('i').removeClass().addClass('um-icon-arrow-right-b');menu.find('.um-dropdown-arr').css({'top':'4px','left':'auto','right':'-17px'})}if(position == 'bc'){if(200>jQuery(element).find('img').width()){left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)+((jQuery(element).find('img').width() - 200) / 2)}else{left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)}top_ = parseInt(jQuery(element).find('a').css('top'));if(top_){top_p = jQuery(element).find('img').height()+4+top_;left_gap = 4}else{top_p = jQuery(element).find('img').height()+4;left_gap = 0}if(top_p == 4 && element == 'div.um-cover'){top_p = jQuery(element).height() / 2+(menu.height() / 2)}else if(top_p == 4){top_p = jQuery(element).height()+20}menu.css({'top':top_p,'width':200,'left':left_p+left_gap,'right':'auto','text-align':'center'});menu.find('.um-dropdown-arr').find('i').removeClass().addClass('um-icon-arrow-up-b');menu.find('.um-dropdown-arr').css({'top':'-17px','left':(menu.width() / 2) - 12,'right':'auto'})}})}function um_responsive(){jQuery('.um').each(function(){element_width = jQuery(this).width();if(element_width <= 340){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob340')}else if(element_width <= 500){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob500')}else if(element_width <= 800){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob800')}else if(element_width <= 960){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob960')}else if(element_width>960){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960')}if(jQuery('.um-account-nav').length>0 && jQuery('.um-account-side').is(':visible') && jQuery('.um-account-tab:visible').length == 0){jQuery('.um-account-side li a.current').trigger('click')}jQuery(this).css('opacity',1)});jQuery('.um-cover,.um-member-cover').each(function(){var elem = jQuery(this);var ratio = elem.data('ratio');var width = elem.width();var ratios = ratio.split(':');calcHeight = Math.round(width / ratios[0])+'px';elem.height(calcHeight);elem.find('.um-cover-add').height(calcHeight)});jQuery('.um-members').each(function(){UM_Member_Grid(jQuery(this))});UM_domenus()}function UM_Member_Grid(container){container.masonry({itemSelector:'.um-member',columnWidth:'.um-member',gutter:'.um-gutter-sizer'})}function initImageUpload_UM(trigger){if(trigger.data('upload_help_text')){upload_help_text = '<span class="help">'+trigger.data('upload_help_text')+'</span>'}else{upload_help_text = ''}if(trigger.data('icon')){icon = '<span class="icon"><i class="'+trigger.data('icon')+'"></i></span>'}else{icon = ''}if(trigger.data('upload_text')){upload_text = '<span class="str">'+trigger.data('upload_text')+'</span>'}else{upload_text = ''}trigger.uploadFile({url:um_scripts.imageupload,method:"POST",multiple:false,formData:{key:trigger.data('key'),set_id:trigger.data('set_id'),set_mode:trigger.data('set_mode')},fileName:trigger.data('key'),allowedTypes:trigger.data('allowed_types'),maxFileSize:trigger.data('max_size'),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:trigger.data('max_size_error'),extErrorStr:trigger.data('extension_error'),maxFileCountErrorStr:trigger.data('max_files_error'),maxFileCount:1,showDelete:false,showAbort:false,showDone:false,showFileCounter:false,showStatusAfterSuccess:true,onSubmit:function(files){trigger.parents('.um-modal-body').find('.um-error-block').remove()},onSuccess:function(files,data,xhr){trigger.selectedFiles = 0;data = jQuery.parseJSON(data);if(data.error && data.error!= ''){trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);um_modal_responsive()}else{jQuery.each(data,function(key,value){var img_id = trigger.parents('.um-modal-body').find('.um-single-image-preview img');var img_id_h = trigger.parents('.um-modal-body').find('.um-single-image-preview');img_id.attr("src",value);img_id.load(function(){trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);img_id_h.show(0);um_modal_responsive()})})}}})}function initFileUpload_UM(trigger){if(trigger.data('upload_help_text')){upload_help_text = '<span class="help">'+trigger.data('upload_help_text')+'</span>'}else{upload_help_text = ''}if(trigger.data('icon')){icon = '<span class="icon"><i class="'+trigger.data('icon')+'"></i></span>'}else{icon = ''}if(trigger.data('upload_text')){upload_text = '<span class="str">'+trigger.data('upload_text')+'</span>'}else{upload_text = ''}trigger.uploadFile({url:um_scripts.fileupload,method:"POST",multiple:false,formData:{key:trigger.data('key'),set_id:trigger.data('set_id'),set_mode:trigger.data('set_mode')},fileName:trigger.data('key'),allowedTypes:trigger.data('allowed_types'),maxFileSize:trigger.data('max_size'),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:trigger.data('max_size_error'),extErrorStr:trigger.data('extension_error'),maxFileCountErrorStr:trigger.data('max_files_error'),maxFileCount:1,showDelete:false,showAbort:false,showDone:false,showFileCounter:false,showStatusAfterSuccess:true,onSubmit:function(files){trigger.parents('.um-modal-body').find('.um-error-block').remove()},onSuccess:function(files,data,xhr){trigger.selectedFiles = 0;data = jQuery.parseJSON(data);if(data.error && data.error!= ''){trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);um_modal_responsive()}else{jQuery.each(data,function(key,value){trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);trigger.parents('.um-modal-body').find('.um-single-file-preview').show(0);if(key == 'icon'){trigger.parents('.um-modal-body').find('.um-single-fileinfo i').removeClass().addClass(value)}else if(key == 'icon_bg'){trigger.parents('.um-modal-body').find('.um-single-fileinfo span.icon').css({'background-color':value})}else if(key == 'filename'){trigger.parents('.um-modal-body').find('.um-single-fileinfo span.filename').html(value)}else{trigger.parents('.um-modal-body').find('.um-single-fileinfo a').attr('href',value)}});um_modal_responsive()}}})}function initCrop_UM(){var target_img = jQuery('.um-modal:visible .um-single-image-preview img');var target_img_parent = jQuery('.um-modal:visible .um-single-image-preview');var crop_data = target_img.parent().attr('data-crop');var min_width = target_img.parent().attr('data-min_width');var min_height = target_img.parent().attr('data-min_height');var ratio = target_img.parent().attr('data-ratio');if(jQuery('.um-modal').find('#um_upload_single').attr('data-ratio')){var ratio = jQuery('.um-modal').find('#um_upload_single').attr('data-ratio');var ratio_split = ratio.split(':');var ratio = ratio_split[0]}if(target_img.length){if(target_img.attr('src')!= ''){var max_height = jQuery(window).height() -(jQuery('.um-modal-footer a').height()+20) - 50 -(jQuery('.um-modal-header:visible').height());target_img.css({'height':'auto'});target_img_parent.css({'height':'auto'});if(jQuery(window).height() <= 400){target_img_parent.css({'height':max_height+'px','max-height':max_height+'px'});target_img.css({'height':'auto'})}else{target_img.css({'height':'auto','max-height':max_height+'px'});target_img_parent.css({'height':target_img.height(),'max-height':max_height+'px'})}if(crop_data == 'square'){var opts ={minWidth:min_width,minHeight:min_height,dragCrop:false,aspectRatio:1.0,zoomable:false,rotatable:false,dashed:false,done:function(data){target_img.parent().attr('data-coord',Math.round(data.x)+','+Math.round(data.y)+','+Math.round(data.width)+','+Math.round(data.height))}}}else if(crop_data == 'cover'){var opts ={minWidth:min_width,minHeight:Math.round(min_width / ratio),dragCrop:false,aspectRatio:ratio,zoomable:false,rotatable:false,dashed:false,done:function(data){target_img.parent().attr('data-coord',Math.round(data.x)+','+Math.round(data.y)+','+Math.round(data.width)+','+Math.round(data.height))}}}else if(crop_data == 'user'){var opts ={minWidth:min_width,minHeight:min_height,dragCrop:true,aspectRatio:"auto",zoomable:false,rotatable:false,dashed:false,done:function(data){target_img.parent().attr('data-coord',Math.round(data.x)+','+Math.round(data.y)+','+Math.round(data.width)+','+Math.round(data.height))}}}if(crop_data!= 0){target_img.cropper(opts)}}}}function um_new_modal(id,size,isPhoto,source){var modal = jQuery('body').find('.um-modal-overlay');if(modal.length == 0){jQuery('.tipsy').hide();UM_hide_menus();jQuery('body,html,textarea').css("overflow","hidden");jQuery(document).bind("touchmove",function(e){e.preventDefault()});jQuery('.um-modal').on('touchmove',function(e){e.stopPropagation()});if(isPhoto){jQuery('body').append('<div class="um-modal-overlay" ></div><div class="um-modal is-photo" ></div>')}else{jQuery('body').append('<div class="um-modal-overlay" ></div><div class="um-modal no-photo" ></div>')}jQuery('#'+id).prependTo('.um-modal');if(isPhoto){jQuery('.um-modal').find('.um-modal-photo').html('<img />');var photo_ = jQuery('.um-modal-photo img');var photo_maxw = jQuery(window).width() - 60;var photo_maxh = jQuery(window).height() -(jQuery(window).height() * .25);photo_.attr("src",source);photo_.load(function(){jQuery('#'+id).show();jQuery('.um-modal').show();photo_.css({'opacity':0});photo_.css({'max-width':photo_maxw});photo_.css({'max-height':photo_maxh});jQuery('.um-modal').css({'width':photo_.width(),'margin-left':'-'+photo_.width() / 2+'px'});photo_.animate({'opacity':1},1000);um_modal_responsive()})}else{jQuery('#'+id).show();jQuery('.um-modal').show();um_modal_size(size);initImageUpload_UM(jQuery('.um-modal:visible').find('.um-single-image-upload'));initFileUpload_UM(jQuery('.um-modal:visible').find('.um-single-file-upload'));um_modal_responsive()}}}function um_modal_responsive(){var modal = jQuery('.um-modal:visible');var photo_modal = jQuery('.um-modal-body.photo:visible');if(photo_modal.length){modal.removeClass('uimob340');modal.removeClass('uimob500');var photo_ = jQuery('.um-modal-photo img');var photo_maxw = jQuery(window).width() - 60;var photo_maxh = jQuery(window).height() -(jQuery(window).height() * .25);photo_.css({'opacity':0});photo_.css({'max-width':photo_maxw});photo_.css({'max-height':photo_maxh});jQuery('.um-modal').css({'width':photo_.width(),'margin-left':'-'+photo_.width() / 2+'px'});photo_.animate({'opacity':1},1000);var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}else if(modal.length){var element_width = jQuery(window).width();modal.removeClass('uimob340');modal.removeClass('uimob500');if(element_width <= 340){modal.addClass('uimob340');initCrop_UM();modal.animate({'bottom':0},300)}else if(element_width <= 500){modal.addClass('uimob500');initCrop_UM();modal.animate({'bottom':0},300)}else if(element_width <= 800){initCrop_UM();var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}else if(element_width <= 960){initCrop_UM();var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}else if(element_width>960){initCrop_UM();var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}}}function um_remove_modal(){jQuery('.um-modal .um-single-image-preview img').cropper("destroy");jQuery('body,html,textarea').css("overflow","auto");jQuery(document).unbind('touchmove');jQuery('.um-modal div[id^="um_"]').hide().appendTo('body');jQuery('.um-modal,.um-modal-overlay').remove()}function um_modal_size(aclass){jQuery('.um-modal:visible').addClass(aclass)}function um_modal_add_attr(id,value){jQuery('.um-modal:visible').data(id,value)}
|
115 |
|
116 |
/* == jquery mousewheel plugin == Version: 3.1.12, License: MIT License (MIT) */
|
111 |
b.data(this,"tipsy-pointee"),c;if(!(c=!a)){a:{for(;a=a.parentNode;)if(a==document){a=true;break a}a=false}c=!a}c&&b(this).remove()})};b.fn.tipsy.elementOptions=function(a,c){return b.metadata?b.extend({},c,b(a).metadata()):c};b.fn.tipsy.autoNS=function(){return b(this).offset().top>b(document).scrollTop()+b(window).height()/2?"s":"n"};b.fn.tipsy.autoWE=function(){return b(this).offset().left>b(document).scrollLeft()+b(window).width()/2?"e":"w"};b.fn.tipsy.autoBounds=function(a,c){return function(){var d=
|
112 |
{ns:c[0],ew:c.length>1?c[1]:false},h=b(document).scrollTop()+a,f=b(document).scrollLeft()+a,g=b(this);if(g.offset().top<h)d.ns="n";if(g.offset().left<f)d.ew="w";if(b(window).width()+b(document).scrollLeft()-g.offset().left<a)d.ew="e";if(b(window).height()+b(document).scrollTop()-g.offset().top<a)d.ns="s";return d.ns+(d.ew?d.ew:"")}}})(jQuery);
|
113 |
|
114 |
+
;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1<b.axis.length;u&&(d/=2);b.offset=h(b.offset);b.over=h(b.over);return this.each(function(){function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&function(){a.call(q,e,b)}});r.animate(f,k)}if(null!==a){var l=n(this),q=l?this.contentWindow||window:this,r=$(q),e=a,f={},t;switch(typeof e){case "number":case "string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e= h(e);break}e=l?$(e):$(e,q);if(!e.length)return;case "object":if(e.is||e.style)t=(e=$(e)).offset()}var v=$.isFunction(b.offset)&&b.offset(q,e)||b.offset;$.each(b.axis.split(""),function(a,c){var d="x"===c?"Left":"Top",m=d.toLowerCase(),g="scroll"+d,h=r[g](),n=p.max(q,c);t?(f[g]=t[m]+(l?0:h-r.offset()[m]),b.margin&&(f[g]-=parseInt(e.css("margin"+d),10)||0,f[g]-=parseInt(e.css("border"+d+"Width"),10)||0),f[g]+=v[m]||0,b.over[m]&&(f[g]+=e["x"===c?"width":"height"]()*b.over[m])):(d=e[m],f[g]=d.slice&& "%"===d.slice(-1)?parseFloat(d)/100*n:d);b.limit&&/^\d+$/.test(f[g])&&(f[g]=0>=f[g]?0:Math.min(f[g],n));!a&&1<b.axis.length&&(h===f[g]?f={}:u&&(k(b.onAfterFirst),f={}))});k(b.onAfter)}})};p.max=function(a,d){var b="x"===d?"Width":"Height",h="scroll"+b;if(!n(a))return a[h]-$(a)[b.toLowerCase()]();var b="client"+b,k=a.ownerDocument||a.document,l=k.documentElement,k=k.body;return Math.max(l[h],k[h])-Math.min(l[b],k[b])};$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(a){return $(a.elem)[a.prop]()}, set:function(a){var d=this.get(a);if(a.options.interrupt&&a._last&&a._last!==d)return $(a.elem).stop();var b=Math.round(a.now);d!==b&&($(a.elem)[a.prop](b),a._last=this.get(a))}};return p});
|
115 |
+
|
116 |
var live_field;var live_value;function um_conditional(){jQuery('.um-field.um-is-conditional').each(function(){for(var i = 0;i < 5;i++){var action0 = jQuery(this).data('cond-'+i+'-action');var field0 = jQuery(this).data('cond-'+i+'-field');var operator0 = jQuery(this).data('cond-'+i+'-operator');var value0 = jQuery(this).data('cond-'+i+'-value');if(action0 == 'show' && field0 == live_field){if(operator0 == 'empty'){if(!live_value||live_value == ''){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'not empty'){if(live_value&&live_value!= ''){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'equals to'){if(value0 == live_value){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'not equals'){if(jQuery.isNumeric(value0) && parseInt(live_value)!= parseInt(value0) && live_value){jQuery(this).fadeIn()}else if(!jQuery.isNumeric(value0) && value0!= live_value){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'greater than'){if(jQuery.isNumeric(value0) && parseInt(live_value)>parseInt(value0)){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'less than'){if(jQuery.isNumeric(value0) && parseInt(live_value) < parseInt(value0) && live_value){jQuery(this).fadeIn()}else{jQuery(this).hide()}}if(operator0 == 'contains'){if(live_value && live_value.indexOf(value0)>= 0){jQuery(this).fadeIn()}else{jQuery(this).hide()}}}if(action0 == 'hide' && field0 == live_field){if(operator0 == 'empty'){if(!live_value||live_value == ''){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'not empty'){if(live_value&&live_value!= ''){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'equals to'){if(value0 == live_value){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'not equals'){if(jQuery.isNumeric(value0) && parseInt(live_value)!= parseInt(value0) && live_value){jQuery(this).hide()}else if(!jQuery.isNumeric(value0) && value0!= live_value){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'greater than'){if(jQuery.isNumeric(value0) && parseInt(live_value)>parseInt(value0)){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'less than'){if(jQuery.isNumeric(value0) && parseInt(live_value) < parseInt(value0) && live_value){jQuery(this).hide()}else{jQuery(this).fadeIn()}}if(operator0 == 'contains'){if(live_value && live_value.indexOf(value0)>= 0){jQuery(this).hide()}else{jQuery(this).fadeIn()}}}}})}function UM_hide_menus(){menu = jQuery('.um-dropdown');menu.parents('div').find('a').removeClass('active');menu.hide()}function UM_domenus(){jQuery('.um-dropdown').each(function(){var menu = jQuery(this);var element = jQuery(this).attr('data-element');var position = jQuery(this).attr('data-position');jQuery(element).addClass('um-trigger-menu-on-'+menu.attr('data-trigger'));if(jQuery(window).width() <= 1200 && element == 'div.um-profile-edit'){position = 'lc'}if(position == 'lc'){if(200>jQuery(element).find('img').width()){left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)+((jQuery(element).find('img').width() - 200) / 2)}else{left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)}top_ = parseInt(jQuery(element).find('a').css('top'));if(top_){top_p = jQuery(element).find('img').height()+4+top_;left_gap = 4}else{top_p = jQuery(element).find('img').height()+4;left_gap = 0}if(top_p == 4 && element == 'div.um-cover'){top_p = jQuery(element).height() / 2+(menu.height() / 2)}else if(top_p == 4){top_p = jQuery(element).height()+20}gap_right = jQuery(element).width()+17;menu.css({'top':0,'width':200,'left':'auto','right':gap_right+'px','text-align':'center'});menu.find('.um-dropdown-arr').find('i').removeClass().addClass('um-icon-arrow-right-b');menu.find('.um-dropdown-arr').css({'top':'4px','left':'auto','right':'-17px'})}if(position == 'bc'){if(200>jQuery(element).find('img').width()){left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)+((jQuery(element).find('img').width() - 200) / 2)}else{left_p =((jQuery(element).width() - jQuery(element).find('img').width()) / 2)}top_ = parseInt(jQuery(element).find('a').css('top'));if(top_){top_p = jQuery(element).find('img').height()+4+top_;left_gap = 4}else{top_p = jQuery(element).find('img').height()+4;left_gap = 0}if(top_p == 4 && element == 'div.um-cover'){top_p = jQuery(element).height() / 2+(menu.height() / 2)}else if(top_p == 4){top_p = jQuery(element).height()+20}menu.css({'top':top_p,'width':200,'left':left_p+left_gap,'right':'auto','text-align':'center'});menu.find('.um-dropdown-arr').find('i').removeClass().addClass('um-icon-arrow-up-b');menu.find('.um-dropdown-arr').css({'top':'-17px','left':(menu.width() / 2) - 12,'right':'auto'})}})}function um_responsive(){jQuery('.um').each(function(){element_width = jQuery(this).width();if(element_width <= 340){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob340')}else if(element_width <= 500){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob500')}else if(element_width <= 800){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob800')}else if(element_width <= 960){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960');jQuery(this).addClass('uimob960')}else if(element_width>960){jQuery(this).removeClass('uimob340');jQuery(this).removeClass('uimob500');jQuery(this).removeClass('uimob800');jQuery(this).removeClass('uimob960')}if(jQuery('.um-account-nav').length>0 && jQuery('.um-account-side').is(':visible') && jQuery('.um-account-tab:visible').length == 0){jQuery('.um-account-side li a.current').trigger('click')}jQuery(this).css('opacity',1)});jQuery('.um-cover,.um-member-cover').each(function(){var elem = jQuery(this);var ratio = elem.data('ratio');var width = elem.width();var ratios = ratio.split(':');calcHeight = Math.round(width / ratios[0])+'px';elem.height(calcHeight);elem.find('.um-cover-add').height(calcHeight)});jQuery('.um-members').each(function(){UM_Member_Grid(jQuery(this))});UM_domenus()}function UM_Member_Grid(container){container.masonry({itemSelector:'.um-member',columnWidth:'.um-member',gutter:'.um-gutter-sizer'})}function initImageUpload_UM(trigger){if(trigger.data('upload_help_text')){upload_help_text = '<span class="help">'+trigger.data('upload_help_text')+'</span>'}else{upload_help_text = ''}if(trigger.data('icon')){icon = '<span class="icon"><i class="'+trigger.data('icon')+'"></i></span>'}else{icon = ''}if(trigger.data('upload_text')){upload_text = '<span class="str">'+trigger.data('upload_text')+'</span>'}else{upload_text = ''}trigger.uploadFile({url:um_scripts.imageupload,method:"POST",multiple:false,formData:{key:trigger.data('key'),set_id:trigger.data('set_id'),set_mode:trigger.data('set_mode')},fileName:trigger.data('key'),allowedTypes:trigger.data('allowed_types'),maxFileSize:trigger.data('max_size'),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:trigger.data('max_size_error'),extErrorStr:trigger.data('extension_error'),maxFileCountErrorStr:trigger.data('max_files_error'),maxFileCount:1,showDelete:false,showAbort:false,showDone:false,showFileCounter:false,showStatusAfterSuccess:true,onSubmit:function(files){trigger.parents('.um-modal-body').find('.um-error-block').remove()},onSuccess:function(files,data,xhr){trigger.selectedFiles = 0;data = jQuery.parseJSON(data);if(data.error && data.error!= ''){trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);um_modal_responsive()}else{jQuery.each(data,function(key,value){var img_id = trigger.parents('.um-modal-body').find('.um-single-image-preview img');var img_id_h = trigger.parents('.um-modal-body').find('.um-single-image-preview');img_id.attr("src",value);img_id.load(function(){trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);img_id_h.show(0);um_modal_responsive()})})}}})}function initFileUpload_UM(trigger){if(trigger.data('upload_help_text')){upload_help_text = '<span class="help">'+trigger.data('upload_help_text')+'</span>'}else{upload_help_text = ''}if(trigger.data('icon')){icon = '<span class="icon"><i class="'+trigger.data('icon')+'"></i></span>'}else{icon = ''}if(trigger.data('upload_text')){upload_text = '<span class="str">'+trigger.data('upload_text')+'</span>'}else{upload_text = ''}trigger.uploadFile({url:um_scripts.fileupload,method:"POST",multiple:false,formData:{key:trigger.data('key'),set_id:trigger.data('set_id'),set_mode:trigger.data('set_mode')},fileName:trigger.data('key'),allowedTypes:trigger.data('allowed_types'),maxFileSize:trigger.data('max_size'),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:trigger.data('max_size_error'),extErrorStr:trigger.data('extension_error'),maxFileCountErrorStr:trigger.data('max_files_error'),maxFileCount:1,showDelete:false,showAbort:false,showDone:false,showFileCounter:false,showStatusAfterSuccess:true,onSubmit:function(files){trigger.parents('.um-modal-body').find('.um-error-block').remove()},onSuccess:function(files,data,xhr){trigger.selectedFiles = 0;data = jQuery.parseJSON(data);if(data.error && data.error!= ''){trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);um_modal_responsive()}else{jQuery.each(data,function(key,value){trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);trigger.parents('.um-modal-body').find('.um-single-file-preview').show(0);if(key == 'icon'){trigger.parents('.um-modal-body').find('.um-single-fileinfo i').removeClass().addClass(value)}else if(key == 'icon_bg'){trigger.parents('.um-modal-body').find('.um-single-fileinfo span.icon').css({'background-color':value})}else if(key == 'filename'){trigger.parents('.um-modal-body').find('.um-single-fileinfo span.filename').html(value)}else{trigger.parents('.um-modal-body').find('.um-single-fileinfo a').attr('href',value)}});um_modal_responsive()}}})}function initCrop_UM(){var target_img = jQuery('.um-modal:visible .um-single-image-preview img');var target_img_parent = jQuery('.um-modal:visible .um-single-image-preview');var crop_data = target_img.parent().attr('data-crop');var min_width = target_img.parent().attr('data-min_width');var min_height = target_img.parent().attr('data-min_height');var ratio = target_img.parent().attr('data-ratio');if(jQuery('.um-modal').find('#um_upload_single').attr('data-ratio')){var ratio = jQuery('.um-modal').find('#um_upload_single').attr('data-ratio');var ratio_split = ratio.split(':');var ratio = ratio_split[0]}if(target_img.length){if(target_img.attr('src')!= ''){var max_height = jQuery(window).height() -(jQuery('.um-modal-footer a').height()+20) - 50 -(jQuery('.um-modal-header:visible').height());target_img.css({'height':'auto'});target_img_parent.css({'height':'auto'});if(jQuery(window).height() <= 400){target_img_parent.css({'height':max_height+'px','max-height':max_height+'px'});target_img.css({'height':'auto'})}else{target_img.css({'height':'auto','max-height':max_height+'px'});target_img_parent.css({'height':target_img.height(),'max-height':max_height+'px'})}if(crop_data == 'square'){var opts ={minWidth:min_width,minHeight:min_height,dragCrop:false,aspectRatio:1.0,zoomable:false,rotatable:false,dashed:false,done:function(data){target_img.parent().attr('data-coord',Math.round(data.x)+','+Math.round(data.y)+','+Math.round(data.width)+','+Math.round(data.height))}}}else if(crop_data == 'cover'){var opts ={minWidth:min_width,minHeight:Math.round(min_width / ratio),dragCrop:false,aspectRatio:ratio,zoomable:false,rotatable:false,dashed:false,done:function(data){target_img.parent().attr('data-coord',Math.round(data.x)+','+Math.round(data.y)+','+Math.round(data.width)+','+Math.round(data.height))}}}else if(crop_data == 'user'){var opts ={minWidth:min_width,minHeight:min_height,dragCrop:true,aspectRatio:"auto",zoomable:false,rotatable:false,dashed:false,done:function(data){target_img.parent().attr('data-coord',Math.round(data.x)+','+Math.round(data.y)+','+Math.round(data.width)+','+Math.round(data.height))}}}if(crop_data!= 0){target_img.cropper(opts)}}}}function um_new_modal(id,size,isPhoto,source){var modal = jQuery('body').find('.um-modal-overlay');if(modal.length == 0){jQuery('.tipsy').hide();UM_hide_menus();jQuery('body,html,textarea').css("overflow","hidden");jQuery(document).bind("touchmove",function(e){e.preventDefault()});jQuery('.um-modal').on('touchmove',function(e){e.stopPropagation()});if(isPhoto){jQuery('body').append('<div class="um-modal-overlay" ></div><div class="um-modal is-photo" ></div>')}else{jQuery('body').append('<div class="um-modal-overlay" ></div><div class="um-modal no-photo" ></div>')}jQuery('#'+id).prependTo('.um-modal');if(isPhoto){jQuery('.um-modal').find('.um-modal-photo').html('<img />');var photo_ = jQuery('.um-modal-photo img');var photo_maxw = jQuery(window).width() - 60;var photo_maxh = jQuery(window).height() -(jQuery(window).height() * .25);photo_.attr("src",source);photo_.load(function(){jQuery('#'+id).show();jQuery('.um-modal').show();photo_.css({'opacity':0});photo_.css({'max-width':photo_maxw});photo_.css({'max-height':photo_maxh});jQuery('.um-modal').css({'width':photo_.width(),'margin-left':'-'+photo_.width() / 2+'px'});photo_.animate({'opacity':1},1000);um_modal_responsive()})}else{jQuery('#'+id).show();jQuery('.um-modal').show();um_modal_size(size);initImageUpload_UM(jQuery('.um-modal:visible').find('.um-single-image-upload'));initFileUpload_UM(jQuery('.um-modal:visible').find('.um-single-file-upload'));um_modal_responsive()}}}function um_modal_responsive(){var modal = jQuery('.um-modal:visible');var photo_modal = jQuery('.um-modal-body.photo:visible');if(photo_modal.length){modal.removeClass('uimob340');modal.removeClass('uimob500');var photo_ = jQuery('.um-modal-photo img');var photo_maxw = jQuery(window).width() - 60;var photo_maxh = jQuery(window).height() -(jQuery(window).height() * .25);photo_.css({'opacity':0});photo_.css({'max-width':photo_maxw});photo_.css({'max-height':photo_maxh});jQuery('.um-modal').css({'width':photo_.width(),'margin-left':'-'+photo_.width() / 2+'px'});photo_.animate({'opacity':1},1000);var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}else if(modal.length){var element_width = jQuery(window).width();modal.removeClass('uimob340');modal.removeClass('uimob500');if(element_width <= 340){modal.addClass('uimob340');initCrop_UM();modal.animate({'bottom':0},300)}else if(element_width <= 500){modal.addClass('uimob500');initCrop_UM();modal.animate({'bottom':0},300)}else if(element_width <= 800){initCrop_UM();var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}else if(element_width <= 960){initCrop_UM();var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}else if(element_width>960){initCrop_UM();var half_gap =(jQuery(window).height() - modal.innerHeight()) / 2+'px';modal.animate({'bottom':half_gap},300)}}}function um_remove_modal(){jQuery('.um-modal .um-single-image-preview img').cropper("destroy");jQuery('body,html,textarea').css("overflow","auto");jQuery(document).unbind('touchmove');jQuery('.um-modal div[id^="um_"]').hide().appendTo('body');jQuery('.um-modal,.um-modal-overlay').remove()}function um_modal_size(aclass){jQuery('.um-modal:visible').addClass(aclass)}function um_modal_add_attr(id,value){jQuery('.um-modal:visible').data(id,value)}
|
117 |
|
118 |
/* == jquery mousewheel plugin == Version: 3.1.12, License: MIT License (MIT) */
|
core/um-enqueue.php
CHANGED
@@ -138,6 +138,8 @@ class UM_Enqueue {
|
|
138 |
|
139 |
$this->load_raty();
|
140 |
|
|
|
|
|
141 |
$this->load_scrollbar();
|
142 |
|
143 |
$this->load_imagecrop();
|
@@ -288,6 +290,16 @@ class UM_Enqueue {
|
|
288 |
|
289 |
}
|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
/***
|
292 |
*** @Load scrollbar
|
293 |
***/
|
138 |
|
139 |
$this->load_raty();
|
140 |
|
141 |
+
$this->load_scrollto();
|
142 |
+
|
143 |
$this->load_scrollbar();
|
144 |
|
145 |
$this->load_imagecrop();
|
290 |
|
291 |
}
|
292 |
|
293 |
+
/***
|
294 |
+
*** @Load scrollto
|
295 |
+
***/
|
296 |
+
function load_scrollto(){
|
297 |
+
|
298 |
+
wp_register_script('um_scrollto', um_url . 'assets/js/um-scrollto.js' );
|
299 |
+
wp_enqueue_script('um_scrollto');
|
300 |
+
|
301 |
+
}
|
302 |
+
|
303 |
/***
|
304 |
*** @Load scrollbar
|
305 |
***/
|
core/um-fields.php
CHANGED
@@ -2006,6 +2006,8 @@ class UM_Fields {
|
|
2006 |
}
|
2007 |
|
2008 |
$res = stripslashes( $this->field_value( $key, $default, $data ) );
|
|
|
|
|
2009 |
|
2010 |
$output .= '<div class="um-field-area">';
|
2011 |
$output .= '<div class="um-field-value">' . $res . '</div>';
|
2006 |
}
|
2007 |
|
2008 |
$res = stripslashes( $this->field_value( $key, $default, $data ) );
|
2009 |
+
|
2010 |
+
$res = htmlentities( $res );
|
2011 |
|
2012 |
$output .= '<div class="um-field-area">';
|
2013 |
$output .= '<div class="um-field-value">' . $res . '</div>';
|
core/um-query.php
CHANGED
@@ -70,6 +70,7 @@ class UM_Query {
|
|
70 |
|
71 |
unset( $args['post_type'] );
|
72 |
unset( $args['post_status'] );
|
|
|
73 |
|
74 |
$comments = get_comments($args);
|
75 |
return $comments;
|
70 |
|
71 |
unset( $args['post_type'] );
|
72 |
unset( $args['post_status'] );
|
73 |
+
$args['type__not_in'] = apply_filters( 'um_excluded_comment_types', array('') );
|
74 |
|
75 |
$comments = get_comments($args);
|
76 |
return $comments;
|
core/um-short-functions.php
CHANGED
@@ -582,6 +582,7 @@ function um_reset_user() {
|
|
582 |
function um_edit_my_profile_cancel_uri() {
|
583 |
$url = remove_query_arg( 'um_action' );
|
584 |
$url = remove_query_arg( 'profiletab', $url );
|
|
|
585 |
return $url;
|
586 |
}
|
587 |
|
582 |
function um_edit_my_profile_cancel_uri() {
|
583 |
$url = remove_query_arg( 'um_action' );
|
584 |
$url = remove_query_arg( 'profiletab', $url );
|
585 |
+
$url = add_query_arg('profiletab', 'main', $url );
|
586 |
return $url;
|
587 |
}
|
588 |
|
index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Ultimate Member
|
4 |
Plugin URI: http://ultimatemember.com/
|
5 |
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
|
6 |
-
Version: 1.3.
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
*/
|
3 |
Plugin Name: Ultimate Member
|
4 |
Plugin URI: http://ultimatemember.com/
|
5 |
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
|
6 |
+
Version: 1.3.18
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
*/
|
readme.txt
CHANGED
@@ -5,9 +5,9 @@ Contributors: ultimatemember
|
|
5 |
Donate link:
|
6 |
Tags: access control, author, authors, author profile, comments, community, communities, conditional fields, conditional logic, conditional menus, content protection, custom fields, file uploads, form builder, front-end login, front-end registration, gravatar, hide wp-admin, login, login page, logged-in users, mandrill, member, members, membership, member directory, online users, profile, profiles, profile builder, registration, restriction, restrict content, role creation, role menus, search filters, sign in, sign up, social network, star ratings, toolbar, user, users, user fields, user profile, user-profile, user profiles, user roles
|
7 |
Requires at least: 4.1
|
8 |
-
Tested up to: 4.
|
9 |
|
10 |
-
Stable Tag: 1.3.
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
@@ -151,6 +151,13 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
|
151 |
|
152 |
== Changelog ==
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
= 1.3.17: August 13, 2015 =
|
155 |
|
156 |
* New: added Brazilian Portuguese language support
|
5 |
Donate link:
|
6 |
Tags: access control, author, authors, author profile, comments, community, communities, conditional fields, conditional logic, conditional menus, content protection, custom fields, file uploads, form builder, front-end login, front-end registration, gravatar, hide wp-admin, login, login page, logged-in users, mandrill, member, members, membership, member directory, online users, profile, profiles, profile builder, registration, restriction, restrict content, role creation, role menus, search filters, sign in, sign up, social network, star ratings, toolbar, user, users, user fields, user profile, user-profile, user profiles, user roles
|
7 |
Requires at least: 4.1
|
8 |
+
Tested up to: 4.3
|
9 |
|
10 |
+
Stable Tag: 1.3.18
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 1.3.18: August 20, 2015 =
|
155 |
+
|
156 |
+
* New: filter for comment types tab in profile
|
157 |
+
* New: jQuery.scrollto script added (for developers and extensions support)
|
158 |
+
* Fixed: XSS vulnerability in text input
|
159 |
+
* Fixed: user goes to profile about tab after editing profile
|
160 |
+
|
161 |
= 1.3.17: August 13, 2015 =
|
162 |
|
163 |
* New: added Brazilian Portuguese language support
|