Skip to content
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: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog #

## v2.2.3 (September 16, 2026) ##

- Fix: Resolved content and display issues on the What's New page.

## v2.2.2 (September 15, 2026) ##

- Feat: Organize media into folders in bulk — the media library list view now has a "Move to folder…" bulk action, and each user's folder sidebar remembers its own open/closed state.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Tested up to: 7.1

Requires PHP: 7.4

Stable tag: 2.2.2
Stable tag: 2.2.3

License: [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)

Expand Down
4 changes: 2 additions & 2 deletions godam.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: GoDAM
* Plugin URI: https://godam.io
* Description: Seamlessly manage and deliver your media assets directly from the cloud-based media management. Store assets efficiently, stream them via a CDN, and enhance your website's performance and user experience. Featuring adaptive bit rate streaming, adding interactive layers in videos, and taking full advantage of a digital asset management solution within WordPress.
* Version: 2.2.2
* Version: 2.2.3
* Requires at least: 6.5
* Requires PHP: 7.4
* Text Domain: godam
Expand Down Expand Up @@ -43,7 +43,7 @@
/**
* The version of the plugin
*/
define( 'RTGODAM_VERSION', '2.2.2' );
define( 'RTGODAM_VERSION', '2.2.3' );
}

if ( ! defined( 'RTGODAM_API_BASE' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion languages/godam.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is distributed under the GPLv2 or later.
msgid ""
msgstr ""
"Project-Id-Version: GoDAM 2.2.2\n"
"Project-Id-Version: GoDAM 2.2.3\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/godam\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "godam",
"version": "2.2.2",
"version": "2.2.3",
"description": "A WordPress plugin to manage digital assets",
"private": true,
"author": "rtCamp",
Expand Down
17 changes: 5 additions & 12 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
=== GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more ===
Contributors: rtcamp, elifvish, subodhrajpopat, kuldipchaudhary, prachigarg19, juzar, geekofshire, nazmulhassann20, joelabreo, mi5t4n, abhinavbelhekar03, gautam23, mukulsingh27, hbhalodia, kishu7270, opurockey, utsavladani, whiteshadow01, ahmarzaidi, im3dabasia1, rudrakshigupta, sabbir1991, shreyasikhar26, akrocks
Tags: transcoder, video, media library, folders, file manager
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.2.2
Stable tag: 2.2.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -224,6 +224,10 @@

== Changelog ==

= v2.2.3 (September 16, 2026) =

- Fix: Resolved content and display issues on the What's New page.

= v2.2.2 (September 15, 2026) =

- Feat: Organize media into folders in bulk — the media library list view now has a "Move to folder…" bulk action, and each user's folder sidebar remembers its own open/closed state.
Expand All @@ -241,17 +245,6 @@
- Fix: Site Icon / favicon no longer 404s on sites using GoDAM CDN offload.
- Fix: Resolved open Dependabot security advisories (npm + Composer).

= v2.2.0 (August 27, 2026) =

- Feat: The Document block now handles far more than PDFs. You can embed and preview Word, Excel, PowerPoint, OpenDocument, and plain-text files.
- Feat: Added the same document preview support to the Elementor and WPBakery GoDAM Document widgets.
- Feat: Show in lightbox — a new option opens a video in a centered lightbox overlay when its poster is clicked, instead of playing it in place. Available in the GoDAM Video block, the Elementor widget, and the WPBakery element.
- Tweak: The GoDAM media transcoding tool now supports bulk transcoding of all media types supported by GoDAM.
- Fix: Resolved bugs in the GoDAM Media Library module.
- Fix: Fixed the transcription source issue for GoDAM videos.
- Fix: Layer analytics now records a view for each hotspot in its own right, so a hotspot's views, conversion, and "No Action" describe that hotspot rather than the whole layer. This stays correct even as hotspots are added or removed over time.


[CHECK THE FULL CHANGELOG](https://github.com/rtCamp/godam/blob/main/CHANGELOG.md)

== External Services ==
Expand Down
125 changes: 125 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,131 @@ function wp_parse_url( $url, $component = -1 ) {
class WP_REST_Controller {} // phpcs:ignore Universal.Files.SeparateFunctionsFromOO.Mixed
}

/*
* ---------------------------------------------------------------------------
* Stubs for the Release_Post caller boundary (ReleasePostFeatureParsingTest's
* get_release_post() test). The HTTP + transient responses are driven by
* $GLOBALS['rtgodam_stub'] so a test can feed a canned remote payload and force
* a cache miss, exercising the full fetch -> parse path without WordPress.
* ---------------------------------------------------------------------------
*/
if ( ! defined( 'RTGODAM_IO_API_BASE' ) ) {
define( 'RTGODAM_IO_API_BASE', 'https://godam.io' );
}

if ( ! class_exists( 'WP_Error' ) ) {
class WP_Error { // phpcs:ignore Universal.Files.SeparateFunctionsFromOO.Mixed
/**
* @param mixed $code Ignored.
* @param mixed $message Ignored.
* @param mixed $data Ignored.
*/
public function __construct( $code = '', $message = '', $data = '' ) {} // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed
}
}

if ( ! class_exists( 'WP_REST_Response' ) ) {
class WP_REST_Response { // phpcs:ignore Universal.Files.SeparateFunctionsFromOO.Mixed
/** @var mixed */
public $data;

/**
* @param mixed $data Response payload.
* @param int $status Ignored.
*/
public function __construct( $data = null, $status = 200 ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed
$this->data = $data;
}

/** @return mixed */
public function get_data() {
return $this->data;
}
}
}

if ( ! function_exists( 'wp_json_encode' ) ) {

/**
* @param mixed $data Data to encode.
* @return string|false
*/
function wp_json_encode( $data ) {
return json_encode( $data ); // phpcs:ignore WordPress.WP.AlternativeFunctions.json_encode_json_encode
}
}

if ( ! function_exists( 'is_wp_error' ) ) {

/**
* @param mixed $thing Value to test.
* @return bool
*/
function is_wp_error( $thing ) {
return $thing instanceof \WP_Error;
}
}

if ( ! function_exists( 'wp_remote_get' ) ) {

/**
* @param string $url Requested URL (recorded).
* @param array $args Ignored.
* @return mixed
*/
function wp_remote_get( $url, $args = array() ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed, WordPress.WP.AlternativeFunctions.wp_remote_get_wp_remote_get
$GLOBALS['rtgodam_stub']['last_remote_url'] = $url;
return $GLOBALS['rtgodam_stub']['remote_response'] ?? array();
}
}

if ( ! function_exists( 'wp_remote_retrieve_response_code' ) ) {

/**
* @param mixed $response Ignored; the code is supplied by the test.
* @return int
*/
function wp_remote_retrieve_response_code( $response ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
return (int) ( $GLOBALS['rtgodam_stub']['remote_code'] ?? 200 );
}
}

if ( ! function_exists( 'wp_remote_retrieve_body' ) ) {

/**
* @param mixed $response Ignored; the body is supplied by the test.
* @return string
*/
function wp_remote_retrieve_body( $response ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
return (string) ( $GLOBALS['rtgodam_stub']['remote_body'] ?? '' );
}
}

if ( ! function_exists( 'get_transient' ) ) {

/**
* @param string $key Transient key.
* @return mixed False on a miss.
*/
function get_transient( $key ) {
return $GLOBALS['rtgodam_stub']['transient'][ $key ] ?? false;
}
}

if ( ! function_exists( 'set_transient' ) ) {

/**
* @param string $key Transient key.
* @param mixed $value Value to store.
* @param int $expiration Ignored.
* @return true
*/
function set_transient( $key, $value, $expiration = 0 ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed
$GLOBALS['rtgodam_stub']['transient'][ $key ] = $value;
return true;
}
}

/*
* Hook registry and translation-recording stubs. These let the #465 guards
* assert behaviour — which hook a callback lands on, and whether anything
Expand Down
36 changes: 36 additions & 0 deletions tests/php/ReleasePostFeatureParsingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,42 @@ public function test_real_release_post_with_video_block_does_not_leak() {
$this->assertStringContainsString( 'just a click', $preview['description'] );
}

/**
* Caller-boundary guard: drive the public get_release_post() with a mocked
* remote response and a forced cache miss. This covers the fetch -> parse
* ordering, so if pre-parse sanitization is ever reintroduced in the caller,
* the real production case (a sibling <style>) leaks and this fails red.
*/
public function test_get_release_post_does_not_leak_at_caller_boundary() {
$fixture = file_get_contents( __DIR__ . '/../fixtures/release-post-godam-2-2.html' );
$body = wp_json_encode(
array(
array(
'content' => array( 'rendered' => $fixture ),
'_embedded' => array( 'wp:featuredmedia' => array( array( 'source_url' => 'https://example.com/featured.jpg' ) ) ),
),
)
);

$GLOBALS['rtgodam_stub']['remote_response'] = array( 'body' => $body );
$GLOBALS['rtgodam_stub']['remote_code'] = 200;
$GLOBALS['rtgodam_stub']['remote_body'] = $body;
$GLOBALS['rtgodam_stub']['transient'] = array(); // Force a cache miss.

$ref = new \ReflectionClass( Release_Post::class );
$object = $ref->newInstanceWithoutConstructor();
$response = $object->get_release_post();
$data = $response->get_data();

$this->assertNotEmpty( $data['features'] );
foreach ( $data['features'] as $feature ) {
$this->assertStringNotContainsString( '.godam-video-placeholder', $feature['description'] );
$this->assertStringNotContainsString( '<style', $feature['description'] );
$this->assertStringNotContainsString( 'wp-block-godam-video', $feature['description'] );
}
$this->assertContains( 'Preview in one click', array_column( $data['features'], 'title' ) );
}

/**
* The genuine red-without-fix guard: a <style> nested INSIDE a collected
* <p>. The pre-fix parser gathered the paragraph and wp_kses_post() then
Expand Down
Loading