content())); $minutes = round($symb / $symb_per_minute); /* translators: %s: Time duration in minute or minutes. */ return sprintf(_n('%s ' . pll__('мин.'), '%s ' . pll__('мин.'), $minutes), (int) $minutes); } public function get_author_name() { if (get_field('post_author', $this->ID)){ return get_the_title(get_field('post_author', $this->ID)); } return false; } public function get_author_img() { $id = get_field('post_author', $this->ID); return get_the_post_thumbnail_url( $id, 'thumbnail' ); } } add_filter('timber/post/classmap', function ($classmap) { $custom_classmap = [ 'post' => BlogPost::class, ]; return array_merge($classmap, $custom_classmap); });