I am trying to:
Change the Content Template on a page assign as the default language other than the default language of the website.
The Content Template selection is disabled on all languages for this page (the French and English page).
The website is set to Default Language English.
The french page has been set as the original language for this page
"Make French the original language for this page"
Link to a page where the issue can be seen:
In the page editor in the admin.
I expected to see:
The Content Template drop down on the page editor enabled on the french page.
Instead, I got:
The Content Template drop down on the page editor disabled on all languages for this page (the french page and on the english page).
The problematic code is here (it doesn't check for the page original language but for the site default language)
function content_template_select_meta_box( $post ) {
...
// Works when creating a new post, where the previous one gives false positives
if ( $is_in_wpml_original_language ) {
$is_in_wpml_original_language = ( $wpml_current_language == $wpml_default_language );
}
...
<?php
if ( ! $is_in_wpml_original_language ) {
?>
<p class="toolset-alert toolset-alert-info">
<?php
echo __( 'The Content Template is copied from the original language' , 'wpv-views' );
?>
</p>
<?php
}