is_media_related_screen( $current_screen ) ) {
$media_translation_dashboard = esc_html__( 'WPML » Media Translation', 'wpml-media' );
$wpml_translation_dashboard = esc_html__( 'WPML » Translation Management', 'wpml-media' );
$current_screen->add_help_tab(
array(
'id' => 'wpml-media-translation',
'title' => esc_html__( 'Translating Media', 'wpml-media' ),
'content' =>
'
' . esc_html__( 'There are two ways for you to translate Media:', 'wpml-media' ) . '
' .
'' .
'- ' . sprintf(
esc_html__( 'Use the dashboard on the %s page to translate your images and other media files.', 'wpml-media' ),
$media_translation_dashboard
) . '
' .
'- ' . sprintf(
esc_html__( 'Use the dashboard on the %s page to send pages that contain media, for translation.', 'wpml-media' ),
$wpml_translation_dashboard
) . '
' .
'
' .
'' .
'' . esc_html__( 'Learn more about WPML Media Translation', 'wpml-media' ) . '',
)
);
}
}
private function is_media_related_screen( $current_screen ) {
$accepted_bases = array(
'wpml_page_wpml-media',
'upload',
'media',
'wpml_page_wpml-translation-management/menu/main',
);
return $current_screen && in_array( $current_screen->base, $accepted_bases );
}
}