Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 3cba24c

Browse files
authored
Merge pull request #323 from rtCamp/develop
Version update v1.4.0 [ master ]
2 parents 8fe2bdb + 0b7aafc commit 3cba24c

File tree

8 files changed

+240
-115
lines changed

8 files changed

+240
-115
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ Read [Documentation](https://rtmedia.io/docs/transcoder/?utm_source=readme&utm_m
6666

6767
## Changelog ##
6868

69+
#### 1.4.0 [May 30, 2025] ####
70+
71+
* REMOVED
72+
* Update to users - Discontinuing the Transcoder service and replacing with GoDAM.
73+
74+
* ENHANCEMENTS
75+
* Update admin notice for the GoDAM.
76+
* Add notice for transcoding disabled on uploads page.
77+
* Update messages for license activation.
78+
6979
#### 1.3.9 [May 13, 2025] ####
7080

7181
* ENHANCEMENTS

admin/js/build/rt-transcoder-block-editor-support.build.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/rt-transcoder-admin.php

Lines changed: 87 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ public function __construct() {
6969
include_once RT_TRANSCODER_PATH . 'admin/rt-transcoder-actions.php'; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant
7070

7171
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts_styles' ) );
72+
add_action( 'admin_notices', [ $this, 'show_transcoding_disabled_notice' ], 12 );
73+
if ( is_multisite() ) {
74+
add_action( 'network_admin_notices', [ $this, 'show_transcoding_disabled_notice' ], 12 );
75+
}
7276

7377
add_filter( 'attachment_fields_to_edit', array( $this, 'edit_video_thumbnail' ), 11, 2 );
7478
add_filter( 'attachment_fields_to_save', array( $this, 'save_video_thumbnail' ), 11, 1 );
@@ -486,9 +490,6 @@ public function mediaelement_add_class( $output, $url ) {
486490
return sprintf( '<a class="no-popup" href="%1$s">%1$s</a>', esc_url( $url ) );
487491
}
488492

489-
/**
490-
* Display GoDAM installation recommendation admin notice on specific pages.
491-
*/
492493
public function install_godam_admin_notice() {
493494
$current_screen = get_current_screen();
494495

@@ -501,15 +502,14 @@ public function install_godam_admin_notice() {
501502
'plugins-network'
502503
);
503504

504-
// Check if were on allowed page using screen ID or $_GET['page']
505+
// Check if we're on allowed page using screen ID or $_GET['page']
505506
$current_page = isset( $_GET['page'] ) ? $_GET['page'] : '';
506-
$screen_id = isset( $current_screen->id ) ? $current_screen->id : '';
507+
$screen_id = isset( $current_screen->id ) ? $current_screen->id : '';
507508

508509
// Skip if not in our allowed pages
509-
if (
510-
( ! in_array( $current_page, $allowed_pages, true ) && ! in_array( $screen_id, $allowed_pages, true ) ) ||
511-
get_user_meta( get_current_user_id(), '_godam_notice_dismissed', true )
512-
) {
510+
if ( ( ! in_array( $current_page, $allowed_pages, true ) &&
511+
! in_array( $screen_id, $allowed_pages, true ) ) ||
512+
get_user_meta( get_current_user_id(), '_godam_notice_dismissed', true ) ) {
513513
return;
514514
}
515515

@@ -519,24 +519,47 @@ public function install_godam_admin_notice() {
519519
}
520520

521521
$plugin_slug = 'godam';
522-
$plugin_modal_url = is_multisite()
523-
? network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' )
524-
: admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' );
525-
526-
$class = 'notice notice-warning';
527-
$valid_tags = array(
528-
'div' => array( 'class' => array(), 'id' => array() ),
529-
'p' => array(),
530-
'strong' => array(),
531-
'a' => array( 'href' => array(), 'class' => array(), 'target' => array() ),
532-
'span' => array( 'class' => array(), 'style' => array() ),
533-
);
522+
$plugin_modal_url = is_multisite() ?
523+
network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' ) :
524+
admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&TB_iframe=true&width=772&height=666' );
525+
526+
$class = 'notice notice-error';
534527

535528
printf(
536-
wp_kses(
537-
__( '<div class="%1$s"><p><span class="dashicons dashicons-warning" style="margin-right: 5px; color: #c28b00;"></span><strong>NOTICE:</strong> Transcoder plugin will be retired on <strong>May 31, 2025</strong>. We recommend removing this plugin and switching to our new plugin, <a href="https://godam.io/?utm_source=transcoder-plugin&utm_medium=wp-admin&utm_campaign=plugin-notice" target="_blank">GoDAM</a> which includes powerful Digital Asset Management features along with video transcoding services. <a href="%2$s" class="thickbox open-plugin-details-modal">Install GoDAM now</a>!</p></div>', 'transcoder' ),
538-
$valid_tags
539-
),
529+
'<div class="%1$s" style="padding: 0; border-left: 4px solid #d63638; background: #fff;">
530+
<div style="display: flex; flex-direction: row; align-items: stretch;">
531+
<!-- Icon Container -->
532+
<div style="display: flex; align-items: center; justify-content: center; width: 120px; height: 120px;">
533+
<span class="dashicons dashicons-warning" style="color: #d63638; font-size: 64px; line-height: 1; width: 64px; text-align: center; margin-left: 25%%"></span>
534+
535+
</div>
536+
537+
<!-- Content Container -->
538+
<div style="flex: 1; padding: 20px 20px; display: flex; flex-direction: column; justify-content: center;">
539+
<!-- Header -->
540+
<div style="font-size: 20px; font-weight: 600; color: #1d2327;">
541+
Transcoding via the Transcoder plugin is disabled from June 1st, 2025.
542+
</div>
543+
544+
<!-- Description Paragraph -->
545+
<p style="font-size: 15px; color: #50575e;">
546+
Switch to the <a href="https://godam.io/pricing?utm_source=transcoder-plugin&utm_medium=wp-admin&utm_campaign=plugin-notice" target="_blank" style="color: #d63638; font-weight: 600; text-decoration: none;">GoDAM</a> 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.
547+
</p>
548+
549+
550+
<!-- CTA Buttons -->
551+
<div style="display: flex; gap: 15px; flex-wrap: wrap; align-items: center;">
552+
<a href="%2$s" class="thickbox open-plugin-details-modal" style="display: inline-flex; align-items: center; background-color: #d63638; color: white; padding: 12px 24px; text-decoration: none; border-radius: 6px; font-weight: 600; font-size: 14px; border: none; cursor: pointer; transition: background-color 0.2s;">
553+
Get GoDAM
554+
</a>
555+
<a href="https://rtmedia.io/blog/transcoder-is-discontinued-and-moved-to-godam/?utm_source=transcoder-plugin&utm_medium=wp-admin&utm_campaign=plugin-notice-learn-more" target="_blank" style="display: inline-flex; align-items: center; background-color: transparent; color: #d63638; padding: 10px 24px; text-decoration: none; border: 2px solid #d63638; border-radius: 6px; font-weight: 600; font-size: 14px; transition: all 0.2s;">
556+
Learn More
557+
</a>
558+
559+
</div>
560+
</div>
561+
</div>
562+
</div>',
540563
esc_attr( $class ),
541564
esc_url( $plugin_modal_url )
542565
);
@@ -548,4 +571,43 @@ public function install_godam_admin_notice() {
548571
public function enqueue_thickbox_on_transcoder_settings() {
549572
add_thickbox();
550573
}
574+
575+
/**
576+
* Display a notice in the Media Library indicating that the Transcoder plugin
577+
* no longer provides transcoding functionality and suggesting users subscribe
578+
* to the GoDAM service instead.
579+
*
580+
* This notice only appears on the "Media > Library" page (`upload` screen).
581+
*
582+
* @since 2.0.0
583+
*/
584+
public function show_transcoding_disabled_notice() {
585+
$screen = get_current_screen();
586+
587+
if ( $screen && 'upload' === $screen->id ) {
588+
$info_link = 'https://godam.io/pricing/?utm_source=transcoder-plugin&utm_medium=media-library-notice&utm_campaign=transcoding-disabled';
589+
590+
printf(
591+
'<div class="notice notice-error"><p>%s</p></div>',
592+
wp_kses(
593+
sprintf(
594+
/* translators: %s: GoDAM pricing link */
595+
__( '<span class="dashicons dashicons-warning" style="margin-right: 5px; color: #d63638;"></span><strong>Transcoding is no longer available through Transcoder.</strong> For continued media processing, please subscribe to our <a href="%s" target="_blank">GoDAM</a> services.', 'transcoder' ),
596+
esc_url( $info_link )
597+
),
598+
array(
599+
'span' => array(
600+
'class' => array(),
601+
'style' => array(),
602+
),
603+
'strong' => array(),
604+
'a' => array(
605+
'href' => array(),
606+
'target' => array(),
607+
),
608+
)
609+
)
610+
);
611+
}
612+
}
551613
}

admin/rt-transcoder-handler.php

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ public function __construct( $no_init = false ) {
195195
* @param string $autoformat If true then generating thumbs only else trancode video.
196196
*/
197197
public function wp_media_transcoding( $wp_metadata, $attachment_id, $autoformat = true ) {
198+
199+
return $wp_metadata;
200+
198201
if ( empty( $wp_metadata['mime_type'] ) ) {
199202
return $wp_metadata;
200203
}
@@ -584,20 +587,28 @@ public function allowed_types_admin_settings( $types ) {
584587
public function successfully_subscribed_notice() {
585588
?>
586589
<div class="updated">
587-
<p>
588-
<?php
589-
$api_key_updated = transcoder_filter_input( INPUT_GET, 'api-key-updated', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
590-
printf(
591-
wp_kses(
592-
__( 'You have successfully subscribed.', 'transcoder' ),
593-
array(
594-
'strong' => array(),
595-
)
590+
<p>
591+
<?php
592+
$godam_link = '<a href="https://godam.io/pricing/?utm_source=transcoder-plugin&utm_medium=license-notice&utm_campaign=transcoding-disabled" target="_blank">GoDAM</a>';
593+
594+
$api_key_updated = transcoder_filter_input( INPUT_GET, 'api-key-updated', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
595+
596+
printf(
597+
wp_kses(
598+
/* translators: %s is the GoDAM plugin link */
599+
__( 'You have successfully subscribed. However, transcoding via transcoder has been discontinued. Please use %s for continued transcoding services.', 'transcoder' ),
600+
array(
601+
'a' => array(
602+
'href' => array(),
603+
'target' => array(),
596604
),
597-
esc_html( sanitize_text_field( wp_unslash( $api_key_updated ) ) )
598-
);
599-
?>
600-
</p>
605+
'strong' => array(),
606+
)
607+
),
608+
$godam_link
609+
);
610+
?>
611+
</p>
601612
</div>
602613
<?php
603614
}
@@ -611,7 +622,22 @@ public function invalid_license_notice() {
611622
?>
612623
<div class="error">
613624
<p>
614-
<?php esc_html_e( 'This license key is invalid.', 'transcoder' ); ?>
625+
<?php
626+
$godam_link = '<a href="https://godam.io/pricing/?utm_source=transcoder-plugin&utm_medium=license-notice&utm_campaign=transcoding-disabled" target="_blank">GoDAM</a>';
627+
628+
printf(
629+
wp_kses(
630+
__( 'This license key is invalid. Transcoding is now supported via our %s services.', 'transcoder' ),
631+
[
632+
'a' => [
633+
'href' => [],
634+
'target' => [],
635+
],
636+
]
637+
),
638+
$godam_link
639+
);
640+
?>
615641
</p>
616642
</div>
617643
<?php
@@ -1515,7 +1541,12 @@ public function get_transcoding_status( $post_id ) {
15151541

15161542
} elseif ( ! empty( $status_info ) && ! empty( $status_info->error_code ) && ! empty( $status_info->error_msg ) ) {
15171543

1518-
$message = $messages['failed'];
1544+
// Custom handling error code 301.
1545+
if ( (int) $status_info->error_code === 301 ) {
1546+
$message = __( 'Transcoding through Transcoder is disabled. Please install GoDAM', 'transcoder' );
1547+
} else {
1548+
$message = $messages['failed'];
1549+
}
15191550

15201551
} elseif ( ! empty( $status_info ) && 'processing' === $status_info->status && empty( $status_info->error_code ) && empty( $status_info->error_msg ) ) {
15211552

0 commit comments

Comments
 (0)