-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Description
Describe the bug
Hi,
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the buddypress-media domain was triggered too early.
To Reproduce
In the RTMediaUploadTermsAdmin.php (line-number: 40-41) file (buddypress-media/app/admin/RTMediaUploadTermsAdmin.php), you have called your text domain (buddypress-media) on top-level:
$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' );
Expected behavior
Can you do something like this:
class constructor:
public function __construct() {
add_action( 'init', array( $this, 'init_translations' ), 5 );
// rest of the code
}
and then:
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' );
}
Additional context
This will resolve this php notice.
Metadata
Metadata
Assignees
Labels
No labels