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.../inc/post-tra...
File: wpml-post-duplication.class.php
<?php
[0] Fix | Delete
[1] Fix | Delete
require_once dirname( __FILE__ ) . '/wpml-wordpress-actions.class.php';
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* Class WPML_Post_Duplication
[5] Fix | Delete
*
[6] Fix | Delete
* @package wpml-core
[7] Fix | Delete
* @subpackage post-translation
[8] Fix | Delete
*/
[9] Fix | Delete
class WPML_Post_Duplication extends WPML_WPDB_And_SP_User {
[10] Fix | Delete
[11] Fix | Delete
function get_duplicates( $master_post_id ) {
[12] Fix | Delete
global $wpml_post_translations;
[13] Fix | Delete
$duplicates = array();
[14] Fix | Delete
[15] Fix | Delete
$post_ids_query = " SELECT post_id
[16] Fix | Delete
FROM {$this->wpdb->postmeta}
[17] Fix | Delete
WHERE meta_key='_icl_lang_duplicate_of'
[18] Fix | Delete
AND meta_value = %d
[19] Fix | Delete
AND post_id <> %d";
[20] Fix | Delete
$post_ids_prepare = $this->wpdb->prepare( $post_ids_query, array( $master_post_id, $master_post_id ) );
[21] Fix | Delete
$post_ids = $this->wpdb->get_col( $post_ids_prepare );
[22] Fix | Delete
foreach ( $post_ids as $post_id ) {
[23] Fix | Delete
$language_code = $wpml_post_translations->get_element_lang_code( $post_id );
[24] Fix | Delete
[25] Fix | Delete
if ( ! $language_code ) {
[26] Fix | Delete
continue;
[27] Fix | Delete
}
[28] Fix | Delete
[29] Fix | Delete
$duplicates[ $language_code ] = $post_id;
[30] Fix | Delete
}
[31] Fix | Delete
[32] Fix | Delete
return $duplicates;
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
function make_duplicate( $master_post_id, $lang ) {
[36] Fix | Delete
global $wpml_post_translations;
[37] Fix | Delete
[38] Fix | Delete
/**
[39] Fix | Delete
* @deprecated Use 'wpml_before_make_duplicate' instead
[40] Fix | Delete
* @since 3.4
[41] Fix | Delete
*/
[42] Fix | Delete
do_action( 'icl_before_make_duplicate', $master_post_id, $lang );
[43] Fix | Delete
do_action( 'wpml_before_make_duplicate', $master_post_id, $lang );
[44] Fix | Delete
$master_post = get_post( $master_post_id );
[45] Fix | Delete
[46] Fix | Delete
if ( ! $master_post || $this->is_external( $master_post_id ) ) {
[47] Fix | Delete
return true;
[48] Fix | Delete
}
[49] Fix | Delete
[50] Fix | Delete
$is_duplicated = false;
[51] Fix | Delete
$translations = $wpml_post_translations->get_element_translations( $master_post_id, false, false );
[52] Fix | Delete
if ( isset( $translations[ $lang ] ) ) {
[53] Fix | Delete
$post_array[ 'ID' ] = $translations[ $lang ];
[54] Fix | Delete
if ( WPML_WordPress_Actions::is_bulk_trash( $post_array[ 'ID' ] ) || WPML_WordPress_Actions::is_bulk_untrash( $post_array[ 'ID' ] ) ) {
[55] Fix | Delete
return true;
[56] Fix | Delete
}
[57] Fix | Delete
$is_duplicated = get_post_meta( $translations[ $lang ], '_icl_lang_duplicate_of', true );
[58] Fix | Delete
}
[59] Fix | Delete
$post_array['post_author'] = $master_post->post_author;
[60] Fix | Delete
$post_array['post_date'] = $master_post->post_date;
[61] Fix | Delete
$post_array['post_date_gmt'] = $master_post->post_date_gmt;
[62] Fix | Delete
$duplicated_post_content = $this->duplicate_post_content( $lang, $master_post );
[63] Fix | Delete
$post_array['post_content'] = $duplicated_post_content;
[64] Fix | Delete
$duplicated_post_title = $this->duplicate_post_title( $lang, $master_post );
[65] Fix | Delete
$post_array['post_title'] = $duplicated_post_title;
[66] Fix | Delete
$duplicated_post_excerpt = $this->duplicate_post_excerpt( $lang, $master_post );
[67] Fix | Delete
$post_array['post_excerpt'] = $duplicated_post_excerpt;
[68] Fix | Delete
if ( $this->sitepress->get_setting('sync_post_status' ) ) {
[69] Fix | Delete
$sync_post_status = true;
[70] Fix | Delete
} else {
[71] Fix | Delete
$sync_post_status = ( ! isset( $post_array[ 'ID' ] )
[72] Fix | Delete
|| ( $this->sitepress->get_setting( 'sync_delete' ) && $master_post->post_status === 'trash' ) || $is_duplicated );
[73] Fix | Delete
}
[74] Fix | Delete
if ( $sync_post_status || ( isset( $post_array[ 'ID' ] ) && get_post_status( $post_array[ 'ID' ] ) === 'auto-draft' ) ) {
[75] Fix | Delete
$post_array[ 'post_status' ] = $master_post->post_status;
[76] Fix | Delete
}
[77] Fix | Delete
$post_array[ 'comment_status' ] = $master_post->comment_status;
[78] Fix | Delete
$post_array[ 'ping_status' ] = $master_post->ping_status;
[79] Fix | Delete
$post_array[ 'post_name' ] = $master_post->post_name;
[80] Fix | Delete
if ( $master_post->post_parent ) {
[81] Fix | Delete
$parent = $this->sitepress->get_object_id( $master_post->post_parent, $master_post->post_type, false, $lang );
[82] Fix | Delete
$post_array[ 'post_parent' ] = $parent;
[83] Fix | Delete
}
[84] Fix | Delete
$post_array['menu_order'] = $master_post->menu_order;
[85] Fix | Delete
$post_array['post_type'] = $master_post->post_type;
[86] Fix | Delete
$post_array['post_mime_type'] = $master_post->post_mime_type;
[87] Fix | Delete
$trid = $this->sitepress->get_element_trid( $master_post->ID,
[88] Fix | Delete
'post_' . $master_post->post_type );
[89] Fix | Delete
$id = $this->save_duplicate( $post_array, $lang );
[90] Fix | Delete
[91] Fix | Delete
require_once WPML_PLUGIN_PATH . '/inc/cache.php';
[92] Fix | Delete
icl_cache_clear();
[93] Fix | Delete
[94] Fix | Delete
global $ICL_Pro_Translation;
[95] Fix | Delete
/** @var WPML_Pro_Translation $ICL_Pro_Translation */
[96] Fix | Delete
if ( $ICL_Pro_Translation ) {
[97] Fix | Delete
$ICL_Pro_Translation->fix_links_to_translated_content( $id, $lang );
[98] Fix | Delete
}
[99] Fix | Delete
if ( ! is_wp_error( $id ) ) {
[100] Fix | Delete
$ret = $this->run_wpml_actions( $master_post, $trid, $lang, $id, $post_array );
[101] Fix | Delete
} else {
[102] Fix | Delete
throw new Exception( $id->get_error_message() );
[103] Fix | Delete
}
[104] Fix | Delete
[105] Fix | Delete
return $ret;
[106] Fix | Delete
}
[107] Fix | Delete
[108] Fix | Delete
/**
[109] Fix | Delete
* @param int $element_id
[110] Fix | Delete
*
[111] Fix | Delete
* @return null|string
[112] Fix | Delete
*/
[113] Fix | Delete
private function is_external( $element_id ) {
[114] Fix | Delete
$query = "SELECT element_type FROM {$this->wpdb->prefix}icl_translations WHERE element_id=%d AND element_type LIKE %s LIMIT 1";
[115] Fix | Delete
[116] Fix | Delete
return ! $this->wpdb->get_var( $this->wpdb->prepare( $query, $element_id, 'post_%' ) );
[117] Fix | Delete
}
[118] Fix | Delete
[119] Fix | Delete
private function run_wpml_actions( $master_post, $trid, $lang, $id, $post_array ) {
[120] Fix | Delete
$master_post_id = $master_post->ID;
[121] Fix | Delete
$this->sitepress->set_element_language_details( $id, 'post_' . $master_post->post_type, $trid, $lang );
[122] Fix | Delete
$this->sync_duplicate_password( $master_post_id, $id );
[123] Fix | Delete
$this->sync_page_template( $master_post_id, $id );
[124] Fix | Delete
$this->duplicate_fix_children( $master_post_id, $lang );
[125] Fix | Delete
[126] Fix | Delete
// make sure post name is copied
[127] Fix | Delete
$this->wpdb->update( $this->wpdb->posts, array( 'post_name' => $master_post->post_name ), array( 'ID' => $id ) );
[128] Fix | Delete
[129] Fix | Delete
if ( $this->sitepress->get_setting( 'sync_post_taxonomies', false ) ) {
[130] Fix | Delete
$this->duplicate_taxonomies( $master_post_id, $lang );
[131] Fix | Delete
}
[132] Fix | Delete
$this->duplicate_custom_fields( $master_post_id, $lang );
[133] Fix | Delete
update_post_meta( $id, '_icl_lang_duplicate_of', $master_post->ID );
[134] Fix | Delete
[135] Fix | Delete
// Duplicate post format after the taxonomies because post format is stored
[136] Fix | Delete
// as a taxonomy by WP.
[137] Fix | Delete
if ( $this->sitepress->get_setting( 'sync_post_format' ) ) {
[138] Fix | Delete
$_wp_post_format = get_post_format( $master_post_id );
[139] Fix | Delete
set_post_format( $id, $_wp_post_format );
[140] Fix | Delete
}
[141] Fix | Delete
if ( $this->sitepress->get_setting( 'sync_comments_on_duplicates' ) ) {
[142] Fix | Delete
$this->duplicate_comments( $master_post_id, $id );
[143] Fix | Delete
}
[144] Fix | Delete
$status_helper = wpml_get_post_status_helper();
[145] Fix | Delete
$status_helper->set_status( $id, ICL_TM_DUPLICATE );
[146] Fix | Delete
$status_helper->set_update_status( $id, false );
[147] Fix | Delete
do_action( 'icl_make_duplicate', $master_post_id, $lang, $post_array, $id );
[148] Fix | Delete
clean_post_cache( $id );
[149] Fix | Delete
[150] Fix | Delete
return $id;
[151] Fix | Delete
}
[152] Fix | Delete
[153] Fix | Delete
private function sync_page_template( $master_post_id, $duplicate_post_id ) {
[154] Fix | Delete
$_wp_page_template = get_post_meta( $master_post_id, '_wp_page_template', true );
[155] Fix | Delete
if ( ! empty( $_wp_page_template ) ) {
[156] Fix | Delete
update_post_meta( $duplicate_post_id, '_wp_page_template', $_wp_page_template );
[157] Fix | Delete
}
[158] Fix | Delete
}
[159] Fix | Delete
[160] Fix | Delete
private function duplicate_comments( $master_post_id, $translated_id ) {
[161] Fix | Delete
global $sitepress;
[162] Fix | Delete
[163] Fix | Delete
remove_filter( 'comments_clauses', array( $sitepress, 'comments_clauses' ), 10 );
[164] Fix | Delete
$comments_on_master = get_comments( array( 'post_id' => $master_post_id ) );
[165] Fix | Delete
$comments_on_translation = get_comments( array( 'post_id' => $translated_id, 'status' => 'any' ) );
[166] Fix | Delete
add_filter( 'comments_clauses', array( $sitepress, 'comments_clauses' ), 10, 2 );
[167] Fix | Delete
foreach ( $comments_on_translation as $comment ) {
[168] Fix | Delete
wp_delete_comment( $comment->comment_ID, true );
[169] Fix | Delete
clean_comment_cache( $comment->comment_ID );
[170] Fix | Delete
}
[171] Fix | Delete
$iclTranslationManagement = wpml_load_core_tm();
[172] Fix | Delete
foreach ( $comments_on_master as $comment ) {
[173] Fix | Delete
$iclTranslationManagement->duplication_insert_comment( $comment->comment_ID );
[174] Fix | Delete
clean_comment_cache( $comment->comment_ID );
[175] Fix | Delete
}
[176] Fix | Delete
[177] Fix | Delete
wp_update_comment_count_now( $master_post_id );
[178] Fix | Delete
wp_update_comment_count_now( $translated_id );
[179] Fix | Delete
}
[180] Fix | Delete
[181] Fix | Delete
/**
[182] Fix | Delete
* @param array $post_array
[183] Fix | Delete
* @param string $lang
[184] Fix | Delete
*
[185] Fix | Delete
* @return int|WP_Error
[186] Fix | Delete
*/
[187] Fix | Delete
private function save_duplicate( array $post_array, $lang ) {
[188] Fix | Delete
return wpml_get_create_post_helper()->insert_post( $post_array, $lang, true );
[189] Fix | Delete
}
[190] Fix | Delete
[191] Fix | Delete
private function duplicate_fix_children( $master_post_id, $lang ) {
[192] Fix | Delete
$post_type = $this->wpdb->get_var(
[193] Fix | Delete
$this->wpdb->prepare( "SELECT post_type FROM {$this->wpdb->posts} WHERE ID=%d", $master_post_id )
[194] Fix | Delete
);
[195] Fix | Delete
$master_children = $this->wpdb->get_col(
[196] Fix | Delete
$this->wpdb->prepare(
[197] Fix | Delete
"SELECT ID FROM {$this->wpdb->posts} WHERE post_parent=%d AND post_type != 'revision'",
[198] Fix | Delete
$master_post_id
[199] Fix | Delete
)
[200] Fix | Delete
);
[201] Fix | Delete
$dup_parent = icl_object_id( $master_post_id, $post_type, false, $lang );
[202] Fix | Delete
if ( $master_children ) {
[203] Fix | Delete
foreach ( $master_children as $master_child ) {
[204] Fix | Delete
$dup_child = icl_object_id( $master_child, $post_type, false, $lang );
[205] Fix | Delete
if ( $dup_child ) {
[206] Fix | Delete
$this->wpdb->update( $this->wpdb->posts, array( 'post_parent' => $dup_parent ), array( 'ID' => $dup_child ) );
[207] Fix | Delete
}
[208] Fix | Delete
$this->duplicate_fix_children( $master_child, $lang );
[209] Fix | Delete
}
[210] Fix | Delete
}
[211] Fix | Delete
}
[212] Fix | Delete
[213] Fix | Delete
private function duplicate_taxonomies( $master_post_id, $lang ) {
[214] Fix | Delete
$post_type = get_post_field( 'post_type', $master_post_id );
[215] Fix | Delete
$taxonomies = get_object_taxonomies( $post_type );
[216] Fix | Delete
$trid = $this->sitepress->get_element_trid( $master_post_id, 'post_' . $post_type );
[217] Fix | Delete
if ( $trid ) {
[218] Fix | Delete
$translations = $this->sitepress->get_element_translations( $trid, 'post_' . $post_type, false, false, true );
[219] Fix | Delete
if ( isset( $translations[ $lang ] ) ) {
[220] Fix | Delete
$duplicate_post_id = $translations[ $lang ]->element_id;
[221] Fix | Delete
/* If we have an existing post, we first of all remove all terms currently attached to it.
[222] Fix | Delete
* The main reason behind is the removal of the potentially present default category on the post.
[223] Fix | Delete
*/
[224] Fix | Delete
wp_delete_object_term_relationships( $duplicate_post_id, $taxonomies );
[225] Fix | Delete
} else {
[226] Fix | Delete
return false; // translation not found!
[227] Fix | Delete
}
[228] Fix | Delete
}
[229] Fix | Delete
$term_helper = wpml_get_term_translation_util();
[230] Fix | Delete
$term_helper->duplicate_terms( $master_post_id, $lang );
[231] Fix | Delete
[232] Fix | Delete
return true;
[233] Fix | Delete
}
[234] Fix | Delete
[235] Fix | Delete
private function sync_duplicate_password( $master_post_id, $duplicate_post_id ) {
[236] Fix | Delete
if ( post_password_required( $master_post_id ) ) {
[237] Fix | Delete
$sql = $this->wpdb->prepare( "UPDATE {$this->wpdb->posts} AS dupl,
[238] Fix | Delete
(SELECT org.post_password FROM {$this->wpdb->posts} AS org WHERE ID = %d ) AS pwd
[239] Fix | Delete
SET dupl.post_password = pwd.post_password
[240] Fix | Delete
WHERE dupl.ID = %d",
[241] Fix | Delete
array( $master_post_id, $duplicate_post_id ) );
[242] Fix | Delete
$this->wpdb->query( $sql );
[243] Fix | Delete
}
[244] Fix | Delete
}
[245] Fix | Delete
[246] Fix | Delete
private function duplicate_custom_fields( $master_post_id, $lang ) {
[247] Fix | Delete
$duplicate_post_id = false;
[248] Fix | Delete
$post_type = get_post_field( 'post_type', $master_post_id );
[249] Fix | Delete
[250] Fix | Delete
$trid = $this->sitepress->get_element_trid( $master_post_id, 'post_' . $post_type );
[251] Fix | Delete
if ( $trid ) {
[252] Fix | Delete
$translations = $this->sitepress->get_element_translations( $trid, 'post_' . $post_type );
[253] Fix | Delete
if ( isset( $translations[ $lang ] ) ) {
[254] Fix | Delete
$duplicate_post_id = $translations[ $lang ]->element_id;
[255] Fix | Delete
} else {
[256] Fix | Delete
return false; // translation not found!
[257] Fix | Delete
}
[258] Fix | Delete
}
[259] Fix | Delete
$default_exceptions = WPML_Config::get_custom_fields_translation_settings();
[260] Fix | Delete
$exceptions = apply_filters( 'wpml_duplicate_custom_fields_exceptions', array() );
[261] Fix | Delete
$exceptions = array_merge( $exceptions, $default_exceptions );
[262] Fix | Delete
$exceptions = array_unique( $exceptions );
[263] Fix | Delete
[264] Fix | Delete
$exceptions_in = ! empty( $exceptions )
[265] Fix | Delete
? 'AND meta_key NOT IN ( ' . wpml_prepare_in( $exceptions ) . ') ' : '';
[266] Fix | Delete
$from_where_string = "FROM {$this->wpdb->postmeta} WHERE post_id = %d " . $exceptions_in;
[267] Fix | Delete
$post_meta_master = $this->wpdb->get_results( "SELECT meta_key, meta_value " . $this->wpdb->prepare( $from_where_string,
[268] Fix | Delete
$master_post_id ) );
[269] Fix | Delete
$this->wpdb->query( "DELETE " . $this->wpdb->prepare( $from_where_string, $duplicate_post_id ) );
[270] Fix | Delete
[271] Fix | Delete
$values = [];
[272] Fix | Delete
foreach ( $post_meta_master as $post_meta ) {
[273] Fix | Delete
$is_serialized = is_serialized( $post_meta->meta_value );
[274] Fix | Delete
$meta_data = array(
[275] Fix | Delete
'context' => 'custom_field',
[276] Fix | Delete
'attribute' => 'value',
[277] Fix | Delete
'key' => $post_meta->meta_key,
[278] Fix | Delete
'is_serialized' => $is_serialized,
[279] Fix | Delete
'post_id' => $duplicate_post_id,
[280] Fix | Delete
'master_post_id' => $master_post_id,
[281] Fix | Delete
);
[282] Fix | Delete
[283] Fix | Delete
/**
[284] Fix | Delete
* @deprecated use 'wpml_duplicate_generic_string' instead, with the same arguments
[285] Fix | Delete
*/
[286] Fix | Delete
$icl_duplicate_generic_string = apply_filters( 'icl_duplicate_generic_string',
[287] Fix | Delete
$post_meta->meta_value,
[288] Fix | Delete
$lang,
[289] Fix | Delete
$meta_data );
[290] Fix | Delete
$post_meta->meta_value = $icl_duplicate_generic_string;
[291] Fix | Delete
$wpml_duplicate_generic_string = apply_filters( 'wpml_duplicate_generic_string',
[292] Fix | Delete
$post_meta->meta_value,
[293] Fix | Delete
$lang,
[294] Fix | Delete
$meta_data );
[295] Fix | Delete
$post_meta->meta_value = $wpml_duplicate_generic_string;
[296] Fix | Delete
if ( ! is_serialized( $post_meta->meta_value ) ) {
[297] Fix | Delete
$post_meta->meta_value = maybe_serialize( $post_meta->meta_value );
[298] Fix | Delete
}
[299] Fix | Delete
[300] Fix | Delete
$values[] = $this->wpdb->prepare(
[301] Fix | Delete
'( %d, %s, %s )',
[302] Fix | Delete
$duplicate_post_id,
[303] Fix | Delete
$post_meta->meta_key,
[304] Fix | Delete
$post_meta->meta_value
[305] Fix | Delete
);
[306] Fix | Delete
}
[307] Fix | Delete
[308] Fix | Delete
if ( ! empty( $values ) ) {
[309] Fix | Delete
$values = implode( ', ', $values );
[310] Fix | Delete
$this->wpdb->query(
[311] Fix | Delete
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
[312] Fix | Delete
"INSERT INTO `{$this->wpdb->postmeta}` (`post_id`, `meta_key`, `meta_value`) VALUES {$values}"
[313] Fix | Delete
);
[314] Fix | Delete
}
[315] Fix | Delete
[316] Fix | Delete
return true;
[317] Fix | Delete
}
[318] Fix | Delete
[319] Fix | Delete
/**
[320] Fix | Delete
* @param $lang
[321] Fix | Delete
* @param $master_post
[322] Fix | Delete
*
[323] Fix | Delete
* @return mixed|void
[324] Fix | Delete
*/
[325] Fix | Delete
private function duplicate_post_content( $lang, $master_post ) {
[326] Fix | Delete
$duplicated_post_content_meta = array(
[327] Fix | Delete
'context' => 'post',
[328] Fix | Delete
'attribute' => 'content',
[329] Fix | Delete
'key' => $master_post->ID
[330] Fix | Delete
);
[331] Fix | Delete
$duplicated_post_content = $master_post->post_content;
[332] Fix | Delete
$duplicated_post_content = apply_filters( 'icl_duplicate_generic_string', $duplicated_post_content, $lang, $duplicated_post_content_meta );
[333] Fix | Delete
$duplicated_post_content = apply_filters( 'wpml_duplicate_generic_string', $duplicated_post_content, $lang, $duplicated_post_content_meta );
[334] Fix | Delete
[335] Fix | Delete
return $duplicated_post_content;
[336] Fix | Delete
}
[337] Fix | Delete
[338] Fix | Delete
/**
[339] Fix | Delete
* @param $lang
[340] Fix | Delete
* @param $master_post
[341] Fix | Delete
*
[342] Fix | Delete
* @return mixed|void
[343] Fix | Delete
*/
[344] Fix | Delete
private function duplicate_post_title( $lang, $master_post ) {
[345] Fix | Delete
$duplicated_post_title_meta = array(
[346] Fix | Delete
'context' => 'post',
[347] Fix | Delete
'attribute' => 'title',
[348] Fix | Delete
'key' => $master_post->ID
[349] Fix | Delete
);
[350] Fix | Delete
$duplicated_post_title = $master_post->post_title;
[351] Fix | Delete
$duplicated_post_title = apply_filters( 'icl_duplicate_generic_string', $duplicated_post_title, $lang, $duplicated_post_title_meta );
[352] Fix | Delete
$duplicated_post_title = apply_filters( 'wpml_duplicate_generic_string', $duplicated_post_title, $lang, $duplicated_post_title_meta );
[353] Fix | Delete
[354] Fix | Delete
return $duplicated_post_title;
[355] Fix | Delete
}
[356] Fix | Delete
[357] Fix | Delete
/**
[358] Fix | Delete
* @param string $lang
[359] Fix | Delete
* @param WP_Post $master_post
[360] Fix | Delete
*
[361] Fix | Delete
* @return mixed|void
[362] Fix | Delete
*/
[363] Fix | Delete
private function duplicate_post_excerpt( $lang, $master_post ) {
[364] Fix | Delete
$duplicated_post_excerpt_meta = array(
[365] Fix | Delete
'context' => 'post',
[366] Fix | Delete
'attribute' => 'excerpt',
[367] Fix | Delete
'key' => $master_post->ID
[368] Fix | Delete
);
[369] Fix | Delete
$duplicated_post_excerpt = $master_post->post_excerpt;
[370] Fix | Delete
$duplicated_post_excerpt = apply_filters( 'icl_duplicate_generic_string',
[371] Fix | Delete
$duplicated_post_excerpt,
[372] Fix | Delete
$lang,
[373] Fix | Delete
$duplicated_post_excerpt_meta );
[374] Fix | Delete
$duplicated_post_excerpt = apply_filters( 'wpml_duplicate_generic_string',
[375] Fix | Delete
$duplicated_post_excerpt,
[376] Fix | Delete
$lang,
[377] Fix | Delete
$duplicated_post_excerpt_meta );
[378] Fix | Delete
[379] Fix | Delete
return $duplicated_post_excerpt;
[380] Fix | Delete
}
[381] Fix | Delete
}
[382] Fix | Delete
[383] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function