Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload position was not being saved through rest api #1115

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Modula.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: https://wp-modula.com/
* Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
* Author: WPChill
* Version: 2.10.2
* Version: 2.10.3
* Author URI: https://www.wpchill.com/
* License: GPLv3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -47,7 +47,7 @@
* @since 2.0.2
*/

define( 'MODULA_LITE_VERSION', '2.10.2' );
define( 'MODULA_LITE_VERSION', '2.10.3' );
define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) );
define( 'MODULA_URL', plugin_dir_url( __FILE__ ) );
defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL', 'https://wp-modula.com' );
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
= 2.10.3 - 10.10.2024 =
Fixed: Upload position setting not being saved.

= 2.10.2 - 30.09.2024 =
Added: Multiple columns for the Masonry gallery type
Fixed: Sanitize captions for fancybox (security fix)
Expand Down
15 changes: 13 additions & 2 deletions includes/admin/class-modula-cpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,19 @@ private function sanitize_settings( $post_id, $settings ) {
}

// Save the value of upload_position.
if ( isset( $_POST['modula-settings']['upload_position'] ) ) {
$modula_settings['upload_position'] = sanitize_text_field( wp_unslash( $_POST['modula-settings']['upload_position'] ) );
if (
isset( $_POST['modula-settings']['upload_position'] )
|| isset($settings['upload_position'])
) {
$upload_position = isset( $_POST['modula-settings']['upload_position'] )
? $_POST['modula-settings']['upload_position']
: $settings['upload_position'];

$upload_position = '1' === $upload_position || 'start' === $upload_position
? 'start'
: 'end';

$modula_settings['upload_position'] = $upload_position;
} else {
$modula_settings['upload_position'] = 'end';
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "modula-best-grid-gallery",
"version": "2.10.2",
"version": "2.10.3",
"description": "Modula Image Gallery build tools",
"author": "WPChill",
"license": "GPL-2.0-or-later",
Expand Down Expand Up @@ -91,4 +91,4 @@
"glob": "^10.3.3",
"rimraf": "^5.0.1"
}
}
}
4 changes: 3 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: best gallery plugin, image gallery, video gallery, free gallery, wordpress
Requires at least: 5.3
Tested up to: 6.6
Requires PHP: 5.6
Stable tag: 2.10.2
Stable tag: 2.10.3

License: GNU General Public License v3.0 or later
The WordPress gallery plugin that's highly customizable & you can use to impress your clients. Create beautiful image galleries in minutes.
Expand Down Expand Up @@ -156,6 +156,8 @@ Free support is included only with a PRO license: [Buy Modula PRO](https://wp-mo
4. Responsive galleries created with Modula

== Changelog ==
= 2.10.3 - 10.10.2024 =
Fixed: Upload position setting not being saved.

= 2.10.2 - 30.09.2024 =
Added: Multiple columns for the Masonry gallery type
Expand Down
Loading