From 90bd5e9c40e3a5df3bf53d7b33b337fa32946d27 Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 30 May 2025 16:59:36 +0530 Subject: [PATCH 01/12] update dashboard admin notice --- admin/rt-transcoder-admin.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/admin/rt-transcoder-admin.php b/admin/rt-transcoder-admin.php index bcd1c33..aaedd19 100755 --- a/admin/rt-transcoder-admin.php +++ b/admin/rt-transcoder-admin.php @@ -69,6 +69,7 @@ public function __construct() { include_once RT_TRANSCODER_PATH . 'admin/rt-transcoder-actions.php'; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts_styles' ) ); + add_action( 'admin_notices', [ $this, 'show_transcoding_disabled_notice' ], 12 ); add_filter( 'attachment_fields_to_edit', array( $this, 'edit_video_thumbnail' ), 11, 2 ); add_filter( 'attachment_fields_to_save', array( $this, 'save_video_thumbnail' ), 11, 1 ); @@ -523,7 +524,7 @@ public function install_godam_admin_notice() { ? network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' ) : admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' ); - $class = 'notice notice-warning'; + $class = 'notice notice-error'; $valid_tags = array( 'div' => array( 'class' => array(), 'id' => array() ), 'p' => array(), @@ -534,7 +535,10 @@ public function install_godam_admin_notice() { printf( wp_kses( - __( '

NOTICE: Transcoder plugin will be retired on May 31, 2025. We recommend removing this plugin and switching to our new plugin, GoDAM which includes powerful Digital Asset Management features along with video transcoding services. Install GoDAM now!

', 'transcoder' ), + __( + '

NOTICE: Starting 1st June 2025, the Transcoder plugin will stop working. To continue using video transcoding, switch to our new plugin, GoDAM which offers powerful Digital Asset Management and transcoding features. Install GoDAM now!

', + 'transcoder' + ), $valid_tags ), esc_attr( $class ), @@ -548,4 +552,13 @@ public function install_godam_admin_notice() { public function enqueue_thickbox_on_transcoder_settings() { add_thickbox(); } + + public function show_transcoding_disabled_notice() { + $screen = get_current_screen(); + if ( $screen && 'upload' === $screen->id ) { + echo '
'; + echo '

Transcoding has been disabled. Please use GoDAM for media processing.

'; + echo '
'; + } + } } From fa661ccccc68317722413a11325d822bdb8cd182 Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 30 May 2025 17:00:40 +0530 Subject: [PATCH 02/12] update notices for license activation --- admin/rt-transcoder-handler.php | 61 +++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/admin/rt-transcoder-handler.php b/admin/rt-transcoder-handler.php index c155f2e..104727c 100755 --- a/admin/rt-transcoder-handler.php +++ b/admin/rt-transcoder-handler.php @@ -195,6 +195,9 @@ public function __construct( $no_init = false ) { * @param string $autoformat If true then generating thumbs only else trancode video. */ public function wp_media_transcoding( $wp_metadata, $attachment_id, $autoformat = true ) { + + return $wp_metadata; + if ( empty( $wp_metadata['mime_type'] ) ) { return $wp_metadata; } @@ -584,20 +587,28 @@ public function allowed_types_admin_settings( $types ) { public function successfully_subscribed_notice() { ?>
-

- array(), - ) +

+ GoDAM'; + + $api_key_updated = transcoder_filter_input( INPUT_GET, 'api-key-updated', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); + + printf( + wp_kses( + /* translators: %s is the GoDAM plugin link */ + __( 'You have successfully subscribed. However, transcoding via transcoder has been discontinued. Please use %s for continued transcoding services.', 'transcoder' ), + array( + 'a' => array( + 'href' => array(), + 'target' => array(), ), - esc_html( sanitize_text_field( wp_unslash( $api_key_updated ) ) ) - ); - ?> -

+ 'strong' => array(), + ) + ), + $godam_link + ); + ?> +

- + GoDAM'; + + printf( + wp_kses( + __( 'This license key is invalid. Transcoding is now supported via our new plugin, %s.', 'transcoder' ), + [ + 'a' => [ + 'href' => [], + 'target' => [], + ], + ] + ), + $godam_link + ); + ?>

error_code ) && ! empty( $status_info->error_msg ) ) { - $message = $messages['failed']; + // New custom handling for error code 301 + if ( (int) $status_info->error_code === 301 ) { + $message = __( 'Transcoding through Transcoder is disabled. Please use GoDAM instead.', 'transcoder' ); + } else { + $message = $messages['failed']; + } } elseif ( ! empty( $status_info ) && 'processing' === $status_info->status && empty( $status_info->error_code ) && empty( $status_info->error_msg ) ) { From 8a1c4e9e78a9b74b78e54845a94309f957ed5502 Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 30 May 2025 17:07:21 +0530 Subject: [PATCH 03/12] add admin notice on the media uploads page --- admin/rt-transcoder-admin.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/admin/rt-transcoder-admin.php b/admin/rt-transcoder-admin.php index aaedd19..8eccda4 100755 --- a/admin/rt-transcoder-admin.php +++ b/admin/rt-transcoder-admin.php @@ -555,10 +555,25 @@ public function enqueue_thickbox_on_transcoder_settings() { public function show_transcoding_disabled_notice() { $screen = get_current_screen(); + if ( $screen && 'upload' === $screen->id ) { - echo '
'; - echo '

Transcoding has been disabled. Please use GoDAM for media processing.

'; - echo '
'; + $link = 'https://godam.io/?utm_source=transcoder-plugin&utm_medium=media-library-notice&utm_campaign=transcoding-disabled'; + $notice = sprintf( + wp_kses( + /* translators: %s: link to GoDAM plugin */ + __( 'Transcoding is no longer available through transcoder. For continued media processing, please install our new plugin, GoDAM.', 'transcoder' ), + array( + 'strong' => array(), + 'a' => array( + 'href' => array(), + 'target' => array(), + ), + ) + ), + esc_url( $link ) + ); + + echo '

' . $notice . '

'; } } } From 7b6297bcdba900f9adec911ce1889c58bac037fd Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 30 May 2025 17:15:27 +0530 Subject: [PATCH 04/12] add transcoding status msg for code 301 --- admin/rt-transcoder-handler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/rt-transcoder-handler.php b/admin/rt-transcoder-handler.php index 104727c..b6a1755 100755 --- a/admin/rt-transcoder-handler.php +++ b/admin/rt-transcoder-handler.php @@ -1541,9 +1541,9 @@ public function get_transcoding_status( $post_id ) { } elseif ( ! empty( $status_info ) && ! empty( $status_info->error_code ) && ! empty( $status_info->error_msg ) ) { - // New custom handling for error code 301 + // Custom handling error code 301. if ( (int) $status_info->error_code === 301 ) { - $message = __( 'Transcoding through Transcoder is disabled. Please use GoDAM instead.', 'transcoder' ); + $message = __( 'Transcoding through Transcoder is disabled. Please install GoDAM', 'transcoder' ); } else { $message = $messages['failed']; } From 16840d65972e17a1f785c21843e1234dc4f23a23 Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 30 May 2025 17:46:47 +0530 Subject: [PATCH 05/12] add modal trigger to the notice on uploads page --- admin/rt-transcoder-admin.php | 45 ++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/admin/rt-transcoder-admin.php b/admin/rt-transcoder-admin.php index 8eccda4..5380c58 100755 --- a/admin/rt-transcoder-admin.php +++ b/admin/rt-transcoder-admin.php @@ -557,23 +557,36 @@ public function show_transcoding_disabled_notice() { $screen = get_current_screen(); if ( $screen && 'upload' === $screen->id ) { - $link = 'https://godam.io/?utm_source=transcoder-plugin&utm_medium=media-library-notice&utm_campaign=transcoding-disabled'; - $notice = sprintf( - wp_kses( - /* translators: %s: link to GoDAM plugin */ - __( 'Transcoding is no longer available through transcoder. For continued media processing, please install our new plugin, GoDAM.', 'transcoder' ), - array( - 'strong' => array(), - 'a' => array( - 'href' => array(), - 'target' => array(), - ), - ) - ), - esc_url( $link ) + $info_link = 'https://godam.io/?utm_source=transcoder-plugin&utm_medium=media-library-notice&utm_campaign=transcoding-disabled'; + $plugin_slug = 'godam'; + $plugin_modal_url = is_multisite() + ? network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' ) + : admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' ); + + printf( + '

%s

', + sprintf( + wp_kses( + /* translators: %1$s: GoDAM website link, %2$s: GoDAM plugin modal URL */ + __( 'Transcoding is no longer available through Transcoder. For continued media processing, please install our new GoDAM plugin.', 'transcoder' ), + array( + 'span' => array( + 'class' => array(), + 'style' => array(), + ), + 'strong' => array(), + 'a' => array( + 'href' => array(), + 'class' => array(), + 'target' => array(), + ), + ) + ), + esc_url( $info_link ), + esc_url( $plugin_modal_url ) + ) ); - - echo '

' . $notice . '

'; } } + } From 0f8c8f5171f5371163fcd55bbc757417e2d3a577 Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 30 May 2025 18:09:02 +0530 Subject: [PATCH 06/12] update invalid license key message --- admin/rt-transcoder-handler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/rt-transcoder-handler.php b/admin/rt-transcoder-handler.php index b6a1755..52c7949 100755 --- a/admin/rt-transcoder-handler.php +++ b/admin/rt-transcoder-handler.php @@ -623,11 +623,11 @@ public function invalid_license_notice() {

GoDAM'; + $godam_link = 'GoDAM'; printf( wp_kses( - __( 'This license key is invalid. Transcoding is now supported via our new plugin, %s.', 'transcoder' ), + __( 'This license key is invalid. Transcoding is now supported via our %s services.', 'transcoder' ), [ 'a' => [ 'href' => [], From 620f4c45f1763047fcd92ee887d3d3035ee8feb8 Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 30 May 2025 18:10:45 +0530 Subject: [PATCH 07/12] updating url to pricing page for valid license key --- admin/rt-transcoder-actions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/rt-transcoder-actions.php b/admin/rt-transcoder-actions.php index d5322d7..daefe72 100644 --- a/admin/rt-transcoder-actions.php +++ b/admin/rt-transcoder-actions.php @@ -163,6 +163,7 @@ function rtt_rtmedia_vedio_editor_content() { add_action( 'rtmedia_add_edit_tab_content', 'rtt_rtmedia_vedio_editor_content', 1000 ); if ( ! function_exists( 'rtt_set_video_thumbnail' ) ) { + error_log('inside transcoder'); /** * Set the video thumbnail From 6ed842e0d9cd1adfff5c0b5ec16f51e0403974ae Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 30 May 2025 18:16:46 +0530 Subject: [PATCH 08/12] update the notice for the uploads page --- admin/rt-transcoder-admin.php | 50 ++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/admin/rt-transcoder-admin.php b/admin/rt-transcoder-admin.php index 5380c58..0fe3c2b 100755 --- a/admin/rt-transcoder-admin.php +++ b/admin/rt-transcoder-admin.php @@ -553,40 +553,42 @@ public function enqueue_thickbox_on_transcoder_settings() { add_thickbox(); } + /** + * Display a notice in the Media Library indicating that the Transcoder plugin + * no longer provides transcoding functionality and suggesting users subscribe + * to the GoDAM service instead. + * + * This notice only appears on the "Media > Library" page (`upload` screen). + * + * @since 2.0.0 + */ public function show_transcoding_disabled_notice() { $screen = get_current_screen(); if ( $screen && 'upload' === $screen->id ) { - $info_link = 'https://godam.io/?utm_source=transcoder-plugin&utm_medium=media-library-notice&utm_campaign=transcoding-disabled'; - $plugin_slug = 'godam'; - $plugin_modal_url = is_multisite() - ? network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' ) - : admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' ); + $info_link = 'https://godam.io/pricing/?utm_source=transcoder-plugin&utm_medium=media-library-notice&utm_campaign=transcoding-disabled'; printf( '

%s

', - sprintf( - wp_kses( - /* translators: %1$s: GoDAM website link, %2$s: GoDAM plugin modal URL */ - __( 'Transcoding is no longer available through Transcoder. For continued media processing, please install our new GoDAM plugin.', 'transcoder' ), - array( - 'span' => array( - 'class' => array(), - 'style' => array(), - ), - 'strong' => array(), - 'a' => array( - 'href' => array(), - 'class' => array(), - 'target' => array(), - ), - ) + wp_kses( + sprintf( + /* translators: %s: GoDAM pricing link */ + __( 'Transcoding is no longer available through Transcoder. For continued media processing, please subscribe to our GoDAM services.', 'transcoder' ), + esc_url( $info_link ) ), - esc_url( $info_link ), - esc_url( $plugin_modal_url ) + array( + 'span' => array( + 'class' => array(), + 'style' => array(), + ), + 'strong' => array(), + 'a' => array( + 'href' => array(), + 'target' => array(), + ), + ) ) ); } } - } From c9152b36872b26ccd1a9a9b50a575ef121c718d5 Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 30 May 2025 20:40:48 +0530 Subject: [PATCH 09/12] update notice appearing on the main dashboard page --- admin/rt-transcoder-admin.php | 68 ++++++++++++++++++++------------- admin/rt-transcoder-handler.php | 4 +- 2 files changed, 44 insertions(+), 28 deletions(-) diff --git a/admin/rt-transcoder-admin.php b/admin/rt-transcoder-admin.php index 0fe3c2b..3a7f6c2 100755 --- a/admin/rt-transcoder-admin.php +++ b/admin/rt-transcoder-admin.php @@ -487,9 +487,6 @@ public function mediaelement_add_class( $output, $url ) { return sprintf( '%1$s', esc_url( $url ) ); } - /** - * Display GoDAM installation recommendation admin notice on specific pages. - */ public function install_godam_admin_notice() { $current_screen = get_current_screen(); @@ -502,15 +499,14 @@ public function install_godam_admin_notice() { 'plugins-network' ); - // Check if we’re on allowed page using screen ID or $_GET['page'] + // Check if we're on allowed page using screen ID or $_GET['page'] $current_page = isset( $_GET['page'] ) ? $_GET['page'] : ''; - $screen_id = isset( $current_screen->id ) ? $current_screen->id : ''; + $screen_id = isset( $current_screen->id ) ? $current_screen->id : ''; // Skip if not in our allowed pages - if ( - ( ! in_array( $current_page, $allowed_pages, true ) && ! in_array( $screen_id, $allowed_pages, true ) ) || - get_user_meta( get_current_user_id(), '_godam_notice_dismissed', true ) - ) { + if ( ( ! in_array( $current_page, $allowed_pages, true ) && + ! in_array( $screen_id, $allowed_pages, true ) ) || + get_user_meta( get_current_user_id(), '_godam_notice_dismissed', true ) ) { return; } @@ -520,27 +516,47 @@ public function install_godam_admin_notice() { } $plugin_slug = 'godam'; - $plugin_modal_url = is_multisite() - ? network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' ) - : admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' ); + $plugin_modal_url = is_multisite() ? + network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' ) : + admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' ); $class = 'notice notice-error'; - $valid_tags = array( - 'div' => array( 'class' => array(), 'id' => array() ), - 'p' => array(), - 'strong' => array(), - 'a' => array( 'href' => array(), 'class' => array(), 'target' => array() ), - 'span' => array( 'class' => array(), 'style' => array() ), - ); printf( - wp_kses( - __( - '

NOTICE: Starting 1st June 2025, the Transcoder plugin will stop working. To continue using video transcoding, switch to our new plugin, GoDAM which offers powerful Digital Asset Management and transcoding features. Install GoDAM now!

', - 'transcoder' - ), - $valid_tags - ), + '
+
+ +
+ + +
+ + +
+ +
+ Transcoding via the Transcoder plugin is disabled from June 1st, 2025. +
+ + +

+ Switch to the GoDAM services for advanced Digital Asset Management and seamless video transcoding. Subscribe to a GoDAM plan to maintain access to transcoding services. +

+ + + + +
+
+
', esc_attr( $class ), esc_url( $plugin_modal_url ) ); diff --git a/admin/rt-transcoder-handler.php b/admin/rt-transcoder-handler.php index 52c7949..e0024c7 100755 --- a/admin/rt-transcoder-handler.php +++ b/admin/rt-transcoder-handler.php @@ -589,7 +589,7 @@ public function successfully_subscribed_notice() {

GoDAM'; + $godam_link = 'GoDAM'; $api_key_updated = transcoder_filter_input( INPUT_GET, 'api-key-updated', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); @@ -623,7 +623,7 @@ public function invalid_license_notice() {

GoDAM'; + $godam_link = 'GoDAM'; printf( wp_kses( From 78e374b3ace8912fb4047a1f3ecc6a97b992cd16 Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 30 May 2025 21:00:45 +0530 Subject: [PATCH 10/12] update the description in the main notice --- admin/rt-transcoder-admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/rt-transcoder-admin.php b/admin/rt-transcoder-admin.php index 3a7f6c2..0de7ab1 100755 --- a/admin/rt-transcoder-admin.php +++ b/admin/rt-transcoder-admin.php @@ -540,7 +540,7 @@ public function install_godam_admin_notice() {

- Switch to the GoDAM services for advanced Digital Asset Management and seamless video transcoding. Subscribe to a GoDAM plan to maintain access to transcoding services. + Switch to the GoDAM services for advanced Digital Asset Management and seamless video transcoding. Subscribe to a GoDAM plan to maintain access to transcoding services. Please deactivate and delete the transcoder plugin once GoDAM plugin is installed.

From cc9bef65a75f76bd018048096f6ef0c349aecf25 Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 30 May 2025 21:15:39 +0530 Subject: [PATCH 11/12] remove error log --- admin/rt-transcoder-actions.php | 1 - 1 file changed, 1 deletion(-) diff --git a/admin/rt-transcoder-actions.php b/admin/rt-transcoder-actions.php index daefe72..d5322d7 100644 --- a/admin/rt-transcoder-actions.php +++ b/admin/rt-transcoder-actions.php @@ -163,7 +163,6 @@ function rtt_rtmedia_vedio_editor_content() { add_action( 'rtmedia_add_edit_tab_content', 'rtt_rtmedia_vedio_editor_content', 1000 ); if ( ! function_exists( 'rtt_set_video_thumbnail' ) ) { - error_log('inside transcoder'); /** * Set the video thumbnail From 3ec5f430fa18faa65a241409be66a6f183473108 Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 30 May 2025 21:18:20 +0530 Subject: [PATCH 12/12] add network admin notice hook --- admin/rt-transcoder-admin.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin/rt-transcoder-admin.php b/admin/rt-transcoder-admin.php index 0de7ab1..6bce904 100755 --- a/admin/rt-transcoder-admin.php +++ b/admin/rt-transcoder-admin.php @@ -70,6 +70,9 @@ public function __construct() { add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts_styles' ) ); add_action( 'admin_notices', [ $this, 'show_transcoding_disabled_notice' ], 12 ); + if ( is_multisite() ) { + add_action( 'network_admin_notices', [ $this, 'show_transcoding_disabled_notice' ], 12 ); + } add_filter( 'attachment_fields_to_edit', array( $this, 'edit_video_thumbnail' ), 11, 2 ); add_filter( 'attachment_fields_to_save', array( $this, 'save_video_thumbnail' ), 11, 1 );