Skip to content

Commit 89cdd53

Browse files
authored
Merge pull request #1038 from WPChill/2.9.5
2.9.5
2 parents 2de4fee + aed7d01 commit 89cdd53

File tree

7 files changed

+37
-19
lines changed

7 files changed

+37
-19
lines changed

assets/css/admin/modula-cpt.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ Scaling Effect Preview
16621662

16631663
/* Autocomplete z-index fix */
16641664

1665-
.ui-autocomplete {
1665+
html body.post-type-modula-gallery .ui-autocomplete {
16661666
z-index: 160000;
16671667
background: white;
16681668
font-family: inherit;

assets/css/admin/modula-cpt.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
= 2.9.5 - 09.09.2024 =
2+
Fixed: Compatibility with ACF Pro ( [#937]( https://github.com/WPChill/modula-lite/issues/937) )
3+
Fixed: Not importing sourge-gallery captions for existing media images. ( [#904]( https://github.com/WPChill/modula-lite/issues/904) )
4+
Fixed: Admin table listing error when searching for string containing %s. ( [#1036]( https://github.com/WPChill/modula-lite/issues/1036) )
5+
16
= 2.9.4 - 30.08.2024 =
27
Removed: Build files from repository.
38

includes/admin/class-modula-cpt.php

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,29 +1080,36 @@ public function filter_by_gallery_type( $views ) {
10801080
'post_type' => $this->cpt_name,
10811081
);
10821082

1083+
$search = false;
10831084
if ( isset( $_GET['s'] ) ){
1084-
$args['s'] = sanitize_text_field( $_GET['s'] );
1085+
$search = sanitize_text_field( $_GET['s'] );
10851086
}
10861087

1087-
$type_url = add_query_arg(
1088-
$args,
1089-
admin_url( 'edit.php' )
1090-
);
1091-
10921088
$fields = array_merge( $fields['type']['values'], isset( $fields['type']['disabled']['values'] ) ? $fields['type']['disabled']['values'] : array() );
10931089

10941090
foreach( $fields as $type => $text ){
1091+
1092+
$type_url = add_query_arg(
1093+
$args,
1094+
admin_url( 'edit.php' )
1095+
);
1096+
10951097
if( ! isset( $gallery_types[$type] ) ){
10961098
continue;
10971099
}
1100+
10981101
$count = count( $gallery_types[$type] );
1099-
$views[$type] = sprintf(
1100-
'<a href="'. esc_url( $type_url ) .'" %s > %s (%s) </a>',
1101-
$type,
1102-
isset( $_GET['gallery_type'] ) && $type === $_GET['gallery_type'] ? 'class="current" aria-current="page"' : '',
1103-
$text,
1104-
$count
1105-
);
1102+
1103+
$type_url = sprintf( $type_url, $type );
1104+
1105+
if( $search ) {
1106+
$type_url = add_query_arg( array( 's' => $search ), $type_url );
1107+
}
1108+
1109+
$attributes = isset( $_GET['gallery_type'] ) && $type === $_GET['gallery_type'] ? 'class="current" aria-current="page"' : '';
1110+
1111+
$views[$type] = '<a href="'. esc_url( $type_url ) .'" '. $attributes .' > ' . esc_html( $text ) . ' (' . esc_html( $count) . ') </a>';
1112+
11061113
}
11071114

11081115
return $views;

includes/migrate/class-modula-ajax-migrator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function add_image_to_library( $source_path, $source_file, $description,
9696
global $wpdb;
9797
$sql = $wpdb->prepare(
9898
"SELECT * FROM $wpdb->posts WHERE guid LIKE %s",
99-
'%/' . $source_file
99+
'%/' . str_replace( '-scaled', '', $source_file )
100100
);
101101

102102
$queried = $wpdb->get_results( $sql );
@@ -106,7 +106,7 @@ public function add_image_to_library( $source_path, $source_file, $description,
106106
'ID' => $queried[0]->ID,
107107
'title' => $queried[0]->post_title,
108108
'alt' => get_post_meta( $queried[0]->ID, '_wp_attachment_image_alt', true ),
109-
'caption' => $queried[0]->post_content
109+
'caption' => ! empty( $description ) ? $description : $queried[0]->post_content,
110110
);
111111
}
112112

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "modula-best-grid-gallery",
3-
"version": "2.9.4",
3+
"version": "2.9.5",
44
"description": "Modula Image Gallery build tools",
55
"author": "WPChill",
66
"license": "GPL-2.0-or-later",

readme.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: best gallery plugin, image gallery, video gallery, free gallery, wordpress
44
Requires at least: 5.3
55
Tested up to: 6.6
66
Requires PHP: 5.6
7-
Stable tag: 2.9.3
7+
Stable tag: 2.9.5
88

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

156156
== Changelog ==
157+
158+
= 2.9.5 - 09.09.2024 =
159+
Fixed: Compatibility with ACF Pro ( [#937]( https://github.com/WPChill/modula-lite/issues/937) )
160+
Fixed: Not importing sourge-gallery captions for existing media images. ( [#904]( https://github.com/WPChill/modula-lite/issues/904) )
161+
Fixed: Admin table listing error when searching for string containing %s. ( [#1036]( https://github.com/WPChill/modula-lite/issues/1036) )
162+
157163
= 2.9.4 - 30.08.2024 =
158164
Removed: Build files from repository.
159165

0 commit comments

Comments
 (0)