此用户没有收藏的主题。
收藏的论坛主题
创建的论坛主题
| 状态 |
主题
|
支持人员 | 参与者 | 帖子 | 最新活动 |
|---|---|---|---|---|---|
|
Listings translations
1
2
发起人:amiro-4
在:English Support
Problem: Classified Listing Pro, Listing translation of the custom field not working when using the duplicate feature of WPML Solution: Please add the code below to the functions.php file of your theme:
/**
* Translate ID of in meta key for Classified Listing Pro custom field when duplicating.
*
* @link wpmlsupp-11480
*/
add_action('icl_make_duplicate', function ($master_post_id, $lang, $post_array, $id) {
global $wpdb;
$all_rtcl_cf = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->postmeta where post_id = $master_post_id AND meta_key LIKE '\_field\_%'");
if (!empty($all_rtcl_cf)) {
foreach ($all_rtcl_cf as $meta_obj) {
$meta_key_arr = explode('_', $meta_obj->meta_key);
$rtcl_cf_id = apply_filters('wpml_object_id', $meta_key_arr[2], 'rtcl_cf', true, $lang);
if (is_int($rtcl_cf_id) && $rtcl_cf_id !== $meta_key_arr[2]) {
delete_post_meta($id, $meta_obj->meta_key);
update_post_meta($id, '_field_' . $rtcl_cf_id, maybe_unserialize($meta_obj->meta_value));
}
}
}
}, 10, 4);
We also are going to communicate with the plugin developer to add the code above or an implementation of it to their multilingual plugin. |
|
3 | 24 | 1 years, 7 months前 | |
|
media translation
发起人:amiro-4 在:English Support |
2 | 2 | 1 years, 9 months前 | ||
|
404 issue in Arabic language
发起人:amiro-4 在:Chat Support |
|
1 | 2 |
1 years, 9 months前
|
所有由以下人员撰写的文章 amiro-4:
未找到项目