Commit 509b8949 authored by lucha's avatar lucha
Browse files

[auto] plugin: buddypress 3.2.0

parent 23745cb8
/* global wp, bp, BP_Nouveau, JSON */
/* jshint devel: true */
/* jshint browser: true */
/* @version 3.0.0 */
/* @version 3.2.0 */
window.wp = window.wp || {};
window.bp = window.bp || {};
......@@ -161,6 +161,27 @@ window.bp = window.bp || {};
return params;
},
/**
* URL Decode a query variable.
*
* @param {string} qv The query variable to decode.
* @param {object} chars The specific characters to use. Optionnal.
* @return {string} The URL decoded variable.
*/
urlDecode: function( qv, chars ) {
var specialChars = chars || {
amp: '&',
lt: '<',
gt: '>',
quot: '"',
'#039': '\''
};
return decodeURIComponent( qv.replace( /\+/g, ' ' ) ).replace( /&([^;]+);/g, function( v, q ) {
return specialChars[q] || '';
} );
},
/**
* [ajax description]
* @param {[type]} post_data [description]
......@@ -238,6 +259,11 @@ window.bp = window.bp || {};
return;
}
// Prepare the search terms for the request
if ( data.search_terms ) {
data.search_terms = data.search_terms.replace( /</g, '&lt;' ).replace( />/g, '&gt;' );
}
// Set session's data
if ( null !== data.scope ) {
this.setStorage( 'bp-' + data.object, 'scope', data.scope );
......@@ -357,6 +383,7 @@ window.bp = window.bp || {};
}
if ( search_terms ) {
search_terms = self.urlDecode( search_terms );
$( '#buddypress [data-bp-search="' + object + '"] input[type=search]' ).val( search_terms );
}
}
......
......@@ -4,41 +4,47 @@ window.wp = window.wp || {};
( function( wp, $ ) {
if ( undefined === typeof wp.customizer ) {
if ( 'undefined' === typeof wp.customize ) {
return;
}
$( document ).ready( function() {
wp.customize.bind( 'ready', function() {
var groupFrontPage = wp.customize.control( 'group_front_page' ),
userFrontPage = wp.customize.control( 'user_front_page' );
// If the Main Group setting is disabled, hide all others
$( wp.customize.control( 'group_front_page' ).selector ).on( 'click', 'input[type=checkbox]', function( event ) {
var checked = $( event.currentTarget ).prop( 'checked' ), controller = $( event.delegateTarget ).prop( 'id' );
if ( 'undefined' !== typeof groupFrontPage ) {
$( groupFrontPage.selector ).on( 'click', 'input[type=checkbox]', function( event ) {
var checked = $( event.currentTarget ).prop( 'checked' ), controller = $( event.delegateTarget ).prop( 'id' );
_.each( wp.customize.section( 'bp_nouveau_group_front_page' ).controls(), function( control ) {
if ( control.selector !== '#' + controller ) {
if ( true === checked ) {
$( control.selector ).show();
} else {
$( control.selector ).hide();
_.each( wp.customize.section( 'bp_nouveau_group_front_page' ).controls(), function( control ) {
if ( control.selector !== '#' + controller ) {
if ( true === checked ) {
$( control.selector ).show();
} else {
$( control.selector ).hide();
}
}
}
} );
} );
} );
}
// If the Main User setting is disabled, hide all others
$( wp.customize.control( 'user_front_page' ).selector ).on( 'click', 'input[type=checkbox]', function( event ) {
var checked = $( event.currentTarget ).prop( 'checked' ), controller = $( event.delegateTarget ).prop( 'id' );
if ( 'undefined' !== typeof userFrontPage ) {
$( userFrontPage.selector ).on( 'click', 'input[type=checkbox]', function( event ) {
var checked = $( event.currentTarget ).prop( 'checked' ), controller = $( event.delegateTarget ).prop( 'id' );
_.each( wp.customize.section( 'bp_nouveau_user_front_page' ).controls(), function( control ) {
if ( control.selector !== '#' + controller ) {
if ( true === checked ) {
$( control.selector ).show();
} else {
$( control.selector ).hide();
_.each( wp.customize.section( 'bp_nouveau_user_front_page' ).controls(), function( control ) {
if ( control.selector !== '#' + controller ) {
if ( true === checked ) {
$( control.selector ).show();
} else {
$( control.selector ).hide();
}
}
}
} );
} );
} );
}
$( 'ul#customize-control-group_nav_order, ul#customize-control-user_nav_order' ).sortable( {
cursor : 'move',
......@@ -59,7 +65,6 @@ window.wp = window.wp || {};
}
}
} ).disableSelection();
} );
} )( window.wp, jQuery );
window.wp=window.wp||{},function(e,o){void 0!==typeof e.customizer&&o(document).ready(function(){o(e.customize.control("group_front_page").selector).on("click","input[type=checkbox]",function(t){var c=o(t.currentTarget).prop("checked"),r=o(t.delegateTarget).prop("id");_.each(e.customize.section("bp_nouveau_group_front_page").controls(),function(e){e.selector!=="#"+r&&(!0===c?o(e.selector).show():o(e.selector).hide())})}),o(e.customize.control("user_front_page").selector).on("click","input[type=checkbox]",function(t){var c=o(t.currentTarget).prop("checked"),r=o(t.delegateTarget).prop("id");_.each(e.customize.section("bp_nouveau_user_front_page").controls(),function(e){e.selector!=="#"+r&&(!0===c?o(e.selector).show():o(e.selector).hide())})}),o("ul#customize-control-group_nav_order, ul#customize-control-user_nav_order").sortable({cursor:"move",axis:"y",opacity:1,items:"li:not(.ui-sortable-disabled)",tolerance:"intersect",update:function(){var e=[];o(this).find("[data-bp-nav]").each(function(t,c){e.push(o(c).data("bp-nav"))}),e.length&&o("#bp_item_"+o(this).data("bp-type")).val(e.join()).trigger("change")}}).disableSelection()})}(window.wp,jQuery);
\ No newline at end of file
window.wp=window.wp||{},function(e,o){void 0!==e.customize&&e.customize.bind("ready",function(){var t=e.customize.control("group_front_page"),c=e.customize.control("user_front_page");void 0!==t&&o(t.selector).on("click","input[type=checkbox]",function(t){var c=o(t.currentTarget).prop("checked"),r=o(t.delegateTarget).prop("id");_.each(e.customize.section("bp_nouveau_group_front_page").controls(),function(e){e.selector!=="#"+r&&(!0===c?o(e.selector).show():o(e.selector).hide())})}),void 0!==c&&o(c.selector).on("click","input[type=checkbox]",function(t){var c=o(t.currentTarget).prop("checked"),r=o(t.delegateTarget).prop("id");_.each(e.customize.section("bp_nouveau_user_front_page").controls(),function(e){e.selector!=="#"+r&&(!0===c?o(e.selector).show():o(e.selector).hide())})}),o("ul#customize-control-group_nav_order, ul#customize-control-user_nav_order").sortable({cursor:"move",axis:"y",opacity:1,items:"li:not(.ui-sortable-disabled)",tolerance:"intersect",update:function(){var e=[];o(this).find("[data-bp-nav]").each(function(t,c){e.push(o(c).data("bp-nav"))}),e.length&&o("#bp_item_"+o(this).data("bp-type")).val(e.join()).trigger("change")}}).disableSelection()})}(window.wp,jQuery);
\ No newline at end of file
......@@ -211,8 +211,10 @@ class BP_XProfile_Group {
if ( BP_XProfile_Field::delete_for_group( $this->id ) ) {
// Remove profile data for the groups fields.
for ( $i = 0, $count = count( $this->fields ); $i < $count; ++$i ) {
BP_XProfile_ProfileData::delete_for_field( $this->fields[$i]->id );
if ( ! empty( $this->fields ) ) {
for ( $i = 0, $count = count( $this->fields ); $i < $count; ++$i ) {
BP_XProfile_ProfileData::delete_for_field( $this->fields[$i]->id );
}
}
}
......
......@@ -303,7 +303,7 @@ class BuddyPress {
/** Versions **********************************************************/
$this->version = '3.1.0';
$this->version = '3.2.0';
$this->db_version = 11105;
/** Loading ***********************************************************/
......
......@@ -2,9 +2,9 @@
Contributors: johnjamesjacoby, DJPaul, boonebgorges, r-a-y, imath, mercime, tw2113, dcavins, hnla, karmatosed, slaFFik, dimensionmedia, henrywright, netweb, offereins, espellcaste, modemlooper, danbp, Venutius, apeatling, shanebp
Tags: user profiles, activity streams, messaging, friends, user groups, notifications, community, social networking
Requires at least: 4.5
Tested up to: 4.9.6
Tested up to: 4.9.8
Requires PHP: 5.3
Stable tag: 3.1.0
Stable tag: 3.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
......@@ -126,11 +126,11 @@ Try <a href="https://wordpress.org/plugins/bbpress/">bbPress</a>. It integrates
== Upgrade Notice ==
= 3.1.0 =
See: https://codex.buddypress.org/releases/version-3-1-0/
= 3.2.0 =
See: https://codex.buddypress.org/releases/version-3-2-0/
== Changelog ==
= 3.1.0 =
= 3.2.0 =
See: https://codex.buddypress.org/releases/version-3-1-0/
See: https://codex.buddypress.org/releases/version-3-2-0/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment