'; $check_status = get_post_meta( $post->ID, 'amazon_polly_enable', true ); if ( '1' === $check_status ) { $checked = 'checked'; $post_options_visibility = ''; } elseif ( '0' === $check_status ) { $checked = ''; $post_options_visibility = 'display:none'; } else { $default_configuration = get_option( 'amazon_polly_defconf' ); if ( 'Amazon Polly enabled' === $default_configuration ) { $checked = 'checked'; $post_options_visibility = ''; } else { $checked = ''; $post_options_visibility = 'display:none'; } } echo '

'; function inc_trans( $language_code ) { $value = get_option( 'amazon_polly_trans_langs_' . $language_code, '' ); $src_lan = get_option( 'amazon_polly_trans_src_lang', 'en' ); if ( 'on' == $value ) { $inc = 1; } else { $inc = 0; } if ( ( 'en' != $src_lan ) && ( 'en' == $language_code ) ) { $inc = 1; } return $inc; } echo '
'; $number_of_translations = ''; if ( 'on' == get_option( 'amazon_polly_s3' ) ) { if ( ! empty( get_option( 'amazon_polly_trans_enabled' ) ) ) { $number_of_translations = inc_trans( 'en' ) + inc_trans( 'es' ) + inc_trans( 'de' ) + inc_trans( 'fr' ) + inc_trans( 'pt' ); if ( ! empty( $number_of_translations ) ) { echo '
'; echo '

'; echo '

  You will translate it into

' . $number_of_translations . '

language(s).

'; echo '
'; echo '
'; } } } echo '

'; echo '
'; }