Skip to content

Commit 9055ea0

Browse files
authored
Merge pull request publishpress#676 from publishpress/feature/#642_Support_for_WPML_and_translations
feature/#642_Support_for_WPML_and_translations
2 parents fbd2a22 + 6ec6516 commit 9055ea0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/core/Classes/Author_Editor.php

+7
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,13 @@ public static function action_edited_author($term_id)
553553
}
554554
$sanitize = isset($args['sanitize']) ? $args['sanitize'] : 'sanitize_text_field';
555555
update_term_meta($term_id, $key, $sanitize($_POST['authors-' . $key])); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
556+
557+
if (in_array($args['type'], ['text', 'textarea'])) {
558+
/**
559+
* Register strings for wpml translation
560+
*/
561+
do_action('wpml_register_single_string', 'PublishPress Authors', '#'.$term_id.' '.$args['label'], $sanitize($_POST['authors-' . $key]));
562+
}
556563
}
557564

558565
// If there is a mapped user, make sure the author url (slug) is the same of the user.

0 commit comments

Comments
 (0)