' . __('This author has no articles yet.', 'ltk-foundation') . ''; } $text = sprintf(_n( '%s article from this author', '%s articles from this author', $count, 'ltk-foundation' ), $count); $url = get_author_posts_url(get_the_author_meta('ID')); return "$text"; } /** * Get a link to current author's website * * @return string|null Author link if any, null otherwise * @since 1.2.0 */ static public function getAuthorWebsiteLink() { $url = esc_attr(get_the_author_meta('user_url')); if (! empty($url)) { $text = parse_url($url, PHP_URL_HOST); return "$text"; } else { return ''; } } /** * Adds a Font-Awesome lock icon to password protected and private posts * * @param string $title * @return string */ static public function passwordProtectedPostIcon($title) { return ' %s'; } /** * Set up new defaults for the post pagination * * @param array $args Arguments passed to the post pagination function * * @return array New arguments for the pagination function */ static public function paginationArguments($args) { return [ 'before' => '', 'link_before' => '', 'link_after' => '', 'next_or_number' => 'number', 'separator' => '', 'nextpagelink' => __('Next page', 'ltk-foundation') . ' →', 'previouspagelink' => '← ' . __('Previous page', 'ltk-foundation'), 'pagelink' => '%', 'echo' => 1 ]; } /** * Wrap post pagination into a div * * @param string $html Pagination generated html * * @return string Pagination HTML, wrapped */ static public function paginationFilterPages($html) { if (empty($html)) { return; } $output = '
'; $output .= '

' . __('Article pages:', 'ltk-foundation') . '

'; $output .= $html; $output .= '
'; return $output; } /** * Wrap pagination links into
  • * * @param string $item Pagination link * * @return string Pagination link, wrapped into
  • and if that's the * active page */ static public function paginationFilterPagesLink($item) { $isCurrentPage = false; if (is_numeric($item)) { $isCurrentPage = true; $item = "$item"; } if ($isCurrentPage) { return "
  • $item
  • "; } else { return "
  • $item
  • "; } } }