query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1; if ($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if (!$pages) { $pages = 1; } } $pagination = [ 'base' => add_query_arg('paged', '%#%'), 'format' => '', 'total' => $pages, 'current' => $current, 'prev_text' => $prev, 'next_text' => $next, 'type' => 'array', ]; //rewrite permalinks if ($wp_rewrite->using_permalinks()) { $pagination['base'] = user_trailingslashit(trailingslashit(remove_query_arg('s', get_pagenum_link(1))) . 'page/%#%/', 'paged'); } if (!empty($wp_query->query_vars['s'])) { $pagination['add_args'] = ['s' => get_query_var('s')]; } $pagi = ''; if (paginate_links($pagination) != '') { $paginations = paginate_links($pagination); $pagi .= ''; } print _being_pagi_callback($pagi); } } function being_body_classes($classes) { if (empty(get_theme_mod('side_bar_option', ''))) { $classes[] = 'no-side-bar-line'; } // Adds a class of hfeed to non-singular pages. if (!is_singular()) { $classes[] = 'hfeed'; } return $classes; } add_filter('body_class', 'being_body_classes'); if (!function_exists('being_post_thumbnail')) : /** * Displays an optional post thumbnail. * * Wraps the post thumbnail in an anchor element on index views, or a div * element when on single views. */ function being_post_thumbnail() { if (post_password_required() || is_attachment() || !has_post_thumbnail()) { return; } if (is_singular()) : ?>
' . esc_html__('Posted in %1$s', 'being') . '', $categories_list); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html_x(', ', 'list item separator', 'being')); if ($tags_list) { /* translators: 1: list of tags. */ printf('' . esc_html__('Tagged %1$s', 'being') . '', $tags_list); // WPCS: XSS OK. } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo ''; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __('Leave a Comment on %s', 'being'), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } } endif; /** * Get tags. */ function being_get_tag() { $html = ''; if (has_tag()) { $html .= '
' . esc_html__('Post Tags : ', 'being') . ''; $html .= get_the_tag_list('', ' ', ''); $html .= '
'; } return $html; } function being_blog_single_social() { $post_url = get_the_permalink(); ?>