דלג על ניווט

תגיות: 

נושא זה מכיל 0 תגובות, יש ל 1קוֹל.

עודכן לאחרונה על ידי janaR-9 לפני 2 חודשים, 4 שבועות.

בסיוע: Lauren.

מחבר פוסטים
אוקטובר 7, 2024בְּ- 4:55 pm #16263026

janaR-9

Background of the issue:
I need help translating custom code on my site קישור נסתר. I am trying to find strings and admin text for translation but can't locate them.

Symptoms:
I can't find the strings and admin text for translation.

Questions:
How can I find and translate custom code strings using WPML? I used this code.
// Add required fields for terms and newsletters
add_filter('tutor_student_registration_required_fields', 'required_terms_newsletters_callback');
if ( ! function_exists('required_terms_newsletters_callback')){
function required_terms_newsletters_callback($atts){
$atts['agree_terms'] = 'You must agree to the Privacy Policy and Terms of Use.';
$atts['newsletter_consent'] = 'You must consent to receive newsletters.';
return $atts;
}
}

// Save checkbox values after registration
add_action('user_register', 'save_checkbox_after_registration');
add_action('profile_update', 'save_checkbox_after_registration');
if ( ! function_exists('save_checkbox_after_registration')) {
function save_checkbox_after_registration($user_id){
if (isset($_POST['agree_terms'])) {
update_user_meta($user_id, '_agree_terms', 'yes');
}

if (isset($_POST['newsletter_consent'])) {
update_user_meta($user_id, '_newsletter_consent', 'yes');
}
}
}

Css