Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/sitepres.../menu
File: languages.php
<?php
[0] Fix | Delete
/* var WPML_Language_Switcher $wpml_language_switcher */
[1] Fix | Delete
global $sitepress, $sitepress_settings, $wpdb, $wpml_language_switcher;
[2] Fix | Delete
[3] Fix | Delete
if ( ! is_plugin_active( WPML_PLUGIN_BASENAME ) ) {
[4] Fix | Delete
?>
[5] Fix | Delete
<h2><?php esc_html_e( 'Setup WPML', 'sitepress' ) ?></h2>
[6] Fix | Delete
<div class="updated fade">
[7] Fix | Delete
<p style="line-height:1.5"><?php esc_html_e( 'The WPML Multilingual CMS plugin is not currently enabled.', 'sitepress' ) ?></p>
[8] Fix | Delete
<p style="line-height:1.5">
[9] Fix | Delete
<?php echo sprintf(
[10] Fix | Delete
esc_html__( 'Please go to the %sPlugins%s page and enable the WPML Multilingual CMS plugin before trying to configure the plugin.', 'sitepress' ),
[11] Fix | Delete
'<a href="plugins.php">', '</a>'
[12] Fix | Delete
) ?>
[13] Fix | Delete
</p>
[14] Fix | Delete
</div>
[15] Fix | Delete
<?php
[16] Fix | Delete
return;
[17] Fix | Delete
}
[18] Fix | Delete
[19] Fix | Delete
if ( isset( $_GET[ 'trop' ] ) ) {
[20] Fix | Delete
require_once dirname( __FILE__ ) . '/edit-languages.php';
[21] Fix | Delete
global $icl_edit_languages;
[22] Fix | Delete
$flags_factory = new WPML_Flags_Factory( $wpdb );
[23] Fix | Delete
$icl_edit_languages = new SitePress_EditLanguages( $flags_factory->create() );
[24] Fix | Delete
$icl_edit_languages->render();
[25] Fix | Delete
return;
[26] Fix | Delete
}
[27] Fix | Delete
[28] Fix | Delete
$sitepress_settings = get_option( 'icl_sitepress_settings' );
[29] Fix | Delete
$setup_wizard_step = (int) $sitepress->get_setting( 'setup_wizard_step' );
[30] Fix | Delete
$setup_complete = $sitepress->get_setting( 'setup_complete' );
[31] Fix | Delete
$active_languages = $sitepress->get_active_languages();
[32] Fix | Delete
$hidden_languages = $sitepress->get_setting( 'hidden_languages' );
[33] Fix | Delete
$show_untranslated_blog_posts = $sitepress->get_setting( 'show_untranslated_blog_posts' );
[34] Fix | Delete
$automatic_redirect = $sitepress->get_setting( 'automatic_redirect' );
[35] Fix | Delete
$setting_urls = $sitepress->get_setting( 'urls' );
[36] Fix | Delete
$existing_content_language_verified = $sitepress->get_setting( 'existing_content_language_verified' );
[37] Fix | Delete
$language_negotiation_type = $sitepress->get_setting( 'language_negotiation_type' );
[38] Fix | Delete
$seo = $sitepress->get_setting( 'seo' );
[39] Fix | Delete
$default_language = $sitepress->get_default_language();
[40] Fix | Delete
$all_languages = $sitepress->get_languages( $sitepress->get_admin_language() );
[41] Fix | Delete
$sample_lang = false;
[42] Fix | Delete
$default_language_details = false;
[43] Fix | Delete
$wp_api = $sitepress->get_wp_api();
[44] Fix | Delete
$should_hide_admin_language = $wp_api->version_compare_naked( get_bloginfo( 'version' ), '4.7', '>=' );
[45] Fix | Delete
$encryptor = new WPML_Data_Encryptor();
[46] Fix | Delete
$inactive_content = null;
[47] Fix | Delete
[48] Fix | Delete
if(!$existing_content_language_verified ){
[49] Fix | Delete
// try to determine the blog language
[50] Fix | Delete
$blog_current_lang = 0;
[51] Fix | Delete
if($blog_lang = get_option('WPLANG')){
[52] Fix | Delete
$exp = explode('_',$blog_lang);
[53] Fix | Delete
$blog_current_lang = $wpdb->get_var(
[54] Fix | Delete
$wpdb->prepare("SELECT code FROM {$wpdb->prefix}icl_languages WHERE code= %s",
[55] Fix | Delete
$exp[0]));
[56] Fix | Delete
}
[57] Fix | Delete
if(!$blog_current_lang && defined('WPLANG') && WPLANG != ''){
[58] Fix | Delete
$blog_current_lang = $wpdb->get_var($wpdb->prepare("SELECT code FROM {$wpdb->prefix}icl_languages WHERE default_locale=%s", WPLANG));
[59] Fix | Delete
if(!$blog_current_lang){
[60] Fix | Delete
$blog_lang = WPLANG;
[61] Fix | Delete
$exp = explode('_',$blog_lang);
[62] Fix | Delete
$blog_current_lang = $wpdb->get_var(
[63] Fix | Delete
$wpdb->prepare("SELECT code FROM {$wpdb->prefix}icl_languages WHERE code= %s",
[64] Fix | Delete
$exp[0]));
[65] Fix | Delete
}
[66] Fix | Delete
}
[67] Fix | Delete
if(!$blog_current_lang){
[68] Fix | Delete
$blog_current_lang = 'en';
[69] Fix | Delete
}
[70] Fix | Delete
$languages = $sitepress->get_languages( $blog_current_lang, false, true, false, 'display_name' );
[71] Fix | Delete
}else{
[72] Fix | Delete
$languages = $sitepress->get_languages( $sitepress->get_admin_language(), false, true, false, 'display_name' );
[73] Fix | Delete
foreach($active_languages as $lang){
[74] Fix | Delete
if($lang['code'] != $default_language ){
[75] Fix | Delete
$sample_lang = $lang;
[76] Fix | Delete
break;
[77] Fix | Delete
}
[78] Fix | Delete
}
[79] Fix | Delete
$default_language_details = $sitepress->get_language_details( $default_language );
[80] Fix | Delete
$inactive_content = new WPML_Inactive_Content( $wpdb, $sitepress->get_current_language() );
[81] Fix | Delete
}
[82] Fix | Delete
global $language_switcher_defaults, $language_switcher_defaults_alt;
[83] Fix | Delete
[84] Fix | Delete
$theme_wpml_config_file = WPML_Config::get_theme_wpml_config_file();
[85] Fix | Delete
[86] Fix | Delete
[87] Fix | Delete
?>
[88] Fix | Delete
<?php $sitepress->noscript_notice() ?>
[89] Fix | Delete
[90] Fix | Delete
<?php if($setup_complete || SitePress_Setup::languages_table_is_complete()) { ?>
[91] Fix | Delete
<div class="wrap wpml-settings-container<?php if( empty( $setup_complete ) ): ?> wpml-wizard<?php endif; ?>">
[92] Fix | Delete
<h2><?php esc_html_e( 'Setup WPML', 'sitepress' ) ?></h2>
[93] Fix | Delete
[94] Fix | Delete
<?php
[95] Fix | Delete
$compatibility_reports_args = array(
[96] Fix | Delete
'plugin_name' => 'WPML',
[97] Fix | Delete
'plugin_uri' => 'http://wpml.org',
[98] Fix | Delete
'plugin_site' => 'wpml.org',
[99] Fix | Delete
'use_styles' => true,
[100] Fix | Delete
'privacy_policy_url' => 'https://wpml.org/documentation/privacy-policy-and-gdpr-compliance/?utm_source=wpmlplugin&utm_campaign=compatibility-reporting&utm_medium=wpml-setup&utm_term=privacy-policy-and-gdpr-compliance',
[101] Fix | Delete
'plugin_repository' => 'wpml',
[102] Fix | Delete
);
[103] Fix | Delete
[104] Fix | Delete
if ( ! $sitepress->is_setup_complete() ) {
[105] Fix | Delete
$wizard_progress = new WPML_Setup_Wizard_Progress( $setup_wizard_step, array(
[106] Fix | Delete
1 => __( '1. Content language', 'sitepress' ),
[107] Fix | Delete
2 => __( '2. Translation languages', 'sitepress' ),
[108] Fix | Delete
3 => __( '3. Language switcher', 'sitepress' ),
[109] Fix | Delete
4 => __( '4. Compatibility', 'sitepress' ),
[110] Fix | Delete
5 => __( '5. Registration', 'sitepress' ),
[111] Fix | Delete
) );
[112] Fix | Delete
$wizard_progress->render();
[113] Fix | Delete
}
[114] Fix | Delete
[115] Fix | Delete
if ( ! $existing_content_language_verified || $setup_wizard_step <= 1 ): ?>
[116] Fix | Delete
<?php
[117] Fix | Delete
$setup_step = new WPML_Setup_Step_One_Menu( $sitepress );
[118] Fix | Delete
echo $setup_step->render();
[119] Fix | Delete
?>
[120] Fix | Delete
<?php else: ?>
[121] Fix | Delete
<?php
[122] Fix | Delete
if(!empty( $setup_complete ) || $setup_wizard_step == 2): ?>
[123] Fix | Delete
<?php if ( count( $active_languages ) > 1 ): ?>
[124] Fix | Delete
<p>
[125] Fix | Delete
<strong><?php esc_html_e( 'This screen contains the language settings for your site.', 'sitepress' ) ?></strong>
[126] Fix | Delete
</p>
[127] Fix | Delete
<ul class="wpml-navigation-links js-wpml-navigation-links">
[128] Fix | Delete
<?php
[129] Fix | Delete
$navigation_items = array(
[130] Fix | Delete
'#lang-sec-11' => __( 'Theme and plugins reporting', 'sitepress' ),
[131] Fix | Delete
'#lang-sec-1' => __( 'Site Languages', 'sitepress' ),
[132] Fix | Delete
'#lang-sec-2' => __( 'Language URL format', 'sitepress' ),
[133] Fix | Delete
'#lang-sec-4' => __( 'Admin language', 'sitepress' ),
[134] Fix | Delete
'#lang-sec-7' => __( 'Hide languages', 'sitepress' ),
[135] Fix | Delete
'#lang-sec-8' => __( 'Make themes work multilingual', 'sitepress' ),
[136] Fix | Delete
'#lang-sec-9' => __( 'Browser language redirect', 'sitepress' ),
[137] Fix | Delete
'#lang-sec-9-5' => __( 'SEO Options', 'sitepress' ),
[138] Fix | Delete
'#cookie' => __( 'Language filtering for AJAX operations', 'sitepress' ),
[139] Fix | Delete
'#lang-sec-10' => __( 'WPML love', 'sitepress' ),
[140] Fix | Delete
);
[141] Fix | Delete
[142] Fix | Delete
if( $should_hide_admin_language && array_key_exists( '#lang-sec-4', $navigation_items ) ) {
[143] Fix | Delete
unset( $navigation_items['#lang-sec-4'] );
[144] Fix | Delete
}
[145] Fix | Delete
[146] Fix | Delete
/**
[147] Fix | Delete
* @param array $navigation_items
[148] Fix | Delete
*/
[149] Fix | Delete
$navigation_items = apply_filters( 'wpml_admin_languages_navigation_items', $navigation_items );
[150] Fix | Delete
[151] Fix | Delete
foreach ( $navigation_items as $link => $text ) {
[152] Fix | Delete
echo '<li><a href="' . esc_attr( $link ) . '">' . esc_html( $text ) . '</a></li>';
[153] Fix | Delete
}
[154] Fix | Delete
?>
[155] Fix | Delete
</ul>
[156] Fix | Delete
<?php endif; ?>
[157] Fix | Delete
[158] Fix | Delete
<?php
[159] Fix | Delete
if ( $setup_complete ) {
[160] Fix | Delete
?>
[161] Fix | Delete
<div class="wpml-section wpml-section-wpml-theme-and-plugins-reporting" id="lang-sec-11">
[162] Fix | Delete
<div class="wpml-section-header">
[163] Fix | Delete
<h3><?php esc_html_e( 'Reporting to wpml.org', 'sitepress' ) ?></h3>
[164] Fix | Delete
</div>
[165] Fix | Delete
<div class="wpml-section-content">
[166] Fix | Delete
<?php
[167] Fix | Delete
$compatibility_reports_after_setup_args = $compatibility_reports_args;
[168] Fix | Delete
$compatibility_reports_after_setup_args['custom_heading'] = '';
[169] Fix | Delete
$compatibility_reports_after_setup_args['use_radio'] = false;
[170] Fix | Delete
[171] Fix | Delete
do_action( 'otgs_installer_render_local_components_setting', $compatibility_reports_after_setup_args );
[172] Fix | Delete
?>
[173] Fix | Delete
</div>
[174] Fix | Delete
</div>
[175] Fix | Delete
<?php
[176] Fix | Delete
}
[177] Fix | Delete
?>
[178] Fix | Delete
[179] Fix | Delete
<div id="lang-sec-1" class="wpml-section wpml-section-languages">
[180] Fix | Delete
<div class="wpml-section-header">
[181] Fix | Delete
<h3><?php _e('Site Languages', 'sitepress') ?></h3>
[182] Fix | Delete
</div>
[183] Fix | Delete
[184] Fix | Delete
<div class="wpml-section-content">
[185] Fix | Delete
<div class="wpml-section-content-inner">
[186] Fix | Delete
<?php if(!empty( $setup_complete )): ?>
[187] Fix | Delete
<h4><?php _e('These languages are enabled for this site:','sitepress'); ?></h4>
[188] Fix | Delete
[189] Fix | Delete
<?php do_action( 'wpml_before_active_languages_display' ); ?>
[190] Fix | Delete
[191] Fix | Delete
<ul id="icl_enabled_languages" class="enabled-languages">
[192] Fix | Delete
<?php foreach($active_languages as $lang): $is_default = ( $default_language ==$lang['code']); ?>
[193] Fix | Delete
<?php
[194] Fix | Delete
if(!empty( $hidden_languages ) && in_array($lang['code'], $hidden_languages )){
[195] Fix | Delete
$hidden = '&nbsp<strong style="color:#f00">(' . esc_html__( 'hidden', 'sitepress' ) . ')</strong>';
[196] Fix | Delete
}else{
[197] Fix | Delete
$hidden = '';
[198] Fix | Delete
}
[199] Fix | Delete
?>
[200] Fix | Delete
[201] Fix | Delete
<li <?php if($is_default):?>class="selected"<?php endif;?>>
[202] Fix | Delete
<input id="default_language_<?php echo esc_attr( $lang['code'] ) ?>"
[203] Fix | Delete
name="default_language" type="radio"
[204] Fix | Delete
value="<?php echo esc_attr( $lang['code'] ) ?>" <?php checked( $is_default ) ?> />
[205] Fix | Delete
<label for="default_language_<?php echo esc_attr( $lang['code'] ) ?>">
[206] Fix | Delete
<?php echo esc_html( $lang['display_name'] ) . $hidden ?>
[207] Fix | Delete
<?php if ( $is_default ): ?>(<?php esc_html_e( 'default', 'sitepress' ) ?>)<?php endif ?>
[208] Fix | Delete
</label>
[209] Fix | Delete
</li>
[210] Fix | Delete
<?php endforeach ?>
[211] Fix | Delete
</ul>
[212] Fix | Delete
<?php do_action( 'wpml_after_active_languages_display' ); ?>
[213] Fix | Delete
<?php else: ?>
[214] Fix | Delete
<p class="wpml-wizard-instruction">
[215] Fix | Delete
<?php esc_html_e( 'Select the languages to enable for your site (you can also add and remove languages later).', 'sitepress' ) ?>
[216] Fix | Delete
</p>
[217] Fix | Delete
<?php endif; ?>
[218] Fix | Delete
<?php wp_nonce_field('wpml_set_default_language', 'set_default_language_nonce'); ?>
[219] Fix | Delete
<p class="buttons-wrap">
[220] Fix | Delete
<button id="icl_cancel_default_button" class="button-secondary action"><?php esc_html_e( 'Cancel', 'sitepress' ) ?></button>
[221] Fix | Delete
<button id="icl_save_default_button" class="button-primary action"><?php esc_html_e( 'Save', 'sitepress' ) ?></button>
[222] Fix | Delete
</p>
[223] Fix | Delete
<?php if(!empty( $setup_complete )): ?>
[224] Fix | Delete
<p>
[225] Fix | Delete
<button id="icl_change_default_button" class="button-secondary action <?php if(count($active_languages) < 2): ?>hidden<?php endif ?>">
[226] Fix | Delete
<?php esc_html_e( 'Change default language', 'sitepress' ) ?>
[227] Fix | Delete
</button>
[228] Fix | Delete
<button id="icl_add_remove_button" class="button-secondary action">
[229] Fix | Delete
<?php esc_html_e( 'Add / Remove languages', 'sitepress' ) ?>
[230] Fix | Delete
</button>
[231] Fix | Delete
</p>
[232] Fix | Delete
<p class="icl_ajx_response" id="icl_ajx_response"></p>
[233] Fix | Delete
<?php endif; ?>
[234] Fix | Delete
<div id="icl_avail_languages_picker" class="<?php if( !empty( $setup_complete ) ) echo 'hidden'; ?>">
[235] Fix | Delete
<ul class="available-languages">
[236] Fix | Delete
<?php
[237] Fix | Delete
foreach ( $languages as $lang ) {
[238] Fix | Delete
$checked = checked( '1', $lang['active'], false );
[239] Fix | Delete
$disabled = disabled( $default_language, $lang['code'], false );
[240] Fix | Delete
[241] Fix | Delete
$language_item_classes = array();
[242] Fix | Delete
if ( (bool) $lang['active'] ) {
[243] Fix | Delete
$language_item_classes[] = 'wpml-selected';
[244] Fix | Delete
}
[245] Fix | Delete
?>
[246] Fix | Delete
<li class="<?php echo implode( ' ', $language_item_classes ); ?>">
[247] Fix | Delete
<label for="wpml-language-<?php echo $lang['code'] ?>">
[248] Fix | Delete
<input type="checkbox" id="wpml-language-<?php echo esc_attr( $lang['code'] ) ?>"
[249] Fix | Delete
value="<?php echo esc_attr( $lang['code'] ) ?>" <?php echo $checked . ' ' . $disabled; ?>/>
[250] Fix | Delete
<img src="<?php echo $sitepress->get_flag_url( $lang['code'] ) ?>" width="18" height="12">
[251] Fix | Delete
<?php echo esc_html( $lang['display_name'] ) ?>
[252] Fix | Delete
</label>
[253] Fix | Delete
</li>
[254] Fix | Delete
<?php
[255] Fix | Delete
}
[256] Fix | Delete
?>
[257] Fix | Delete
</ul>
[258] Fix | Delete
<?php if(!empty( $setup_complete )): ?>
[259] Fix | Delete
<p class="buttons-wrap">
[260] Fix | Delete
<input id="icl_cancel_language_selection" type="button" class="button-secondary action"
[261] Fix | Delete
value="<?php esc_attr_e( 'Cancel', 'sitepress' ) ?>" />
[262] Fix | Delete
<input id="icl_save_language_selection" type="button" class="button-primary action"
[263] Fix | Delete
value="<?php esc_attr_e( 'Save', 'sitepress' ) ?>" />
[264] Fix | Delete
</p>
[265] Fix | Delete
<?php endif; ?>
[266] Fix | Delete
<?php wp_nonce_field('wpml_set_active_languages', 'set_active_languages_nonce'); ?>
[267] Fix | Delete
</div>
[268] Fix | Delete
[269] Fix | Delete
<?php if (!empty( $setup_complete )): ?>
[270] Fix | Delete
<p>
[271] Fix | Delete
<a href="admin.php?page=<?php echo WPML_PLUGIN_FOLDER ?>/menu/languages.php&amp;trop=1">
[272] Fix | Delete
<?php esc_html_e( 'Edit Languages', 'sitepress' ) ?>
[273] Fix | Delete
</a>
[274] Fix | Delete
</p>
[275] Fix | Delete
<?php endif; ?>
[276] Fix | Delete
</div> <!-- wpml-section-content-inner -->
[277] Fix | Delete
[278] Fix | Delete
<?php if ( $setup_complete && $inactive_content && $inactive_content->has_entries() ) : ?>
[279] Fix | Delete
<div class="wpml-section-content-inner">
[280] Fix | Delete
<?php
[281] Fix | Delete
$render_inactive_content = new WPML_Inactive_Content_Render(
[282] Fix | Delete
$inactive_content,
[283] Fix | Delete
array( WPML_PLUGIN_PATH . '/templates/languages/' )
[284] Fix | Delete
);
[285] Fix | Delete
[286] Fix | Delete
echo $render_inactive_content->render();
[287] Fix | Delete
?>
[288] Fix | Delete
</div> <!-- wpml-section-content-inner -->
[289] Fix | Delete
<?php endif; ?>
[290] Fix | Delete
[291] Fix | Delete
<?php if ( 2 === (int) $setup_wizard_step ): ?>
[292] Fix | Delete
<footer class="clearfix text-right">
[293] Fix | Delete
<input id="icl_setup_back_1" class="button-secondary alignleft" name="save" value="<?php esc_attr_e( 'Back', 'sitepress' ) ?>" type="button" />
[294] Fix | Delete
<?php wp_nonce_field('setup_got_to_step1_nonce', '_icl_nonce_gts1'); ?>
[295] Fix | Delete
<input id="icl_setup_next_1" class="button-primary alignright" name="save"
[296] Fix | Delete
value="<?php esc_attr_e( 'Next', 'sitepress' ) ?>" type="button"
[297] Fix | Delete
<?php disabled( count( $active_languages ) < 2 ) ?> />
[298] Fix | Delete
</footer>
[299] Fix | Delete
<?php endif; ?>
[300] Fix | Delete
[301] Fix | Delete
</div> <!-- .wcml-section-content -->
[302] Fix | Delete
</div> <!-- .wpml-section-languages -->
[303] Fix | Delete
[304] Fix | Delete
<?php elseif ( $setup_wizard_step === 4 ): ?>
[305] Fix | Delete
[306] Fix | Delete
<div class="wpml-section wpml-section-wpml-theme-and-plugins-reporting" id="lang-sec-compatibility">
[307] Fix | Delete
<div class="wpml-section-header">
[308] Fix | Delete
<h3>
[309] Fix | Delete
<?php esc_html_e( 'Compatibility reporting', 'sitepress' ); ?>
[310] Fix | Delete
</h3>
[311] Fix | Delete
</div>
[312] Fix | Delete
<div class="wpml-section-content">
[313] Fix | Delete
<p class="wpml-wizard-instruction">
[314] Fix | Delete
<?php esc_html_e( 'The WPML plugin can send a list of active plugins and theme used in your site to wpml.org. This allows our support team to help you much faster and to contact you in advance about potential compatibility problems and their solutions.',
[315] Fix | Delete
'sitepress' ); ?>
[316] Fix | Delete
</p>
[317] Fix | Delete
<?php
[318] Fix | Delete
$compatibility_reports_before_setup_args = $compatibility_reports_args;
[319] Fix | Delete
$compatibility_reports_before_setup_args['use_radio'] = true;
[320] Fix | Delete
do_action( 'otgs_installer_render_local_components_setting', $compatibility_reports_before_setup_args );
[321] Fix | Delete
?>
[322] Fix | Delete
</div>
[323] Fix | Delete
[324] Fix | Delete
<footer class="clearfix text-right">
[325] Fix | Delete
<input id="icl_setup_back_3"
[326] Fix | Delete
class="button-secondary alignleft"
[327] Fix | Delete
name="save"
[328] Fix | Delete
value="<?php esc_attr_e( 'Back', 'sitepress' ) ?>"
[329] Fix | Delete
type="button"/>
[330] Fix | Delete
<?php wp_nonce_field( 'setup_got_to_step3_nonce', '_icl_nonce_gts3' ); ?>
[331] Fix | Delete
<input id="icl_setup_next_5" class="button-primary alignright" name="save"
[332] Fix | Delete
value="<?php esc_attr_e( 'Next', 'sitepress' ) ?>" type="button"
[333] Fix | Delete
/>
[334] Fix | Delete
<?php wp_nonce_field( 'setup_got_to_step5_nonce', '_icl_nonce_gts5' ); ?>
[335] Fix | Delete
</footer>
[336] Fix | Delete
</div>
[337] Fix | Delete
[338] Fix | Delete
<?php
[339] Fix | Delete
elseif ( $setup_wizard_step === 5 ): ?>
[340] Fix | Delete
<?php $site_key = WP_Installer()->get_site_key('wpml'); ?>
[341] Fix | Delete
<div class="wpml-section" id="lang-sec-0">
[342] Fix | Delete
<div class="wpml-section-header">
[343] Fix | Delete
<h3><?php esc_html_e( 'Registration', 'sitepress' ) ?></h3>
[344] Fix | Delete
</div>
[345] Fix | Delete
<div class="wpml-section-content">
[346] Fix | Delete
[347] Fix | Delete
<?php if(is_multisite() && !empty($site_key)): ?>
[348] Fix | Delete
[349] Fix | Delete
<p class="wpml-wizard-instruction"><?php esc_html_e( 'WPML is already registered network-wide.', 'sitepress' ) ?></p>
[350] Fix | Delete
<footer class="clearfix text-right">
[351] Fix | Delete
<form id="installer_registration_form">
[352] Fix | Delete
<input type="hidden" name="action" value="installer_save_key" />
[353] Fix | Delete
<input type="hidden" name="button_action" value="installer_save_key" />
[354] Fix | Delete
<input <?php if(empty($site_key)): ?>style="display: none;"<?php endif; ?> class="button-primary button-large"
[355] Fix | Delete
name="finish" value="<?php esc_attr_e( 'Finish', 'sitepress' ) ?>" type="submit" />
[356] Fix | Delete
<?php wp_nonce_field('registration_form_submit_nonce', '_icl_nonce'); ?>
[357] Fix | Delete
</form>
[358] Fix | Delete
</footer>
[359] Fix | Delete
[360] Fix | Delete
<?php else: ?>
[361] Fix | Delete
[362] Fix | Delete
<p class="wpml-wizard-instruction">
[363] Fix | Delete
<?php esc_html_e( 'Enter the site key, from your wpml.org account, to receive automatic updates for WPML on this site.', 'sitepress' ) ?>
[364] Fix | Delete
</p>
[365] Fix | Delete
<form id="installer_registration_form">
[366] Fix | Delete
<input type="hidden" name="action" value="installer_save_key" />
[367] Fix | Delete
<input type="hidden" name="button_action" value="installer_save_key" />
[368] Fix | Delete
<label for="installer_site_key">
[369] Fix | Delete
<?php esc_html_e( 'Site key:', 'sitepress' ) ?>
[370] Fix | Delete
<input type="text" name="installer_site_key" value="<?php echo esc_attr( $site_key ) ?>" <?php disabled( ! empty( $site_key ) ) ?> />
[371] Fix | Delete
</label>
[372] Fix | Delete
[373] Fix | Delete
<div class="status_msg<?php if ( ! empty( $site_key ) ): ?> icl_valid_text<?php endif; ?>">
[374] Fix | Delete
<?php
[375] Fix | Delete
if ( $site_key ) {
[376] Fix | Delete
esc_html_e( 'Thank you for registering WPML on this site. You will receive automatic updates when new versions are available.', 'sitepress' );
[377] Fix | Delete
}
[378] Fix | Delete
?>
[379] Fix | Delete
</div>
[380] Fix | Delete
[381] Fix | Delete
<div class="text-right">
[382] Fix | Delete
<?php if ( empty( $site_key ) ): ?>
[383] Fix | Delete
<input class="button-primary" name="register" value="<?php esc_attr_e( 'Register', 'sitepress' ) ?>" type="submit" />
[384] Fix | Delete
<input class="button-secondary" name="later" value="<?php esc_attr_e( 'Remind me later', 'sitepress' ) ?>" type="submit" />
[385] Fix | Delete
<?php endif; ?>
[386] Fix | Delete
<input <?php if(empty($site_key)): ?>style="display: none;"<?php endif; ?> class="button-primary button-large button" name="finish"
[387] Fix | Delete
value="<?php esc_attr_e( 'Finish', 'sitepress' ) ?>" type="submit" />
[388] Fix | Delete
[389] Fix | Delete
<?php wp_nonce_field('registration_form_submit_nonce', '_icl_nonce'); ?>
[390] Fix | Delete
</div>
[391] Fix | Delete
[392] Fix | Delete
</form>
[393] Fix | Delete
[394] Fix | Delete
<?php endif; ?>
[395] Fix | Delete
[396] Fix | Delete
<?php if(empty($site_key)): ?>
[397] Fix | Delete
<hr class="wpml-margin-top-base">
[398] Fix | Delete
<p>
[399] Fix | Delete
<?php
[400] Fix | Delete
printf(
[401] Fix | Delete
esc_html__( "Don't have a key for this site? %sGenerate a key for this site%s", 'sitepress' ),
[402] Fix | Delete
'<a class="button-primary" href="https://wpml.org/my-account/sites/?add=' . urlencode( get_site_url() ) . '" target="_blank">', '</a>'
[403] Fix | Delete
)
[404] Fix | Delete
?>
[405] Fix | Delete
</p>
[406] Fix | Delete
<p>
[407] Fix | Delete
<?php
[408] Fix | Delete
printf(
[409] Fix | Delete
esc_html__( "If you don't have a WPML.org account or a valid subscription, you can %spurchase%s one and get later upgrades, full support and 30 days money-back guarantee.", 'sitepress' ),
[410] Fix | Delete
'<a href="http://wpml.org/purchase/" target="_blank">', '</a>'
[411] Fix | Delete
)
[412] Fix | Delete
?>
[413] Fix | Delete
</p>
[414] Fix | Delete
<?php endif; ?>
[415] Fix | Delete
</div>
[416] Fix | Delete
</div>
[417] Fix | Delete
[418] Fix | Delete
<?php endif; ?>
[419] Fix | Delete
[420] Fix | Delete
[421] Fix | Delete
<?php if(!empty( $setup_complete )): ?>
[422] Fix | Delete
<?php
[423] Fix | Delete
if ( !class_exists ( 'WP_Http' ) ) {
[424] Fix | Delete
include_once ABSPATH . WPINC . '/class-http.php';
[425] Fix | Delete
}
[426] Fix | Delete
/**
[427] Fix | Delete
* @var WPML_URL_Converter $wpml_url_converter
[428] Fix | Delete
* @var WPML_Request $wpml_request_handler
[429] Fix | Delete
*/
[430] Fix | Delete
global $wpml_url_converter, $wpml_request_handler;
[431] Fix | Delete
[432] Fix | Delete
$validator = wpml_get_langs_in_dirs_val ( new WP_Http(), $wpml_url_converter );
[433] Fix | Delete
?>
[434] Fix | Delete
<?php if(count($active_languages) > 1): ?>
[435] Fix | Delete
<div class="wpml-section wpml-section-url-format" id="lang-sec-2">
[436] Fix | Delete
<div class="wpml-section-header">
[437] Fix | Delete
<h3><?php esc_html_e( 'Language URL format', 'sitepress' ) ?></h3>
[438] Fix | Delete
</div>
[439] Fix | Delete
<div class="wpml-section-content">
[440] Fix | Delete
<h4><?php esc_html_e( 'Choose how to determine which language visitors see contents in', 'sitepress' ) ?></h4>
[441] Fix | Delete
<form id="icl_save_language_negotiation_type" name="icl_save_language_negotiation_type" action="">
[442] Fix | Delete
<?php wp_nonce_field('save_language_negotiation_type', 'save_language_negotiation_type_nonce') ?>
[443] Fix | Delete
<ul>
[444] Fix | Delete
<?php
[445] Fix | Delete
[446] Fix | Delete
$abs_home = $wpml_url_converter->get_abs_home();
[447] Fix | Delete
$icl_folder_url_disabled = $validator->validate_langs_in_dirs ( $sample_lang['code'] );
[448] Fix | Delete
?>
[449] Fix | Delete
<li>
[450] Fix | Delete
<label>
[451] Fix | Delete
<input type="radio" name="icl_language_negotiation_type" value="1" <?php checked( 1 == $language_negotiation_type ) ?> />
[452] Fix | Delete
<?php esc_html_e( 'Different languages in directories', 'sitepress' ) ?>
[453] Fix | Delete
<span class="explanation-text">
[454] Fix | Delete
(<?php
[455] Fix | Delete
$root = !empty( $setting_urls['directory_for_default_language']);
[456] Fix | Delete
echo $validator->print_explanation( $sample_lang['code'], $root );?>)
[457] Fix | Delete
</span>
[458] Fix | Delete
</label>
[459] Fix | Delete
[460] Fix | Delete
<div id="icl_use_directory_wrap" style="<?php if( $language_negotiation_type != 1): ?>display:none;<?php endif; ?>" >
[461] Fix | Delete
<p class="sub-section">
[462] Fix | Delete
<label>
[463] Fix | Delete
<input type="checkbox" name="use_directory" id="icl_use_directory" value="1"
[464] Fix | Delete
<?php checked( ! empty( $setting_urls['directory_for_default_language'] ) ) ?> />
[465] Fix | Delete
<?php esc_html_e( 'Use directory for default language', 'sitepress' ) ?>
[466] Fix | Delete
</label>
[467] Fix | Delete
</p>
[468] Fix | Delete
[469] Fix | Delete
<div id="icl_use_directory_details" class="sub-section" <?php if(empty( $setting_urls['directory_for_default_language'])) echo ' style="display:none"' ?> >
[470] Fix | Delete
[471] Fix | Delete
<p><?php esc_html_e( 'What to show for the root url:', 'sitepress' ) ?></p>
[472] Fix | Delete
[473] Fix | Delete
<ul>
[474] Fix | Delete
<li>
[475] Fix | Delete
<label for="wpml_show_on_root_html_file">
[476] Fix | Delete
<input id="wpml_show_on_root_html_file" type="radio" name="show_on_root"
[477] Fix | Delete
value="html_file" <?php checked( 'html_file' === $setting_urls['show_on_root'] ) ?> />
[478] Fix | Delete
<?php esc_html_e( 'HTML file', 'sitepress' ) ?> &ndash;
[479] Fix | Delete
<span class="explanation-text">
[480] Fix | Delete
<?php esc_html_e( 'please enter path: absolute or relative to the WordPress installation folder', 'sitepress' ) ?>
[481] Fix | Delete
</span>
[482] Fix | Delete
</label>
[483] Fix | Delete
<p>
[484] Fix | Delete
<input type="text" id="root_html_file_path" name="root_html_file_path" value="<?php echo esc_attr( $setting_urls['root_html_file_path'] ) ?>" />
[485] Fix | Delete
<label class="icl_error_text icl_error_1" for="root_html_file_path" style="display: none;">
[486] Fix | Delete
<?php esc_html_e( 'Please select what to show for the root url.', 'sitepress' ) ?>
[487] Fix | Delete
</label>
[488] Fix | Delete
</p>
[489] Fix | Delete
</li>
[490] Fix | Delete
[491] Fix | Delete
<li>
[492] Fix | Delete
<label>
[493] Fix | Delete
<input id="wpml_show_on_root_page" type="radio" name="show_on_root" value="page"
[494] Fix | Delete
<?php checked( 'page' === $setting_urls['show_on_root'] ) ?>
[495] Fix | Delete
<?php if($setting_urls['show_on_root'] === 'page'):?>class="active"<?php endif; ?>
[496] Fix | Delete
/>
[497] Fix | Delete
<?php esc_html_e( 'A page', 'sitepress' ) ?>
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function