Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
polevaultweb committed Oct 19, 2022
2 parents 6b75c4c + 53ae0ec commit badf7c6
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 13 deletions.
15 changes: 15 additions & 0 deletions includes/fields/types/class-wpum-field-taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@ public function get_data_keys() {
return array_merge( $keys, array_keys( $this->get_editor_settings()['general'] ) );
}

/**
* Gets the value of a posted multiselect field.
*
* @param string $key
* @param array $field
* @return array
*/
public function get_posted_field( $key, $field ) {
if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) { // phpcs:ignore
return isset( $_POST[ $key ] ) ? array_map( 'intval', $_POST[ $key ] ) : array(); // phpcs:ignore
}

return filter_input( INPUT_POST, $key, FILTER_VALIDATE_INT );
}

/**
* @return array
*/
Expand Down
15 changes: 15 additions & 0 deletions includes/fields/types/class-wpum-field-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,21 @@ public function get_editor_settings() {
);
}

/**
* Gets the value of a posted multiselect field.
*
* @param string $key
* @param array $field
* @return array
*/
public function get_posted_field( $key, $field ) {
if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) { // phpcs:ignore
return isset( $_POST[ $key ] ) ? array_map( 'intval', $_POST[ $key ] ) : array(); // phpcs:ignore
}

return filter_input( INPUT_POST, $key, FILTER_VALIDATE_INT );
}

/**
* Format the output onto the profiles for the taxonomy field.
*
Expand Down
15 changes: 15 additions & 0 deletions includes/fields/types/class-wpum-field-userrole.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ public function get_data_keys() {
return array_merge( $keys, array_keys( $this->get_editor_settings()['general'] ) );
}

/**
* Gets the value of a posted multiselect field.
*
* @param string $key
* @param array $field
* @return array
*/
public function get_posted_field( $key, $field ) {
if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) { // phpcs:ignore
return isset( $_POST[ $key ] ) ? array_map( 'sanitize_text_field', $_POST[ $key ] ) : array(); // phpcs:ignore
}

return filter_input( INPUT_POST, $key, FILTER_SANITIZE_STRING );
}

/**
* @return array
*/
Expand Down
18 changes: 9 additions & 9 deletions languages/wp-user-manager.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This file is distributed under the GPLv3+.
msgid ""
msgstr ""
"Project-Id-Version: WP User Manager 2.8.12\n"
"Project-Id-Version: WP User Manager 2.8.13\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-user-manager\n"
"POT-Creation-Date: 2022-09-16 20:49:12+00:00\n"
"POT-Creation-Date: 2022-10-19 08:41:54+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -1391,7 +1391,7 @@ msgid "Description"
msgstr ""

#: includes/directories/class-wpum-directories-editor.php:293
#: includes/fields/types/class-wpum-field-userrole.php:48
#: includes/fields/types/class-wpum-field-userrole.php:63
msgid "User Roles"
msgstr ""

Expand Down Expand Up @@ -2220,11 +2220,11 @@ msgid "Enter the maximum rows for the field."
msgstr ""

#: includes/fields/types/class-wpum-field-taxonomy.php:24
#: includes/fields/types/class-wpum-field-taxonomy.php:49
#: includes/fields/types/class-wpum-field-taxonomy.php:64
msgid "Taxonomy"
msgstr ""

#: includes/fields/types/class-wpum-field-taxonomy.php:56
#: includes/fields/types/class-wpum-field-taxonomy.php:71
msgid "Field Type"
msgstr ""

Expand Down Expand Up @@ -2257,7 +2257,7 @@ msgid "Filter by role"
msgstr ""

#: includes/fields/types/class-wpum-field-user.php:70
#: includes/fields/types/class-wpum-field-userrole.php:69
#: includes/fields/types/class-wpum-field-userrole.php:84
msgid "Allow multiple selection"
msgstr ""

Expand All @@ -2266,19 +2266,19 @@ msgid "Show users with hidden profiles"
msgstr ""

#: includes/fields/types/class-wpum-field-user.php:83
#: includes/fields/types/class-wpum-field-userrole.php:59
#: includes/fields/types/class-wpum-field-userrole.php:74
msgid "Type label"
msgstr ""

#: includes/fields/types/class-wpum-field-userrole.php:24
msgid "User Role"
msgstr ""

#: includes/fields/types/class-wpum-field-userrole.php:49
#: includes/fields/types/class-wpum-field-userrole.php:64
msgid "List of roles the users can select from"
msgstr ""

#: includes/fields/types/class-wpum-field-userrole.php:70
#: includes/fields/types/class-wpum-field-userrole.php:85
msgid "Allow users to select multiple roles for themselves"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "wp-user-manager",
"title": "WP User Manager",
"description": "Plugin",
"version": "2.8.12",
"version": "2.8.13",
"homepage": "https://wpusermanager.com",
"author": {
"name": "WP User Manager",
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Tested up to: 6.0
Requires PHP: 5.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Stable Tag: 2.8.12
Stable Tag: 2.8.13

The most customizable profiles & community builder WordPress plugin with front-end login, registration, profile customization and content restriction.

Expand Down Expand Up @@ -126,6 +126,10 @@ Please note that using WPUM and the mentioned add-ons does NOT guarantee complia

== Changelog ==

= 2.8.13 (19th October 2022) =

- Fix: User, User Role, and User Taxonomy fields now saving multiple values correctly

= 2.8.12 (16th September 2022) =

- Fix: Forms in widgets now render correctly
Expand Down
4 changes: 2 additions & 2 deletions wp-user-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WP User Manager
* Plugin URI: https://wpusermanager.com
* Description: Beautifully simple user profile directories with frontend login, registration and account customization. WP User Manager is the best solution to manage your community and your users for WordPress.
* Version: 2.8.12
* Version: 2.8.13
* Author: WP User Manager
* Author URI: https://wpusermanager.com
* License: GPLv3+
Expand All @@ -20,7 +20,7 @@
function WPUM() {
require_once dirname( __FILE__ ) . '/includes/class-wp-user-manager.php';

return WP_User_Manager::instance( __FILE__, '2.8.12' );
return WP_User_Manager::instance( __FILE__, '2.8.13' );
}

WPUM();

0 comments on commit badf7c6

Please sign in to comment.