: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
<span style="display: none;" id="wpml_show_page_on_root_x"><?php esc_html_e( 'Please save the settings first by clicking Save.', 'sitepress' ) ?></span>
<span id="wpml_show_page_on_root_details" <?php if($setting_urls['show_on_root'] !== 'page'):
?>style="display:none"<?php endif; ?>>
if(!empty( $setting_urls['root_page'])){
$rp = get_post( $setting_urls['root_page']);
if($rp && $rp->post_status !== 'trash'){
<a href="<?php echo get_edit_post_link( $setting_urls['root_page']) ?>">
<?php esc_html_e( 'Edit root page.', 'sitepress' ) ?>
<a href="<?php echo admin_url('post-new.php?post_type=page&wpml_root_page=1') ?>">
<?php esc_html_e( 'Create root page.', 'sitepress' ) ?>
<p id="icl_hide_language_switchers" class="sub-section" <?php if($setting_urls['show_on_root'] !== 'page'): ?>style="display:none"<?php endif; ?>>
<input type="checkbox" name="hide_language_switchers" id="icl_hide_language_switchers"
value="1" <?php checked( $setting_urls['hide_language_switchers']) ?> />
<?php esc_html_e( 'Hide language switchers on the root page', 'sitepress' ) ?>
<?php if ( $icl_folder_url_disabled ): ?>
<div class="icl_error_text" style="margin:10px;">
<?php esc_html_e( 'It looks like languages per directories will not function.', 'sitepress' ) ?>
<a href="#" onClick="jQuery(this).parent().parent().next().toggle();return false">
<?php esc_html_e( 'Details', 'sitepress' ) ?>
<div class="icl_error_text" style="display:none;margin:10px;">
<p><?php esc_html_e( 'This can be a result of either:', 'sitepress' ) ?></p>
<li><?php esc_html_e( "WordPress is installed in a directory (not root) and you're using default links.", 'sitepress' ) ?></li>
<li><?php esc_html_e( 'URL rewriting is not enabled in your web server.', 'sitepress' ) ?></li>
<li><?php esc_html_e( 'The web server cannot write to the .htaccess file', 'sitepress' ) ?></li>
<a href="https://wpml.org/?page_id=1010"><?php esc_html_e( 'How to fix', 'sitepress' ) ?></a>
<?php printf(__('When WPML accesses <a target="_blank" href="%s">%s</a> it gets:', 'sitepress'), $__url = $validator->get_validation_url($sample_lang['code']), $__url); ?>
echo $validator->print_error_response ();
<?php printf( esc_html__( 'The expected value is: %s', 'sitepress' ), '<br /><strong><!--' . get_home_url() . '--></strong>' ) ?>
if ( isset( $wpmu_version ) || ( function_exists( 'is_multisite' ) && is_multisite() && ( ! defined( 'WPML_SUNRISE_MULTISITE_DOMAINS' ) || ! WPML_SUNRISE_MULTISITE_DOMAINS ) ) ) {
$icl_lnt_disabled = 'disabled="disabled" ';
<input <?php echo $icl_lnt_disabled ?>id="icl_lnt_domains" type="radio" name="icl_language_negotiation_type"
value="2" <?php checked( 2 == $language_negotiation_type ) ?> />
<?php esc_html_e( 'A different domain per language', 'sitepress' ) ?>
<?php if($icl_lnt_disabled): ?>
<span class="icl_error_text"><?php esc_html_e( 'This option is not yet available for Multisite installs', 'sitepress' ) ?></span>
<?php if(defined('WPML_SUNRISE_MULTISITE_DOMAINS') && WPML_SUNRISE_MULTISITE_DOMAINS): ?>
<span class="icl_error_text"><?php esc_html_e( 'Experimental', 'sitepress' ) ?></span>
<?php wp_nonce_field('language_domains_nonce', '_icl_nonce_ldom', false); ?>
<?php wp_nonce_field('validate_language_domain', 'validate_language_domain_nonce', false); ?>
<div id="icl_lnt_domains_box">
<?php if ( (int) $language_negotiation_type === 2 ):
$domains_box = new WPML_Lang_Domains_Box( $sitepress );
echo $domains_box->render();
<div id="language_domain_xdomain_options" class="sub-section" <?php if( $language_negotiation_type != 2 ) echo ' style="display:none"' ?>>
<p><?php esc_html_e( 'Pass session arguments between domains through the language switcher', 'sitepress' ) ?></p>
<input type="radio" name="icl_xdomain_data"
value="<?php echo WPML_XDOMAIN_DATA_GET ?>"
<?php checked( WPML_XDOMAIN_DATA_GET === (int) $sitepress_settings['xdomain_data'] ) ?>/>
<?php esc_html_e( 'Pass arguments via GET (the url)', 'sitepress' ) ?>
<input type="radio" name="icl_xdomain_data"
value="<?php echo WPML_XDOMAIN_DATA_POST ?>"
<?php checked( WPML_XDOMAIN_DATA_POST === (int) $sitepress_settings['xdomain_data'] ) ?>/>
<?php esc_html_e( 'Pass arguments via POST', 'sitepress' ) ?>
<input type="radio" name="icl_xdomain_data"
value="<?php echo WPML_XDOMAIN_DATA_OFF ?>"
<?php checked( WPML_XDOMAIN_DATA_OFF === (int) $sitepress_settings['xdomain_data'] ) ?>/>
<?php esc_html_e( 'Disable this feature', 'sitepress' ) ?>
<?php $encryptor_library = $encryptor->get_crypt_library(); ?>
<?php if( $encryptor_library === 'mcrypt' || $encryptor_library === 'openssl' ): ?>
<p><?php printf( esc_html__( 'The data will be encrypted with the %s algorithm.', 'sitepress' ),
$encryptor_library === 'mcrypt' ? 'MCRYPT_RIJNDAEL_256' : 'AES-256-CTR' ) ?></p>
<p><?php esc_html_e( 'Because encryption is not supported on your host, the data will only have a basic encoding with the bse64 algorithm.', 'sitepress' ) ?></p>
<p><a href="https://wpml.org/?page_id=693147" target="_blank"><?php esc_html_e( 'Learn more about passing data between domains', 'sitepress' ) ?></a></p>
<input type="radio" name="icl_language_negotiation_type" value="3" <?php checked( 3 == $language_negotiation_type ) ?> />
<?php esc_html_e( 'Language name added as a parameter', 'sitepress' ) ?>
<span class="explanation-text">
<?php echo sprintf( '(%s?lang=%s - %s)', get_home_url(), esc_html( $sample_lang['code'] ), esc_html( $sample_lang['display_name'] ) ) ?>
<div class="wpml-form-message" style="display:none;"></div>
<div class="wpml-form-errors icl_form_errors" style="display: none;"></div>
<span class="icl_ajx_response" id="icl_ajx_response2"></span>
<input class="button button-primary" name="save" value="<?php esc_html_e( 'Save', 'sitepress' ) ?>" type="submit" />
</div> <!-- .wpml-section-url-format -->
<?php do_action( 'wpml_admin_after_languages_url_format' ); ?>
<?php if(!empty( $setup_complete ) && count($all_languages) > 1 && ! $should_hide_admin_language): ?>
<div class="wpml-section wpml-section-admin-language" id="lang-sec-4">
<div class="wpml-section-header">
<h3><?php esc_html_e( 'Admin language', 'sitepress' ) ?></h3>
<div class="wpml-section-content">
<form id="icl_admin_language_options" name="icl_admin_language_options" action="">
<?php wp_nonce_field('icl_admin_language_options_nonce', '_icl_nonce'); ?>
<?php _e('Default admin language: ', 'sitepress'); ?>
<?php $default_language_details = $sitepress->get_language_details( $default_language ); ?>
<select name="icl_admin_default_language">
<option value="_default_"><?php printf( esc_html__( 'Default language (currently %s)', 'sitepress' ), $default_language_details['display_name'] ) ?></option>
<?php foreach($all_languages as $al):?>
<?php if ( $al['active'] ): ?>
<option value="<?php echo esc_attr( $al['code'] ) ?>" <?php selected( $sitepress->get_setting( 'admin_default_language' ) == $al['code'] ) ?>>
echo esc_html( $al['display_name'] );
if ( $sitepress->get_admin_language() != $al['code'] ) {
echo ' (' . esc_html( $al['native_name'] ) . ')';
<?php foreach($all_languages as $al):?>
<?php if(!$al['active']): ?>
<option value="<?php echo esc_attr( $al['code'] ) ?>" <?php selected( $sitepress->get_setting( 'admin_default_language' ) == $al['code'] ) ?>>
echo esc_html( $al['display_name'] );
if ( $sitepress->get_admin_language() != $al['code'] ) {
echo ' (' . esc_html( $al['native_name'] ) . ')';
<p><?php printf( __( 'Each user can choose the admin language. You can edit your language preferences by visiting your <a href="%s">profile page</a>.', 'sitepress' ), 'profile.php#wpml' ) ?></p>
<span class="icl_ajx_response" id="icl_ajx_response_al"></span>
<input class="button button-primary" name="save" value="<?php esc_html_e( 'Save', 'sitepress' ) ?>" type="submit" />
<?php if(!empty( $setup_complete ) && count($active_languages) > 1): ?>
<div class="wpml-section wpml-section-hide-languages" id="lang-sec-7">
<div class="wpml-section-header">
<h3><?php esc_html_e( 'Hide languages', 'sitepress' ) ?></h3>
<div class="wpml-section-content">
<p><?php esc_html_e( 'You can completely hide content in specific languages from visitors and search engines, but still view it yourself. This allows reviewing translations that are in progress.', 'sitepress' ) ?></p>
<form id="icl_hide_languages" name="icl_hide_languages" action="">
<?php wp_nonce_field('icl_hide_languages_nonce', '_icl_nonce') ?>
<?php foreach($active_languages as $l): ?>
<?php if($l['code'] == $default_language_details['code']) continue; ?>
<input type="checkbox" name="icl_hidden_languages[]" value="<?php echo esc_attr( $l['code'] ) ?>"
<?php checked( ! empty( $hidden_languages ) && in_array( $l['code'], $hidden_languages ) ) ?> />
<?php echo esc_html( $l['display_name'] ) ?>
<p id="icl_hidden_languages_status">
if (!empty( $hidden_languages )){
//While checking for hidden languages, it cleans any possible leftover from inactive or deleted languages
if ( 1 == count( $hidden_languages ) ) {
if ( isset( $active_languages[ $hidden_languages[ 0 ] ] ) ) {
printf( esc_html__( '%s is currently hidden to visitors.', 'sitepress' ), esc_html( $active_languages[ $hidden_languages[0] ]['display_name'] ) );
$hidden_languages[] = $hidden_languages[ 0 ];
foreach ( $hidden_languages as $l ) {
if ( isset( $active_languages[ $l ] ) ) {
$_hlngs[ ] = $active_languages[ $l ][ 'display_name' ];
$hlangs = implode( ', ', $_hlngs );
printf( esc_html__( '%s are currently hidden to visitors.', 'sitepress' ), esc_html( $hlangs ) );
$hidden_languages = array_unique($hidden_languages);
$sitepress->set_setting('hidden_languages', $hidden_languages);
printf( __( 'You can enable its/their display for yourself, in your <a href="%s">profile page</a>.', 'sitepress' ), 'profile.php#wpml' );
esc_html_e( 'All languages are currently displayed.', 'sitepress' );
<span class="icl_ajx_response" id="icl_ajx_response_hl"></span>
<input class="button button-primary" name="save" value="<?php esc_attr_e( 'Save', 'sitepress' ) ?>" type="submit" />
<div class="wpml-section wpml-section-ml-themes" id="lang-sec-8">
<div class="wpml-section-header">
<h3><?php esc_html_e( 'Make themes work multilingual', 'sitepress' ) ?></h3>
<div class="wpml-section-content">
<form id="icl_adjust_ids" name="icl_adjust_ids" action="">
<?php wp_nonce_field('icl_adjust_ids_nonce', '_icl_nonce'); ?>
<p><?php esc_html_e( 'This feature turns themes into multilingual, without having to edit their PHP files.', 'sitepress' ) ?></p>
<input type="checkbox" value="1" name="icl_adjust_ids" <?php checked( $sitepress->get_setting( 'auto_adjust_ids' ) ) ?> />
<?php esc_html_e( 'Adjust IDs for multilingual functionality', 'sitepress' ) ?>
<p class="explanation-text"><?php esc_html_e( 'Note: auto-adjust IDs will increase the number of database queries for your site.', 'sitepress' ) ?></p>
<span class="icl_ajx_response" id="icl_ajx_response_ai"></span>
<input class="button button-primary" name="save" value="<?php esc_attr_e( 'Save', 'sitepress' ) ?>" type="submit" />
<div class="wpml-section wpml-section-redirect" id="lang-sec-9">
<div class="wpml-section-header">
<h3><?php esc_html_e( 'Browser language redirect', 'sitepress' ) ?></h3>
<div class="wpml-section-content">
<p><?php esc_html_e( 'WPML can automatically redirect visitors according to browser language.', 'sitepress' ) ?></p>
<p class="explanation-text"><?php esc_html_e( "This feature uses Javascript. Make sure that your site doesn't have JS errors.", 'sitepress' ) ?></p>
<form id="icl_automatic_redirect" name="icl_automatic_redirect" action="">
<?php wp_nonce_field('icl_automatic_redirect_nonce', '_icl_nonce') ?>
<input type="radio" value="0" name="icl_automatic_redirect" <?php checked( empty( $automatic_redirect ) ) ?> />
<?php esc_html_e( 'Disable browser language redirect', 'sitepress' ) ?>
<input type="radio" value="1" name="icl_automatic_redirect" <?php checked( 1, $automatic_redirect ) ?> />
<?php esc_html_e( 'Redirect visitors based on browser language only if translations exist', 'sitepress' ) ?>
<input type="radio" value="2" name="icl_automatic_redirect" <?php checked( 2, $automatic_redirect ) ?> />
<?php esc_html_e( 'Always redirect visitors based on browser language (redirect to home page if translations are missing)', 'sitepress' ) ?>
esc_html__( "Remember visitors' language preference for %s hours (please enter 24 or multiples of it).", 'sitepress' ),
'<input size="2" type="number" min="24" value="' . (int) $sitepress->get_setting( 'remember_language' ) . '" name="icl_remember_language" /> '
<?php if(!$wpml_request_handler->get_cookie_lang()): ?>
<span class="icl_error_text"><?php esc_html_e( "Your browser doesn't seem to be allowing cookies to be set.", 'sitepress' ) ?></span>
<div class="wpml-form-message update-nag js-redirect-warning"<?php if( empty( $automatic_redirect ) ) : ?> style="display: none;"<?php endif; ?>>
$redirect_warning_1 = esc_html__( "Browser language redirect may affect your site's indexing", 'sitepress' );
$redirect_warning_2 = esc_html__( 'learn more', 'sitepress' );
$url = 'https://wpml.org/documentation/getting-started-guide/language-setup/automatic-redirect-based-on-browser-language/how-browser-language-redirect-affects-google-indexing/';
echo $redirect_warning_1 . '- <a href="' . $url . '" target="_blank">' . $redirect_warning_2 . '</a>';
<span class="icl_ajx_response" id="icl_ajx_response_ar"></span>
<input class="button button-primary" name="save" value="<?php esc_attr_e( 'Save', 'sitepress' ) ?>" type="submit" />
<?php if(!empty( $setup_complete )): ?>
$request_get_page = filter_input(INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_NULL_ON_FAILURE);
do_action('icl_extra_options_' . $request_get_page);
$seo_ui = new WPML_SEO_HeadLangs( $sitepress, new WPML_Queried_Object_Factory() );
<div class="wpml-section wpml-section-wpml-love" id="lang-sec-10">
<div class="wpml-section-header">
<h3><?php esc_html_e( 'WPML love', 'sitepress' ) ?></h3>
<div class="wpml-section-content">
<form id="icl_promote_form" name="icl_promote_form" action="">
<?php wp_nonce_field('icl_promote_form_nonce', '_icl_nonce'); ?>
<label><input type="checkbox" name="icl_promote" <?php checked( $sitepress->get_setting( 'promote_wpml' ) ) ?> value="1" />
<?php printf(__("Tell the world your site is running multilingual with WPML (places a message in your site's footer) - <a href=\"%s\">read more</a>", 'sitepress'),'https://wpml.org/?page_id=4560'); ?></label>
<span class="icl_ajx_response" id="icl_ajx_response_lv"></span>
<input class="button button-primary" name="save" value="<?php esc_attr_e( 'Save', 'sitepress' ) ?>" type="submit" />
do_action( 'wpml_after_settings', $theme_wpml_config_file );
* @deprecated use `wpml_after_settings` instead
do_action( 'wpml_admin_after_wpml_love', $theme_wpml_config_file );
* @deprecated use `wpml_menu_footer` instead
do_action( 'icl_menu_footer' );
do_action( 'wpml_menu_footer' );
//Save any changed setting
$sitepress->save_settings();