From 3710e83fc0053530c178d219c6499dfe2e0cee2f Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 18 Apr 2025 12:19:01 +0530 Subject: [PATCH 1/4] Feat: Add Notice for GoDAM Plugin --- admin/rt-transcoder-admin.php | 65 +++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/admin/rt-transcoder-admin.php b/admin/rt-transcoder-admin.php index 570d7590..6b1f2730 100755 --- a/admin/rt-transcoder-admin.php +++ b/admin/rt-transcoder-admin.php @@ -88,8 +88,13 @@ public function __construct() { } if ( is_multisite() ) { add_action( 'network_admin_notices', array( $this, 'subscribe_transcoder_admin_notice' ) ); + add_action( 'network_admin_notices', array( $this, 'install_godam_admin_notice' ) ); + add_action( 'network_admin_enqueue_scripts', array( $this, 'enqueue_thickbox_on_transcoder_settings' ) ); } add_action( 'admin_notices', array( $this, 'subscribe_transcoder_admin_notice' ) ); + add_action( 'admin_notices', array( $this, 'install_godam_admin_notice' ) ); + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_thickbox_on_transcoder_settings' ) ); + } if ( class_exists( 'RTMedia' ) ) { @@ -501,4 +506,64 @@ public function rtmedia_hide_encoding_tab() { 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(); + + // Define allowed pages + $allowed_pages = array( + 'rt-transcoder', + 'rt-retranscoder', + 'dashboard', + ); + + // 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 : ''; + + // 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 ) + ) { + return; + } + + // Check if GoDAM is already active + if ( is_plugin_active( 'godam/godam.php' ) ) { + return; + } + + $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' ); + + $class = 'notice notice-info'; + $valid_tags = array( + 'div' => array( 'class' => array(), 'id' => array() ), + 'p' => array(), + 'strong' => array(), + 'a' => array( 'href' => array(), 'class' => array(), 'target' => array() ), + ); + + 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' ), + $valid_tags + ), + esc_attr( $class ), + esc_url( $plugin_modal_url ) + ); + } + + /** + * Enqueue thickbox on transcoder settings page. + */ + public function enqueue_thickbox_on_transcoder_settings() { + add_thickbox(); + } } From 25623068db797096c14f146da57b338be45004a4 Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 18 Apr 2025 12:37:11 +0530 Subject: [PATCH 2/4] Remove Transcoder License Notice --- admin/rt-transcoder-admin.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/admin/rt-transcoder-admin.php b/admin/rt-transcoder-admin.php index 6b1f2730..eaea591a 100755 --- a/admin/rt-transcoder-admin.php +++ b/admin/rt-transcoder-admin.php @@ -87,11 +87,9 @@ public function __construct() { add_action( 'init', array( $this, 'disable_encoding' ) ); } if ( is_multisite() ) { - add_action( 'network_admin_notices', array( $this, 'subscribe_transcoder_admin_notice' ) ); add_action( 'network_admin_notices', array( $this, 'install_godam_admin_notice' ) ); add_action( 'network_admin_enqueue_scripts', array( $this, 'enqueue_thickbox_on_transcoder_settings' ) ); } - add_action( 'admin_notices', array( $this, 'subscribe_transcoder_admin_notice' ) ); add_action( 'admin_notices', array( $this, 'install_godam_admin_notice' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_thickbox_on_transcoder_settings' ) ); @@ -447,25 +445,6 @@ public function transcoder_admin_notice() { endif; } - /** - * Display subscribe to the transcoding service - */ - public function subscribe_transcoder_admin_notice() { - if ( ! empty( $this->api_key ) ) { - return false; - } - $settings_page_link = 'admin.php?page=rt-transcoder'; - $class = 'notice notice-error'; - $valid_tags = array( - 'div' => array( 'class' => array() ), - 'p' => array(), - 'strong' => array(), - 'a' => array( 'href' => array() ), - ); - // translators: Markup to show the info about plugin subscription if no API key is there. - printf( wp_kses( __( '

IMPORTANT! The Transcoder plugin works with active transcoding services subscription plan. Click here to subscribe or enable.

', 'transcoder' ), $valid_tags ), esc_attr( $class ), esc_url( admin_url( $settings_page_link ) ) ); - } - /** * Set option to hide admin notice when user click on dismiss button. * From f1753dd7e06c05655ae95b2b1bfcd99e6aa151be Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 18 Apr 2025 15:00:16 +0530 Subject: [PATCH 3/4] Update changelog and upgrade notice --- README.md | 10 +++++++++- readme.txt | 14 +++++++++++++- rt-transcoder.php | 4 ++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f9d825f9..4303f0d6 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Transcoding services for ANY WordPress website. Convert audio/video files of any Transcoder Banner

-* **Contributors:** [rtcamp](http://profiles.wordpress.org/rtcamp), [mangeshp](http://profiles.wordpress.org/mangeshp), [chandrapatel](http://profiles.wordpress.org/chandrapatel), [manishsongirkar36](http://profiles.wordpress.org/manishsongirkar36), [bhargavbhandari90](http://profiles.wordpress.org/bhargavbhandari90), [kiranpotphode](http://profiles.wordpress.org/kiranpotphode), [thrijith](http://profiles.wordpress.org/thrijith), [devikvekariya](http://profiles.wordpress.org/devikvekariya), [sagarnasit](http://profiles.wordpress.org/sagarnasit), [sudhiryadav](http://profiles.wordpress.org/sudhiryadav), [sid177](https://profiles.wordpress.org/sid177/), [pooja1210](https://profiles.wordpress.org/pooja1210/), [vaishu.agola27](https://profiles.wordpress.org/vaishuagola27/), [ravatparmar](https://profiles.wordpress.org/ravatparmar/), [tremidkhar](https://profiles.wordpress.org/tremidkhar/), [utsavladani](https://profiles.wordpress.org/utsavladani/), [vishalkakadiya](https://profiles.wordpress.org/vishalkakadiya/), [pavanpatil1](https://profiles.wordpress.org/pavanpatil1/), [akrocks](https://profiles.wordpress.org/akrocks/), [hrithikd](https://profiles.wordpress.org/hrithikd/), [sohampate1](https://profiles.wordpress.org/sohampate1/) +* **Contributors:** [rtcamp](http://profiles.wordpress.org/rtcamp), [mangeshp](http://profiles.wordpress.org/mangeshp), [chandrapatel](http://profiles.wordpress.org/chandrapatel), [manishsongirkar36](http://profiles.wordpress.org/manishsongirkar36), [bhargavbhandari90](http://profiles.wordpress.org/bhargavbhandari90), [kiranpotphode](http://profiles.wordpress.org/kiranpotphode), [thrijith](http://profiles.wordpress.org/thrijith), [devikvekariya](http://profiles.wordpress.org/devikvekariya), [sagarnasit](http://profiles.wordpress.org/sagarnasit), [sudhiryadav](http://profiles.wordpress.org/sudhiryadav), [sid177](https://profiles.wordpress.org/sid177/), [pooja1210](https://profiles.wordpress.org/pooja1210/), [vaishu.agola27](https://profiles.wordpress.org/vaishuagola27/), [ravatparmar](https://profiles.wordpress.org/ravatparmar/), [tremidkhar](https://profiles.wordpress.org/tremidkhar/), [utsavladani](https://profiles.wordpress.org/utsavladani/), [vishalkakadiya](https://profiles.wordpress.org/vishalkakadiya/), [pavanpatil1](https://profiles.wordpress.org/pavanpatil1/), [akrocks](https://profiles.wordpress.org/akrocks/), [hrithikd](https://profiles.wordpress.org/hrithikd/), [sohampate1](https://profiles.wordpress.org/sohampate1/), [krishana79](https://profiles.wordpress.org/krishana79/) * **License:** [GPL v2 or later]( http://www.gnu.org/licenses/gpl-2.0.html) @@ -65,6 +65,14 @@ Read [Documentation](https://rtmedia.io/docs/transcoder/?utm_source=readme&utm_m 1. Transcoder Settings ## Changelog ## + +#### 1.3.7 [April 18, 2025] #### + +* ENHANCEMENTS + + * Changed the admin notice for users. + * Removed the subscription reminder notice shown when no API key is configured. + #### 1.3.6 [February 27, 2024] #### * FIXED diff --git a/readme.txt b/readme.txt index b08ff409..3aac1b7a 100644 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,5 @@ === Transcoder === -Contributors: rtcamp, mangeshp, chandrapatel, manishsongirkar36, bhargavbhandari90, kiranpotphode, thrijith, devikvekariya, sagarnasit, sudhiryadav, sid177, pooja1210, vaishu.agola27, ravatparmar, tremidkhar, kapilpaul, utsavladani, vishalkakadiya, pavanpatil1, akrocks, hrithikd, sohampate1 +Contributors: rtcamp, mangeshp, chandrapatel, manishsongirkar36, bhargavbhandari90, kiranpotphode, thrijith, devikvekariya, sagarnasit, sudhiryadav, sid177, pooja1210, vaishu.agola27, ravatparmar, tremidkhar, kapilpaul, utsavladani, vishalkakadiya, pavanpatil1, akrocks, hrithikd, sohampate1, krishana79 Tags: media, multimedia, audio, songs, music, video, ffmpeg, media-node, rtMedia, WordPress, kaltura, transcode, transcoder, encoding, encode Donate link: https://rtcamp.com/donate/ Requires at least: 4.1 @@ -62,6 +62,14 @@ Read [Documentation](https://rtmedia.io/docs/transcoder/?utm_source=readme&utm_m 1. Transcoder Settings == Changelog == + += 1.3.7 [April 18, 2025] = + +* ENHANCEMENTS + + * Changed the admin notice for users. + * Removed the subscription reminder notice shown when no API key is configured. + = 1.3.6 [February 27, 2024] = * FIXED @@ -226,6 +234,10 @@ Read [Documentation](https://rtmedia.io/docs/transcoder/?utm_source=readme&utm_m Initial release == Upgrade Notice == + += 1.3.7 = +Transcoder 1.3.7, with admin notice to install our new GoDAM plugin – with a powerful Digital Asset Management features along with video transcoding services. + = 1.3.6 = Transcoder 1.3.6, with enhanced security. diff --git a/rt-transcoder.php b/rt-transcoder.php index a0618d46..1573d4f5 100644 --- a/rt-transcoder.php +++ b/rt-transcoder.php @@ -3,7 +3,7 @@ * Plugin Name: Transcoder * Plugin URI: https://rtmedia.io/transcoder/?utm_source=dashboard&utm_medium=plugin&utm_campaign=transcoder * Description: Audio & video transcoding services for ANY WordPress website. Allows you to convert audio/video files of any format to a web-friendly format (mp3/mp4). - * Version: 1.3.6 + * Version: 1.3.7 * Text Domain: transcoder * Author: rtCamp * Author URI: https://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=transcoder @@ -39,7 +39,7 @@ /** * The version of the plugin */ - define( 'RT_TRANSCODER_VERSION', '1.3.6' ); + define( 'RT_TRANSCODER_VERSION', '1.3.7' ); } if ( ! defined( 'RT_TRANSCODER_NO_MAIL' ) && defined( 'VIP_GO_APP_ENVIRONMENT' ) ) { From 6e838712a399aac92baf81af165ea3a90a383040 Mon Sep 17 00:00:00 2001 From: krishana7911 Date: Fri, 18 Apr 2025 15:03:20 +0530 Subject: [PATCH 4/4] update changelog message --- README.md | 2 +- readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4303f0d6..5ff4d91c 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Read [Documentation](https://rtmedia.io/docs/transcoder/?utm_source=readme&utm_m * ENHANCEMENTS - * Changed the admin notice for users. + * Changed the admin notice for users on transcoder tabs and main dashboard page. * Removed the subscription reminder notice shown when no API key is configured. #### 1.3.6 [February 27, 2024] #### diff --git a/readme.txt b/readme.txt index 3aac1b7a..622cfbbd 100644 --- a/readme.txt +++ b/readme.txt @@ -67,7 +67,7 @@ Read [Documentation](https://rtmedia.io/docs/transcoder/?utm_source=readme&utm_m * ENHANCEMENTS - * Changed the admin notice for users. + * Changed the admin notice for users on transcoder tabs and main dashboard page. * Removed the subscription reminder notice shown when no API key is configured. = 1.3.6 [February 27, 2024] =