Skip to content

Commit

Permalink
Merge pull request #1038 from WPChill/2.9.5
Browse files Browse the repository at this point in the history
2.9.5
  • Loading branch information
TeoAlex authored Sep 9, 2024
2 parents 2de4fee + aed7d01 commit 89cdd53
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 19 deletions.
2 changes: 1 addition & 1 deletion assets/css/admin/modula-cpt.css
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ Scaling Effect Preview

/* Autocomplete z-index fix */

.ui-autocomplete {
html body.post-type-modula-gallery .ui-autocomplete {
z-index: 160000;
background: white;
font-family: inherit;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/admin/modula-cpt.min.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
= 2.9.5 - 09.09.2024 =
Fixed: Compatibility with ACF Pro ( [#937]( https://github.com/WPChill/modula-lite/issues/937) )
Fixed: Not importing sourge-gallery captions for existing media images. ( [#904]( https://github.com/WPChill/modula-lite/issues/904) )
Fixed: Admin table listing error when searching for string containing %s. ( [#1036]( https://github.com/WPChill/modula-lite/issues/1036) )

= 2.9.4 - 30.08.2024 =
Removed: Build files from repository.

Expand Down
33 changes: 20 additions & 13 deletions includes/admin/class-modula-cpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -1080,29 +1080,36 @@ public function filter_by_gallery_type( $views ) {
'post_type' => $this->cpt_name,
);

$search = false;
if ( isset( $_GET['s'] ) ){
$args['s'] = sanitize_text_field( $_GET['s'] );
$search = sanitize_text_field( $_GET['s'] );
}

$type_url = add_query_arg(
$args,
admin_url( 'edit.php' )
);

$fields = array_merge( $fields['type']['values'], isset( $fields['type']['disabled']['values'] ) ? $fields['type']['disabled']['values'] : array() );

foreach( $fields as $type => $text ){

$type_url = add_query_arg(
$args,
admin_url( 'edit.php' )
);

if( ! isset( $gallery_types[$type] ) ){
continue;
}

$count = count( $gallery_types[$type] );
$views[$type] = sprintf(
'<a href="'. esc_url( $type_url ) .'" %s > %s (%s) </a>',
$type,
isset( $_GET['gallery_type'] ) && $type === $_GET['gallery_type'] ? 'class="current" aria-current="page"' : '',
$text,
$count
);

$type_url = sprintf( $type_url, $type );

if( $search ) {
$type_url = add_query_arg( array( 's' => $search ), $type_url );
}

$attributes = isset( $_GET['gallery_type'] ) && $type === $_GET['gallery_type'] ? 'class="current" aria-current="page"' : '';

$views[$type] = '<a href="'. esc_url( $type_url ) .'" '. $attributes .' > ' . esc_html( $text ) . ' (' . esc_html( $count) . ') </a>';

}

return $views;
Expand Down
4 changes: 2 additions & 2 deletions includes/migrate/class-modula-ajax-migrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function add_image_to_library( $source_path, $source_file, $description,
global $wpdb;
$sql = $wpdb->prepare(
"SELECT * FROM $wpdb->posts WHERE guid LIKE %s",
'%/' . $source_file
'%/' . str_replace( '-scaled', '', $source_file )
);

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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "modula-best-grid-gallery",
"version": "2.9.4",
"version": "2.9.5",
"description": "Modula Image Gallery build tools",
"author": "WPChill",
"license": "GPL-2.0-or-later",
Expand Down
8 changes: 7 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.9.3
Stable tag: 2.9.5

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 @@ -154,6 +154,12 @@ Free support is included only with a PRO license: [Buy Modula PRO](https://wp-mo
4. Responsive galleries created with Modula

== Changelog ==

= 2.9.5 - 09.09.2024 =
Fixed: Compatibility with ACF Pro ( [#937]( https://github.com/WPChill/modula-lite/issues/937) )
Fixed: Not importing sourge-gallery captions for existing media images. ( [#904]( https://github.com/WPChill/modula-lite/issues/904) )
Fixed: Admin table listing error when searching for string containing %s. ( [#1036]( https://github.com/WPChill/modula-lite/issues/1036) )

= 2.9.4 - 30.08.2024 =
Removed: Build files from repository.

Expand Down

0 comments on commit 89cdd53

Please sign in to comment.