diff --git a/app/admin/RTMediaUploadTermsAdmin.php b/app/admin/RTMediaUploadTermsAdmin.php index c8dd3f57e..277b48415 100755 --- a/app/admin/RTMediaUploadTermsAdmin.php +++ b/app/admin/RTMediaUploadTermsAdmin.php @@ -37,8 +37,7 @@ class RTMediaUploadTermsAdmin { * Constructing settings for upload terms. */ public function __construct() { - $this->upload_terms_message = esc_html__( 'terms of services.', 'buddypress-media' ); - $this->upload_terms_error_message = esc_html__( 'Please check terms of service.', 'buddypress-media' ); + add_action( 'init', array( $this, 'init_translations' ), 5 ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts_styles' ), 999 ); add_filter( 'rtmedia_general_content_default_values', array( $this, 'add_admin_option_default_value' ), 10, 1 ); @@ -46,6 +45,14 @@ public function __construct() { add_filter( 'rtmedia_general_content_add_itmes', array( $this, 'admin_setting_add_terms_option' ), 10, 2 ); } + /** + * Initialize translations at the proper time. + */ + public function init_translations() { + $this->upload_terms_message = esc_html__( 'terms of services.', 'buddypress-media' ); + $this->upload_terms_error_message = esc_html__( 'Please check terms of service.', 'buddypress-media' ); + } + /** * Loads styles and scripts *