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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/sitepres.../menu
File: troubleshooting.php
[500] Fix | Delete
alert('<?php echo esc_js(__('Done', 'sitepress')) ?>');
[501] Fix | Delete
[502] Fix | Delete
response_element.fadeOut();
[503] Fix | Delete
assign_translation_status_to_duplicates_loader.fadeOut(function() {
[504] Fix | Delete
assign_translation_status_to_duplicates_element.remove(assign_translation_status_to_duplicates_loader);
[505] Fix | Delete
});
[506] Fix | Delete
assign_translation_status_to_duplicates_element.removeAttr('disabled');
[507] Fix | Delete
}
[508] Fix | Delete
},
[509] Fix | Delete
error: function (xhr, status, error) {
[510] Fix | Delete
var parsed_response = parse_xhr_error(xhr, status, error);
[511] Fix | Delete
response_element.text('');
[512] Fix | Delete
response_element.html(parsed_response);
[513] Fix | Delete
assign_translation_status_to_duplicates_loader.fadeOut(function() {
[514] Fix | Delete
assign_translation_status_to_duplicates_element.remove(assign_translation_status_to_duplicates_loader);
[515] Fix | Delete
});
[516] Fix | Delete
assign_translation_status_to_duplicates_element.attr('disabled', 'disabled');
[517] Fix | Delete
}
[518] Fix | Delete
});
[519] Fix | Delete
}
[520] Fix | Delete
[521] Fix | Delete
jQuery('#icl_add_missing_lang').click(function () {
[522] Fix | Delete
var self = jQuery(this);
[523] Fix | Delete
self.attr('disabled', 'disabled');
[524] Fix | Delete
self.after(icl_ajxloaderimg);
[525] Fix | Delete
jQuery.post(location.href + '&debug_action=icl_ts_add_missing_language&nonce=<?php echo wp_create_nonce('icl_ts_add_missing_language'); ?>', function () {
[526] Fix | Delete
self.removeAttr('disabled');
[527] Fix | Delete
alert('<?php echo esc_js(__('Done', 'sitepress')) ?>');
[528] Fix | Delete
self.next().fadeOut();
[529] Fix | Delete
[530] Fix | Delete
});
[531] Fix | Delete
});
[532] Fix | Delete
[533] Fix | Delete
jQuery('#icl_fix_collation').click(function () {
[534] Fix | Delete
jQuery(this).attr('disabled', 'disabled');
[535] Fix | Delete
jQuery(this).after(icl_ajxloaderimg);
[536] Fix | Delete
jQuery.post(location.href + '&debug_action=icl_fix_collation&nonce=<?php echo wp_create_nonce('icl_fix_collation'); ?>', function () {
[537] Fix | Delete
jQuery('#icl_fix_collation').removeAttr('disabled');
[538] Fix | Delete
alert('<?php echo esc_js(__('Done', 'sitepress')) ?>');
[539] Fix | Delete
jQuery('#icl_fix_collation').next().fadeOut();
[540] Fix | Delete
[541] Fix | Delete
});
[542] Fix | Delete
});
[543] Fix | Delete
[544] Fix | Delete
jQuery('#icl_fix_terms_count').click(function () {
[545] Fix | Delete
var self = jQuery(this);
[546] Fix | Delete
self.attr('disabled', 'disabled');
[547] Fix | Delete
self.after(icl_ajxloaderimg);
[548] Fix | Delete
jQuery.post(location.href + '&debug_action=icl_fix_terms_count&nonce=<?php echo wp_create_nonce('icl_fix_terms_count'); ?>', function () {
[549] Fix | Delete
self.removeAttr('disabled');
[550] Fix | Delete
alert('<?php echo esc_js(__('Done', 'sitepress')) ?>');
[551] Fix | Delete
self.next().fadeOut();
[552] Fix | Delete
[553] Fix | Delete
});
[554] Fix | Delete
});
[555] Fix | Delete
[556] Fix | Delete
jQuery('#icl_remove_st_db_cache_logs').click(function () {
[557] Fix | Delete
var self = jQuery(this);
[558] Fix | Delete
self.attr('disabled', 'disabled');
[559] Fix | Delete
self.after(icl_ajxloaderimg);
[560] Fix | Delete
jQuery.post(location.href + '&debug_action=icl_remove_st_db_cache_logs&nonce=<?php echo wp_create_nonce('icl_remove_st_db_cache_logs'); ?>', function () {
[561] Fix | Delete
self.removeAttr('disabled');
[562] Fix | Delete
alert('<?php echo esc_js(__('Done', 'sitepress')) ?>');
[563] Fix | Delete
self.next().fadeOut();
[564] Fix | Delete
[565] Fix | Delete
});
[566] Fix | Delete
});
[567] Fix | Delete
})
[568] Fix | Delete
</script>
[569] Fix | Delete
<div class="icl_cyan_box">
[570] Fix | Delete
<h3><?php _e( 'Advanced settings', 'sitepress' ) ?></h3>
[571] Fix | Delete
[572] Fix | Delete
<p id="otgs_twig_cache_enable">
[573] Fix | Delete
<?php
[574] Fix | Delete
$twig_cache_disabled = (bool) get_option( $otgs_twig_cache_disable_key, false );
[575] Fix | Delete
$twig_cache_new_value = ! $twig_cache_disabled;
[576] Fix | Delete
$twig_cache_label = __( 'Disable cache for language switcher templates' , 'sitepress' );
[577] Fix | Delete
if ( $twig_cache_disabled ) {
[578] Fix | Delete
$twig_cache_label = __( 'Enable cache for language switcher templates' , 'sitepress' );
[579] Fix | Delete
}
[580] Fix | Delete
?>
[581] Fix | Delete
<input type="hidden" id="otgs_twig_cache_new_value" class="otgs_twig_cache_new_value" value="<?php echo $twig_cache_new_value; ?>"/>
[582] Fix | Delete
<input type="button" class="button-secondary" value="<?php echo $twig_cache_label; ?>"/><br/>
[583] Fix | Delete
</p>
[584] Fix | Delete
[585] Fix | Delete
</div><br clear="all"/>
[586] Fix | Delete
[587] Fix | Delete
<div class="icl_cyan_box">
[588] Fix | Delete
<h3><?php _e( 'Clean up', 'sitepress' ) ?></h3>
[589] Fix | Delete
[590] Fix | Delete
<p class="icl_form_errors" style="padding:6px;"><?php _e( 'Please make backup of your database before using this.', 'sitepress' ) ?></p>
[591] Fix | Delete
[592] Fix | Delete
<?php if ( !SitePress_Setup::languages_complete() ){ ?>
[593] Fix | Delete
<p>
[594] Fix | Delete
<br />
[595] Fix | Delete
<label><input type="checkbox" onchange="if(jQuery(this).prop('checked')){jQuery('#icl_fix_languages').prop('disabled', false);}else{jQuery('#icl_fix_languages').prop('disabled', true);}">
[596] Fix | Delete
&nbsp;<?php _e("This operation will reset WPML's language tables and reinstall it. Any custom languages that you added will be removed.", 'sitepress') ?></label><br /><br />
[597] Fix | Delete
<input disabled="disabled" id="icl_fix_languages" type="button" class="button-secondary" value="<?php _e( 'Clear language information and repopulate languages', 'sitepress' ) ?>"/><br/><br />
[598] Fix | Delete
<small style="margin-left:10px;"><?php _e( "This operation will remove WPML's language table and recreate it. You should use it if you just installed WPML and you're not seeing a complete list of available languages.", 'sitepress' ) ?></small>
[599] Fix | Delete
<br /><br />
[600] Fix | Delete
</p>
[601] Fix | Delete
<?php } ?>
[602] Fix | Delete
[603] Fix | Delete
<?php if(SitePress_Setup::setup_complete()) { ?>
[604] Fix | Delete
<?php do_action('wpml_troubleshooting_after_setup_complete_cleanup_begin'); ?>
[605] Fix | Delete
<?php do_action('before_setup_complete_troubleshooting_functions'); ?>
[606] Fix | Delete
<p>
[607] Fix | Delete
<select name="wpml_post_type">
[608] Fix | Delete
<?php foreach ( $sitepress->get_translatable_documents() as $key => $translatable_document ) : ?>
[609] Fix | Delete
<option value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $translatable_document->label ); ?></option>
[610] Fix | Delete
<?php endforeach; ?>
[611] Fix | Delete
</select>
[612] Fix | Delete
<input id="wpml_sync_posts_taxonomies" type="button" class="button-secondary" value="<?php esc_html_e( 'Synchronize posts taxonomies', 'sitepress' ); ?>"/> <span class="wpml-notice"></span><br/>
[613] Fix | Delete
<small style="margin-left:10px;"><?php esc_html_e( 'This will assign the same taxonomy terms as the source for each post translation.', 'sitepress' ); ?></small>
[614] Fix | Delete
</p>
[615] Fix | Delete
<p>
[616] Fix | Delete
<input id="icl_cache_clear" type="button" class="button-secondary" value="<?php _e( 'Clear the cache in WPML', 'sitepress' ) ?>"/><br/>
[617] Fix | Delete
<small style="margin-left:10px;"><?php _e( 'This may solve issues like missing languages in the language switcher.', 'sitepress' ) ?></small>
[618] Fix | Delete
</p>
[619] Fix | Delete
<p>
[620] Fix | Delete
<input id="icl_remove_ghost" type="button" class="button-secondary" value="<?php _e( 'Remove ghost entries from the translation tables', 'sitepress' ) ?>"/><br/>
[621] Fix | Delete
<small style="margin-left:10px;"><?php _e( 'Removes entries from the WPML tables that are not linked properly. Cleans the table off entries left over upgrades, bug fixes or undetermined factors.', 'sitepress' ) ?></small>
[622] Fix | Delete
</p>
[623] Fix | Delete
<p>
[624] Fix | Delete
<input id="icl_fix_collation" type="button" class="button-secondary" value="<?php _e( 'Fix element_type collation', 'sitepress' ) ?>"/><br/>
[625] Fix | Delete
<small style="margin-left:10px;"><?php _e( 'Fixes the collation of the element_type column in icl_translations in case this setting changed for your posts.post_type column.', 'sitepress' ) ?></small>
[626] Fix | Delete
</p>
[627] Fix | Delete
[628] Fix | Delete
<?php do_action( 'wpml_troubleshooting_after_fix_element_type_collation' ); ?>
[629] Fix | Delete
[630] Fix | Delete
<?php if(class_exists('TranslationManagement')){ ?>
[631] Fix | Delete
<p>
[632] Fix | Delete
<input id="assign_translation_status_to_duplicates" type="button" class="button-secondary" value="<?php _e( 'Assign translation status to duplicated content', 'sitepress' ) ?>"/><span id="assign_translation_status_to_duplicates_resp"></span><br/>
[633] Fix | Delete
<small style="margin-left:10px;"><?php _e( 'Sets the translation status to DUPLICATE in the icl_translation_status table, for posts that are marked as duplicated.', 'sitepress' ) ?> </small>
[634] Fix | Delete
</p>
[635] Fix | Delete
<?php } ?>
[636] Fix | Delete
<p>
[637] Fix | Delete
<input id="icl_add_missing_lang" type="button" class="button-secondary" value="<?php _e( 'Set language information', 'sitepress' ) ?>"/><br/>
[638] Fix | Delete
<small style="margin-left:10px;"><?php _e( 'Adds language information to posts and taxonomies that are missing this information.', 'sitepress' ) ?></small>
[639] Fix | Delete
</p>
[640] Fix | Delete
<p>
[641] Fix | Delete
<input id="icl_fix_terms_count" type="button" class="button-secondary" value="<?php _e( 'Fix terms count', 'sitepress' ) ?>"/><br/>
[642] Fix | Delete
<small style="margin-left:10px;"><?php _e( 'Correct terms count in case something went wrong with translated contents.', 'sitepress' ) ?></small>
[643] Fix | Delete
</p>
[644] Fix | Delete
<p>
[645] Fix | Delete
<input id="icl_fix_post_types" type="button" class="button-secondary" value="<?php _e( 'Fix post type assignment for translations', 'sitepress' ) ?>"/><br/>
[646] Fix | Delete
<small style="margin-left:10px;"><?php _e( 'Correct post type assignment for translations of custom post types in case something went wrong.', 'sitepress' ) ?></small>
[647] Fix | Delete
</p>
[648] Fix | Delete
[649] Fix | Delete
<?php if( get_option( 'wpml-st-persist-errors' ) ) { ?>
[650] Fix | Delete
<p>
[651] Fix | Delete
<input id="icl_remove_st_db_cache_logs" type="button" class="button-secondary" value="<?php _e( 'Remove debug logs of String Translation cache', 'sitepress' ) ?>"/><br/>
[652] Fix | Delete
<small style="margin-left:10px;"><?php _e( 'Removes invalid rows stored in option and hide admin notice.', 'sitepress' ) ?></small>
[653] Fix | Delete
</p>
[654] Fix | Delete
<?php } ?>
[655] Fix | Delete
[656] Fix | Delete
<p>
[657] Fix | Delete
<br/>
[658] Fix | Delete
<?php _e( 'Translatable custom posts linking', 'sitepress' ); ?><br/>
[659] Fix | Delete
<small style="margin-left:10px;"><?php _e( 'Allows linking existing translations after changing custom posts definition (name) ', 'sitepress' ) ?></small>
[660] Fix | Delete
[661] Fix | Delete
<?php
[662] Fix | Delete
$translatable_posts = $sitepress->get_translatable_documents();
[663] Fix | Delete
$res = $wpdb->get_col(
[664] Fix | Delete
$wpdb->prepare("SELECT DISTINCT element_type FROM {$wpdb->prefix}icl_translations WHERE element_type LIKE %s",
[665] Fix | Delete
array( wpml_like_escape('post_') . '%' ) ) );
[666] Fix | Delete
echo '<table class="widefat" style="width:300px;">';
[667] Fix | Delete
[668] Fix | Delete
foreach ( $res as $row ) {
[669] Fix | Delete
[670] Fix | Delete
$post_type = preg_replace( '#^post_#', '', $row );
[671] Fix | Delete
if ( $post_type == 'nav_menu_item' )
[672] Fix | Delete
continue;
[673] Fix | Delete
[674] Fix | Delete
echo '<tr>';
[675] Fix | Delete
echo '<td>' . $post_type . '</td>';
[676] Fix | Delete
[677] Fix | Delete
if ( isset( $translatable_posts[ $post_type ] ) ) {
[678] Fix | Delete
[679] Fix | Delete
echo '<td>' . __( 'linked to: ', 'sitepress' ) . $translatable_posts[ $post_type ]->labels->name . '</td>';
[680] Fix | Delete
[681] Fix | Delete
} else {
[682] Fix | Delete
echo '<td>';
[683] Fix | Delete
echo '<select onchange="wpml_ts_link_post_type(jQuery(this), \'' . $post_type . '\')">';
[684] Fix | Delete
echo '<option value="">' . __( '--select--', 'sitepress' ) . '</option>';
[685] Fix | Delete
foreach ( $translatable_posts as $name => $type ) {
[686] Fix | Delete
echo '<option value="' . $name . '">' . $type->labels->name . '(' . $name . ')' . '</option>';
[687] Fix | Delete
}
[688] Fix | Delete
echo '</select>';
[689] Fix | Delete
echo '</td>';
[690] Fix | Delete
}
[691] Fix | Delete
echo '</tr>';
[692] Fix | Delete
}
[693] Fix | Delete
[694] Fix | Delete
echo '</table>';
[695] Fix | Delete
echo '<br />';
[696] Fix | Delete
echo __( 'Note: if you edited the custom post declaration you may need to re-configure WPML to mark it as translatable.', 'sitepress' );
[697] Fix | Delete
[698] Fix | Delete
?>
[699] Fix | Delete
</p>
[700] Fix | Delete
[701] Fix | Delete
<p>
[702] Fix | Delete
<br/>
[703] Fix | Delete
<?php _e( 'Translatable taxonomies linking', 'sitepress' ) ?><br/>
[704] Fix | Delete
<small style="margin-left:10px;"><?php _e( 'Allows linking existing translations after changing custom taxonomies definition (name) ', 'sitepress' ) ?></small>
[705] Fix | Delete
[706] Fix | Delete
<?php
[707] Fix | Delete
global $wp_post_types, $wp_taxonomies;
[708] Fix | Delete
$translatable_taxs = array();
[709] Fix | Delete
foreach ( $wp_post_types as $name => $post_type ) {
[710] Fix | Delete
$translatable_taxs = array_merge( $translatable_taxs, $sitepress->get_translatable_taxonomies( true, $name ) );
[711] Fix | Delete
}
[712] Fix | Delete
$translatable_taxs = array_unique( $translatable_taxs );
[713] Fix | Delete
[714] Fix | Delete
$res = $wpdb->get_col(
[715] Fix | Delete
$wpdb->prepare("SELECT DISTINCT element_type FROM {$wpdb->prefix}icl_translations WHERE element_type LIKE %s",
[716] Fix | Delete
array( wpml_like_escape('tax_') . '%' ) ) );
[717] Fix | Delete
echo '<table class="widefat" style="width:300px;">';
[718] Fix | Delete
[719] Fix | Delete
foreach ( $res as $row ) {
[720] Fix | Delete
[721] Fix | Delete
$tax = preg_replace( '#^tax_#', '', $row );
[722] Fix | Delete
if ( $tax == 'link_category' || $tax == 'nav_menu' )
[723] Fix | Delete
continue;
[724] Fix | Delete
[725] Fix | Delete
echo '<tr>';
[726] Fix | Delete
[727] Fix | Delete
echo '<td>' . $tax . '</td>';
[728] Fix | Delete
[729] Fix | Delete
if ( in_array( $tax, $translatable_taxs ) ) {
[730] Fix | Delete
[731] Fix | Delete
echo '<td>' . __( 'linked to: ', 'sitepress' ) . $wp_taxonomies[ $tax ]->labels->name . '</td>';
[732] Fix | Delete
[733] Fix | Delete
} else {
[734] Fix | Delete
echo '<td>';
[735] Fix | Delete
echo '<select onchange="wpml_ts_link_taxonomy(jQuery(this), \'' . $tax . '\')">';
[736] Fix | Delete
echo '<option value="">' . __( '--select--', 'sitepress' ) . '</option>';
[737] Fix | Delete
foreach ( $translatable_taxs as $name ) {
[738] Fix | Delete
[739] Fix | Delete
echo '<option value="' . $name . '">' . $wp_taxonomies[ $name ]->labels->name . '(' . $name . ')' . '</option>';
[740] Fix | Delete
}
[741] Fix | Delete
echo '</select>';
[742] Fix | Delete
echo '</td>';
[743] Fix | Delete
}
[744] Fix | Delete
echo '</tr>';
[745] Fix | Delete
}
[746] Fix | Delete
[747] Fix | Delete
echo '</table>';
[748] Fix | Delete
echo '<br />';
[749] Fix | Delete
echo __( 'Note: if you edited the custom taxonomy declaration you may need to re-configure WPML to mark it as translatable.', 'sitepress' );
[750] Fix | Delete
[751] Fix | Delete
?>
[752] Fix | Delete
</p>
[753] Fix | Delete
[754] Fix | Delete
<?php do_action('wpml_troubleshooting_after_setup_complete_cleanup_end'); ?>
[755] Fix | Delete
<?php do_action('after_setup_complete_troubleshooting_functions'); ?>
[756] Fix | Delete
[757] Fix | Delete
<?php } ?>
[758] Fix | Delete
[759] Fix | Delete
</div>
[760] Fix | Delete
[761] Fix | Delete
<br clear="all"/>
[762] Fix | Delete
<?php
[763] Fix | Delete
//TODO: [WPML 3.3] we should use the new hooks to add elements to the troubleshooting page
[764] Fix | Delete
echo WPML_Troubleshooting_Terms_Menu::display_terms_with_suffix();
[765] Fix | Delete
?>
[766] Fix | Delete
[767] Fix | Delete
<br clear="all"/>
[768] Fix | Delete
[769] Fix | Delete
<div class="icl_cyan_box">
[770] Fix | Delete
[771] Fix | Delete
<?php
[772] Fix | Delete
echo '<h3 id="wpml-settings"> ' . __( 'Reset', 'sitepress' ) . '</h3>';
[773] Fix | Delete
?>
[774] Fix | Delete
[775] Fix | Delete
<?php if ( function_exists( 'is_multisite' ) && is_multisite() ) { ?>
[776] Fix | Delete
[777] Fix | Delete
<p><?php _e( 'This function is available through the Network Admin section.', 'sitepress' ); ?></p>
[778] Fix | Delete
<?php if ( current_user_can( 'manage_sites' ) ) { ?>
[779] Fix | Delete
<a href="<?php echo esc_url(
[780] Fix | Delete
network_admin_url( 'admin.php?page=' . WPML_PLUGIN_FOLDER . '/menu/network.php' )
[781] Fix | Delete
) ?>"><?php _e( 'Go to WPML Network settings.', 'sitepress' ) ?></a>
[782] Fix | Delete
<p><small><?php _e( 'Note: WPML must be activated on the primary site or must be network activated.', 'sitepress' ); ?></small></p>
[783] Fix | Delete
<?php } else { ?>
[784] Fix | Delete
<i><?php _e( 'You are not allowed to manage the WPML Network settings.', 'sitepress' ) ?></i>
[785] Fix | Delete
<?php } ?>
[786] Fix | Delete
[787] Fix | Delete
<?php } else { ?>
[788] Fix | Delete
[789] Fix | Delete
[790] Fix | Delete
<?php
[791] Fix | Delete
echo '<form method="post" onsubmit="return confirm(\'' . __(
[792] Fix | Delete
'Are you sure you want to reset all translation and language data? This operation cannot be reversed!',
[793] Fix | Delete
'sitepress'
[794] Fix | Delete
) . '\')">';
[795] Fix | Delete
wp_nonce_field( 'icl_reset_all', 'icl_reset_allnonce' );
[796] Fix | Delete
echo '<p class="error" style="padding:6px;">';
[797] Fix | Delete
_e( "The 'Reset' action will deactivate the WPML plugin after it deletes the WPML tables (tables with the 'icl_' prefix) from the database.
[798] Fix | Delete
The action will NOT delete any content (posts, taxonomy terms etc.).
[799] Fix | Delete
It only affects translation and language information that WPML associates with each content type.", 'sitepress' );
[800] Fix | Delete
echo '</p>';
[801] Fix | Delete
echo '<p class="error" style="padding:6px;">';
[802] Fix | Delete
_e( "Please note that all translations you have sent to remote translation services will be lost if you reset WPML's data. They cannot be recovered later.", 'sitepress' );
[803] Fix | Delete
echo '</p>';
[804] Fix | Delete
echo '<p class="error" style="padding:6px;">';
[805] Fix | Delete
_e( "If you are using the Advanced Translation Editor, you will lose the translations that are in progress, as well as the existing translation memory and glossary. You will also lose access to purchases, invoices, and history related to your work with the Advanced Translation Editor.", 'sitepress' );
[806] Fix | Delete
echo '</p>';
[807] Fix | Delete
echo '<label><input type="checkbox" name="icl-reset-all" ';
[808] Fix | Delete
if ( !function_exists( 'is_super_admin' ) || is_super_admin() ) {
[809] Fix | Delete
echo 'onchange="if(this.checked) jQuery(\'#reset-all-but\').removeAttr(\'disabled\'); else jQuery(\'#reset-all-but\').attr(\'disabled\',\'disabled\');"';
[810] Fix | Delete
}
[811] Fix | Delete
echo ' /> ' . __( 'I am about to reset all translation and language data.', 'sitepress' ) . '</label><br /><br />';
[812] Fix | Delete
[813] Fix | Delete
echo '<input id="reset-all-but" type="submit" disabled="disabled" class="button-primary" value="' . __(
[814] Fix | Delete
'Reset and deactivate WPML',
[815] Fix | Delete
'sitepress'
[816] Fix | Delete
) . '" />';
[817] Fix | Delete
echo '</form>';
[818] Fix | Delete
?>
[819] Fix | Delete
[820] Fix | Delete
<?php } ?>
[821] Fix | Delete
[822] Fix | Delete
</div>
[823] Fix | Delete
[824] Fix | Delete
<?php do_action( 'icl_menu_footer' ); ?>
[825] Fix | Delete
</div>
[826] Fix | Delete
[827] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function