Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f7c68ae
fix: replace blurry logo with updated logo
NoumaanAhamed Nov 21, 2025
da0108e
feat: reorganize E2E tests
NoumaanAhamed Nov 24, 2025
1640191
feat(tests) : rename tests and make them verbose
NoumaanAhamed Nov 24, 2025
176c013
feat(tests) : refine and improve tests
NoumaanAhamed Nov 24, 2025
3821fc5
fix: revert back the playwright config
NoumaanAhamed Nov 24, 2025
2315ed2
fix: revert back the original file names
NoumaanAhamed Nov 24, 2025
18dbae6
fix: add ci playwright script
NoumaanAhamed Nov 24, 2025
507b3ab
fix(tests): update playwright test script for development
NoumaanAhamed Nov 25, 2025
56f5229
fix(tests): update integration tests for BuddyPress features and add …
NoumaanAhamed Nov 25, 2025
7dd7282
fix(tests): enhance cleanup and prerequisite tests, update media size…
NoumaanAhamed Nov 25, 2025
30b958b
fix: Improve handling of import/export settings responses and JSON pa…
NoumaanAhamed Nov 27, 2025
380f6f2
fix: Ensure tabs.js is always enqueued as a dependency for admin scripts
NoumaanAhamed Nov 27, 2025
c9c8615
fix: Add settings.js to build process for admin scripts
NoumaanAhamed Nov 27, 2025
e262bdf
fix(tests): enhance single media view tests for Masonry validation
NoumaanAhamed Nov 28, 2025
10af0c1
fix(build): Upload new build JS files.
NoumaanAhamed Nov 28, 2025
c9a5e8c
fix(tests): correct validation messages and typos
NoumaanAhamed Nov 28, 2025
a0fd8a5
fix(tests): correct typo in uploadMedia method
NoumaanAhamed Nov 28, 2025
f6acbc7
feat(docs): add minimal test doc
NoumaanAhamed Nov 28, 2025
d666f4e
fix: Extend theme support to minimal classic themes like Hello Elementor
NoumaanAhamed Dec 1, 2025
1ec44cc
fix: Enhance masonry layout checks and improve reload handling
NoumaanAhamed Dec 1, 2025
015ddbd
fix(build): Add the generated build file
NoumaanAhamed Dec 1, 2025
2062afd
Merge pull request #2226 from rtCamp/fix/theme-media-not-found
NoumaanAhamed Dec 1, 2025
b0bd8bc
Merge pull request #2218 from rtCamp/fix/rtmedia-blurry-logo
NoumaanAhamed Dec 3, 2025
8bffe18
Merge pull request #2222 from rtCamp/fix/dashboard-build-files
NoumaanAhamed Dec 3, 2025
89fb7b3
fix: Refactor masonry layout checks to use rtm_is_true
NoumaanAhamed Dec 3, 2025
05cebf6
fix(build) : Add the new build file
NoumaanAhamed Dec 3, 2025
edceb52
Merge pull request #2219 from rtCamp/fix/update-playwright-tests-specs
NoumaanAhamed Dec 3, 2025
443f686
Merge branch 'develop' into fix/buddyx-masonry-script
NoumaanAhamed Dec 3, 2025
05b62f3
Merge pull request #2227 from rtCamp/fix/buddyx-masonry-script
NoumaanAhamed Dec 3, 2025
85544a1
Version update v4.7.7
NoumaanAhamed Dec 3, 2025
6d514d3
fix(docs): correct typo
NoumaanAhamed Dec 3, 2025
d654e5e
Merge pull request #2235 from rtCamp/version-update/v4.7.7
NoumaanAhamed Dec 3, 2025
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
7 changes: 5 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = function (grunt) {
tasks: ['shell:postcss']
},
js: {
files: ['app/assets/js/rtMedia.js', 'app/assets/admin/js/scripts.js'],
files: ['app/assets/js/rtMedia.js', 'app/assets/admin/js/scripts.js', 'app/assets/admin/js/settings.js'],
tasks: ['terser']
}
},
Expand Down Expand Up @@ -60,7 +60,10 @@ module.exports = function (grunt) {
},
backend: {
files: {
'app/assets/admin/js/admin.min.js': ['app/assets/admin/js/scripts.js']
'app/assets/admin/js/admin.min.js': [
'app/assets/admin/js/scripts.js',
'app/assets/admin/js/settings.js'
]
}
},
godam: {
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,17 @@ https://www.youtube.com/watch?v=dJrykKQGDcs

## Changelog ##

### 4.7.7

* FIXED
* Fix JS Build process breaking Admin dashboard.
* Fix rtMedia compatibility with Hello Elementor theme.
* Fix Masonry script issue in rtMedia Gallery in BuddyX theme.

* ENHANCEMENT
* Enhanced End to End playwright testing scripts for media validation.
* Improved rtMedia Logo visibility on dashboard.

### 4.7.6

* FIXED
Expand Down
8 changes: 5 additions & 3 deletions app/admin/RTMediaAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -777,13 +777,15 @@ public function ui( $hook ) {

$admin_ajax = admin_url( 'admin-ajax.php' );

// Always enqueue tabs.js as it's a dependency for admin scripts (provides rtTab jQuery plugin).
wp_enqueue_script( 'rtmedia-admin-tabs', RTMEDIA_URL . 'app/assets/admin/js/vendors/tabs.js', array( 'backbone' ), RTMEDIA_VERSION, true );

/* Only one JS file should enqueue */
if ( '' === $suffix ) {
wp_enqueue_script( 'rtmedia-admin-tabs', RTMEDIA_URL . 'app/assets/admin/js/vendors/tabs.js', array( 'backbone' ), RTMEDIA_VERSION, true );
wp_enqueue_script( 'rtmedia-admin-scripts', RTMEDIA_URL . 'app/assets/admin/js/scripts.js', array( 'backbone' ), RTMEDIA_VERSION, true );
wp_enqueue_script( 'rtmedia-admin-scripts', RTMEDIA_URL . 'app/assets/admin/js/scripts.js', array( 'rtmedia-admin-tabs', 'backbone' ), RTMEDIA_VERSION, true );
wp_enqueue_script( 'rtmedia-admin', RTMEDIA_URL . 'app/assets/admin/js/settings.js', array( 'backbone', 'wp-util' ), RTMEDIA_VERSION, true );
} else {
wp_enqueue_script( 'rtmedia-admin', RTMEDIA_URL . 'app/assets/admin/js/admin.min.js', array( 'backbone', 'wp-util' ), RTMEDIA_VERSION, true );
wp_enqueue_script( 'rtmedia-admin', RTMEDIA_URL . 'app/assets/admin/js/admin.min.js', array( 'rtmedia-admin-tabs', 'backbone', 'wp-util' ), RTMEDIA_VERSION, true );
}

// Enqueue JS file for GoDAM notice show/hide.
Expand Down
Binary file modified app/assets/admin/img/rtmedia-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions app/assets/admin/js/admin.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/admin/js/rtmedia-admin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions app/assets/admin/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1066,11 +1066,15 @@ jQuery( document ).ready( function ( $ ) {
jQuery('.rtm-button-container.top').append( setting_message );
setting_message.delay( 3000 ).fadeOut( 100 );
}
// Return early for import/export settings responses to avoid JSON.parse on already-parsed object.
return;
}

if ( typeof data.error === 'undefined' ) {

data = JSON.parse( data );
// Only parse if data is a string (not already parsed by jQuery).
if ( typeof data === 'string' ) {
data = JSON.parse( data );
}
if ( data.exceed_size_msg ) {
jQuery( '#debuglog' ).val( '' );
alert( data.exceed_size_msg );
Expand Down
7 changes: 1 addition & 6 deletions app/assets/js/admin-upload-terms.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 29 additions & 9 deletions app/assets/js/rtMedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,9 @@ jQuery("document").ready(function ($) {
"get_single_activity_content" === get_action ||
"activity_get_older_updates" === get_action) &&
"undefined" !== typeof rtmedia_masonry_layout &&
"true" === rtmedia_masonry_layout &&
rtm_is_true(rtmedia_masonry_layout) &&
"undefined" !== typeof rtmedia_masonry_layout_activity &&
"true" === rtmedia_masonry_layout_activity
rtm_is_true(rtmedia_masonry_layout_activity)
) {
setTimeout(function () {
apply_rtMagnificPopup(
Expand Down Expand Up @@ -1066,9 +1066,9 @@ jQuery("document").ready(function ($) {
// Masonry code for activity
if (
typeof rtmedia_masonry_layout != "undefined" &&
rtmedia_masonry_layout == "true" &&
rtm_is_true(rtmedia_masonry_layout) &&
typeof rtmedia_masonry_layout_activity != "undefined" &&
rtmedia_masonry_layout_activity == "true"
rtm_is_true(rtmedia_masonry_layout_activity)
) {
// Arrange media into masonry view
rtmedia_activity_masonry();
Expand All @@ -1083,9 +1083,9 @@ jQuery("document").ready(function ($) {
"get_single_activity_content" === get_action ||
"activity_get_older_updates" === get_action) &&
typeof rtmedia_masonry_layout != "undefined" &&
rtmedia_masonry_layout == "true" &&
rtm_is_true(rtmedia_masonry_layout) &&
typeof rtmedia_masonry_layout_activity != "undefined" &&
rtmedia_masonry_layout_activity == "true"
rtm_is_true(rtmedia_masonry_layout_activity)
) {
rtmedia_activity_masonry();
}
Expand All @@ -1094,7 +1094,7 @@ jQuery("document").ready(function ($) {
// Masonry code
if (
typeof rtmedia_masonry_layout != "undefined" &&
rtmedia_masonry_layout == "true" &&
rtm_is_true(rtmedia_masonry_layout) &&
jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length == 0
) {
rtm_masonry_container = jQuery(".rtmedia-container .rtmedia-list");
Expand Down Expand Up @@ -1191,7 +1191,7 @@ jQuery("document").ready(function ($) {

if (
"undefined" !== typeof rtmedia_masonry_layout &&
"true" === rtmedia_masonry_layout
rtm_is_true(rtmedia_masonry_layout)
) {
rtm_masonry_reload(rtm_masonry_container);
}
Expand Down Expand Up @@ -1232,6 +1232,16 @@ function bp_media_create_element(id) {
return false;
}

/**
* Check if a value is true (handles both string "true" and boolean true).
*
* @param {*} value The value to check.
* @return {boolean} True if the value is "true" (string) or true (boolean).
*/
function rtm_is_true(value) {
return "true" === value || true === value;
}

function rtmedia_version_compare(left, right) {
if (typeof left + typeof right != "stringstring") {
return false;
Expand Down Expand Up @@ -1270,7 +1280,17 @@ function rtm_is_element_exist(el) {
function rtm_masonry_reload(el) {
setTimeout(function () {
// We make masonry recalculate the element based on their current state.
el.masonry("reload");
// Check if masonry instance exists and use the appropriate method.
var masonryInstance = el.data('masonry');
if (masonryInstance) {
// Masonry v4.x uses reloadItems() + layout() instead of reload()
if (typeof masonryInstance.reload === 'function') {
el.masonry("reload");
} else if (typeof masonryInstance.reloadItems === 'function') {
masonryInstance.reloadItems();
masonryInstance.layout();
}
}
}, 250);
}

Expand Down
2 changes: 1 addition & 1 deletion app/assets/js/rtmedia.min.js

Large diffs are not rendered by default.

27 changes: 16 additions & 11 deletions app/main/routers/RTMediaRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,18 @@ public function rt_replace_the_content( $content = '' ) {
}

/**
* "the_content" filter won't work on FSE themes e.g Twenty Twenty-Tow.
* The following add supports for block theme.
* "the_content" filter won't work on FSE themes e.g Twenty Twenty-Two.
* The following adds support for block themes.
*
* @param string $content Content.
* @param array $parsed_block blocks.
*
* @return string $content
*/
public function rt_replace_the_content_fse( $content, $parsed_block ) {
if ( 'core/post-template' === $parsed_block['blockName'] ) {
// core/post-template: Used in archive/query loop templates.
// core/post-content: Used in single post/page templates.
if ( 'core/post-template' === $parsed_block['blockName'] || 'core/post-content' === $parsed_block['blockName'] ) {
return $this->rt_replace_the_content();
}

Expand Down Expand Up @@ -294,7 +296,8 @@ public function rt_theme_compat_reset_post( $args = array() ) {

'is_404' => false,
'is_page' => false,
'is_single' => false,
'is_single' => true,
'is_singular' => true,
'is_archive' => false,
'is_tax' => false,
)
Expand Down Expand Up @@ -329,7 +332,8 @@ public function rt_theme_compat_reset_post( $args = array() ) {
'filter' => 'raw',
'is_404' => false,
'is_page' => false,
'is_single' => false,
'is_single' => true,
'is_singular' => true,
'is_archive' => false,
'is_tax' => false,
)
Expand Down Expand Up @@ -393,12 +397,13 @@ public function rt_theme_compat_reset_post( $args = array() ) {
$wp_query->posts = array( $post );

// Prevent comments form from appearing.
$wp_query->post_count = 1;
$wp_query->is_404 = $dummy['is_404'];
$wp_query->is_page = $dummy['is_page'];
$wp_query->is_single = $dummy['is_single'];
$wp_query->is_archive = $dummy['is_archive'];
$wp_query->is_tax = $dummy['is_tax'];
$wp_query->post_count = 1;
$wp_query->is_404 = $dummy['is_404'];
$wp_query->is_page = $dummy['is_page'];
$wp_query->is_single = $dummy['is_single'];
$wp_query->is_singular = $dummy['is_singular'];
$wp_query->is_archive = $dummy['is_archive'];
$wp_query->is_tax = $dummy['is_tax'];

// Clean up the dummy post.
unset( $dummy );
Expand Down
Loading
Loading