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

Commit b162e1e

Browse files
committed
Add support of const to overwrite API URL
1 parent 60c0a97 commit b162e1e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

admin/rt-transcoder-handler.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ public function __construct( $no_init = false ) {
117117

118118
$this->api_key = get_site_option( 'rt-transcoding-api-key' );
119119
$this->stored_api_key = get_site_option( 'rt-transcoding-api-key-stored' );
120+
121+
/**
122+
* Allow other plugin and wp-config to overwrite API URL.
123+
*/
124+
if ( defined( 'TRANSCODER_API_URL' ) && ! empty( TRANSCODER_API_URL ) ) {
125+
$this->transcoding_api_url = TRANSCODER_API_URL;
126+
}
127+
120128
$this->transcoding_api_url = apply_filters( 'transcoding_api_url', $this->transcoding_api_url );
121129

122130
if ( $no_init ) {

0 commit comments

Comments
 (0)