add eng version
This commit is contained in:
@@ -484,6 +484,28 @@ function citata_title($percon){
|
||||
|
||||
}
|
||||
|
||||
# helper find perevod author
|
||||
function find_perevod($post_id){
|
||||
|
||||
$author = '';
|
||||
|
||||
$perevod_name = get_post_meta( $post_id, 'perevod_name', true );
|
||||
if ( ! empty ( $perevod_name )){
|
||||
$user_info = get_userdata($perevod_name);
|
||||
if (isset($user_info->display_name)){
|
||||
$author = $user_info->display_name;
|
||||
}
|
||||
}
|
||||
|
||||
if ($author !== ''){
|
||||
return " / Translated by $author";
|
||||
}
|
||||
else {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
add_action( 'pre_get_posts', function ($query) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user