diff --git a/README.md b/README.md index d6c1bc23b..733dc0de9 100755 --- a/README.md +++ b/README.md @@ -152,6 +152,13 @@ https://www.youtube.com/watch?v=dJrykKQGDcs ## Changelog ## +### 4.6.20 [August 02, 2024] ### + +* Fixed + + * Fixes related PHP 8.2 compatibility issues. + + ### 4.6.19 [April 16, 2024] ### * Fixed * Fixed shortcode security issue. diff --git a/app/importers/BPMediaAlbumimporter.php b/app/importers/BPMediaAlbumimporter.php index 9e200c02d..95b06867c 100755 --- a/app/importers/BPMediaAlbumimporter.php +++ b/app/importers/BPMediaAlbumimporter.php @@ -222,9 +222,14 @@ public function ui() { * * @return mixed */ - public function create_album( $author_id, $album_name = 'Imported Media' ) { + public function create_album( $album_name = '', $author_id = 1 ) { global $bp_media, $wpdb; + // Set album_name to 'Imported Media' if it is empty. + if ( empty( $album_name ) ) { + $album_name = 'Imported Media'; + } + if ( array_key_exists( 'bp_album_import_name', $bp_media->options ) ) { if ( '' !== $bp_media->options['bp_album_import_name'] ) { $album_name = $bp_media->options['bp_album_import_name']; diff --git a/index.php b/index.php index 173aae8d8..3f6318cdb 100755 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: rtMedia for WordPress, BuddyPress and bbPress * Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media * Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously! - * Version: 4.6.19 + * Version: 4.6.20 * Author: rtCamp * Text Domain: buddypress-media * Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media @@ -19,7 +19,7 @@ /** * The version of the plugin */ - define( 'RTMEDIA_VERSION', '4.6.19' ); + define( 'RTMEDIA_VERSION', '4.6.20' ); } if ( ! defined( 'RTMEDIA_PATH' ) ) { diff --git a/languages/buddypress-media.po b/languages/buddypress-media.po index 53405113b..63d8c00b8 100644 --- a/languages/buddypress-media.po +++ b/languages/buddypress-media.po @@ -2,9 +2,9 @@ # This file is distributed under the same license as the rtMedia for WordPress, BuddyPress and bbPress package. msgid "" msgstr "" -"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.6.19\n" +"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.6.20\n" "Report-Msgid-Bugs-To: https://rtmedia.io/support/\n" -"POT-Creation-Date: 2024-04-16 07:27:16+00:00\n" +"POT-Creation-Date: 2024-08-02 08:51:53+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/lib/deactivation-survey/deactivation-survey.php b/lib/deactivation-survey/deactivation-survey.php index 203918c82..e17f846de 100644 --- a/lib/deactivation-survey/deactivation-survey.php +++ b/lib/deactivation-survey/deactivation-survey.php @@ -44,9 +44,9 @@ public function load_scripts() { 'It\'s not what I was looking for.', 'The plugin didn\'t work as expected.', ]; - + $current_user = wp_get_current_user(); - + $rt_deactivate = [ 'home_url' => home_url(), 'admin_url' => admin_url(), @@ -57,7 +57,7 @@ public function load_scripts() { 'user_email' => $current_user->user_email, 'header_text' => esc_html__( 'If you have a moment, please let us know why you are deactivating: ', 'buddypress-media' ) ]; - + wp_localize_script( 'rt-deactivation-survey', 'rtDeactivate', $rt_deactivate ); } } @@ -100,7 +100,7 @@ public function rt_send_deactivation_feedback() { 'body' => $data, 'headers' => [ 'Content-type' => "application/x-www-form-urlencoded", - 'Authorization' => "Basic " . base64_encode("${auth_user}:${auth_password}") + 'Authorization' => "Basic " . base64_encode("{$auth_user}:{$auth_password}") ], 'timeout' => 60, 'redirection' => 5, @@ -111,7 +111,7 @@ public function rt_send_deactivation_feedback() { $api_response = wp_remote_post( $this->api_url . '/survey', $options ); $response = json_decode( wp_remote_retrieve_body( $api_response ) ); - + if ( 'integer' === gettype( $response ) ) { echo wp_json_encode( 'success' ); wp_die(); diff --git a/readme.txt b/readme.txt index afca81ea5..72ce96742 100755 --- a/readme.txt +++ b/readme.txt @@ -4,8 +4,8 @@ Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, i License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Requires at least: WordPress 4.1 -Tested up to: 6.4.2 -Stable tag: 4.6.19 +Tested up to: 6.6 +Stable tag: 4.6.20 Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices. @@ -133,6 +133,12 @@ http://www.youtube.com/watch?v=dJrykKQGDcs == Changelog == += 4.6.20 [August 02, 2024] = + +* Fixed + + * Fixes related PHP 8.2 compatibility issues. + = 4.6.19 [April 16, 2024] = * Fixed