| 1 |
<?php |
| 2 |
/** |
| 3 |
* Displays the wizard media step |
| 4 |
* |
| 5 |
* @package Polylang |
| 6 |
* |
| 7 |
* @since 2.7 |
| 8 |
*/ |
| 9 |
|
| 10 |
if ( ! defined( 'ABSPATH' ) ) { |
| 11 |
exit; // Don't access directly. |
| 12 |
}; |
| 13 |
|
| 14 |
$default_options = PLL_Install::get_default_options(); |
| 15 |
$options = wp_parse_args( get_option( 'polylang' ), $default_options ); |
| 16 |
$media_support = $options['media_support']; |
| 17 |
|
| 18 |
$help_screenshot = '/modules/wizard/images/media-screen' . ( is_rtl() ? '-rtl' : '' ) . '.png'; |
| 19 |
|
| 20 |
?> |
| 21 |
<h2><?php esc_html_e( 'Media', 'polylang' ); ?></h2> |
| 22 |
<p> |
| 23 |
<?php esc_html_e( 'Polylang allows you to translate the text attached to your media, for example the title, the alternative text, the caption, or the description.', 'polylang' ); ?> |
| 24 |
<?php esc_html_e( 'When you translate a media, the file is not duplicated on your disk, however you will see one entry per language in the media library.', 'polylang' ); ?> |
| 25 |
<?php esc_html_e( 'When you want to insert media in a post, only the media in the language of the current post will be displayed.', 'polylang' ); ?> |
| 26 |
</p> |
| 27 |
<p> |
| 28 |
<?php esc_html_e( 'You must activate media translation if you want to translate the title, the alternative text, the caption, or the description. Otherwise you can safely deactivate it.', 'polylang' ); ?> |
| 29 |
</p> |
| 30 |
<ul class="pll-wizard-services"> |
| 31 |
<li class="pll-wizard-service-item"> |
| 32 |
<div class="pll-wizard-service-enable"> |
| 33 |
<span class="pll-wizard-service-toggle"> |
| 34 |
<input |
| 35 |
id="pll-wizard-service-media" |
| 36 |
type="checkbox" |
| 37 |
name="media_support" |
| 38 |
value="yes" <?php checked( $media_support ); ?> |
| 39 |
/> |
| 40 |
<label for="pll-wizard-service-media" /> |
| 41 |
</span> |
| 42 |
</div> |
| 43 |
<div class="pll-wizard-service-description"> |
| 44 |
<p> |
| 45 |
<?php esc_html_e( 'Allow Polylang translate media', 'polylang' ); ?> |
| 46 |
</p> |
| 47 |
</div> |
| 48 |
</li> |
| 49 |
<li class="pll-wizard-service-item"> |
| 50 |
<div class="pll-wizard-service-example"> |
| 51 |
<p> |
| 52 |
<input id="slide-toggle" type="checkbox" checked="checked"> |
| 53 |
<label for="slide-toggle" class="button button-primary button-small"> |
| 54 |
<span class="dashicons dashicons-visibility"></span><?php esc_html_e( 'Help', 'polylang' ); ?> |
| 55 |
</label> |
| 56 |
<span id="screenshot"> |
| 57 |
<img src="<?php echo esc_url_raw( esc_url( plugins_url( $help_screenshot, POLYLANG_FILE ) ) ); ?>" /> |
| 58 |
</span> |
| 59 |
</p> |
| 60 |
</div> |
| 61 |
</li> |
| 62 |
</ul> |
| 63 |
|