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.../public_h.../clone/wp-conte.../plugins/themify-.../includes/plugin-c...
File: wpml.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Builder Plugin Compatibility Code
[2] Fix | Delete
*
[3] Fix | Delete
* @package Themify_Builder
[4] Fix | Delete
* @subpackage Themify_Builder/classes
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
class Themify_Builder_Plugin_Compat_WPML {
[8] Fix | Delete
[9] Fix | Delete
static function init() {
[10] Fix | Delete
add_action( 'wp_ajax_themify_builder_icl_copy_from_original', array( __CLASS__, 'icl_copy_from_original' ) );
[11] Fix | Delete
add_filter( 'get_translatable_documents', array( __CLASS__, 'get_translatable_documents' ) );
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
/**
[15] Fix | Delete
* Load Builder content from original page when "Copy content" feature in WPML is used
[16] Fix | Delete
*
[17] Fix | Delete
* @access public
[18] Fix | Delete
* @since 1.4.3
[19] Fix | Delete
*/
[20] Fix | Delete
public static function icl_copy_from_original() {
[21] Fix | Delete
[22] Fix | Delete
if ( isset( $_POST['source_page_id'],$_POST['source_page_lang'] ) && current_user_can( 'edit_post', $_POST['source_page_id'] ) ) {
[23] Fix | Delete
global $wpdb;
[24] Fix | Delete
$post_id = $wpdb->get_var(
[25] Fix | Delete
$wpdb->prepare(
[26] Fix | Delete
"SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='%d' AND language_code='%s' LIMIT 1",
[27] Fix | Delete
$_POST[ 'source_page_id' ],
[28] Fix | Delete
$_POST[ 'source_page_lang' ]
[29] Fix | Delete
)
[30] Fix | Delete
);
[31] Fix | Delete
$post = ! empty( $post_id ) ? get_post( $post_id ) : null;
[32] Fix | Delete
if ( ! empty( $post ) ) {
[33] Fix | Delete
$builder_data = ThemifyBuilder_Data_Manager::get_data( $post->ID );
[34] Fix | Delete
wp_send_json_success($builder_data);
[35] Fix | Delete
}
[36] Fix | Delete
wp_send_json_error('');
[37] Fix | Delete
}
[38] Fix | Delete
die;
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
/**
[42] Fix | Delete
* Disable translation on some post types
[43] Fix | Delete
*
[44] Fix | Delete
* @return array
[45] Fix | Delete
*/
[46] Fix | Delete
public static function get_translatable_documents(array $translatable_post_types=array() ):array {
[47] Fix | Delete
unset( $translatable_post_types[Themify_Global_Styles::SLUG],$translatable_post_types['tb_cf'], $translatable_post_types['tbp_theme'] );
[48] Fix | Delete
[49] Fix | Delete
return $translatable_post_types;
[50] Fix | Delete
}
[51] Fix | Delete
}
[52] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function