From 1774a31c4f3735bb26b50d03a7eb103dda467325 Mon Sep 17 00:00:00 2001 From: Fabiano Alencar Date: Thu, 22 Feb 2018 15:04:01 -0300 Subject: [PATCH] Best functions.php organization (functionalities division) --- src/functions.php | 57 ++---------------------------------- src/functions/enqueues.php | 55 ++++++++++++++++++++++++++++++++++ src/functions/pagination.php | 32 ++++++++++++++++++++ src/functions/setup.php | 26 ++++++++++++++++ 4 files changed, 116 insertions(+), 54 deletions(-) create mode 100644 src/functions/enqueues.php create mode 100644 src/functions/pagination.php create mode 100644 src/functions/setup.php diff --git a/src/functions.php b/src/functions.php index bbafc14..01219fd 100644 --- a/src/functions.php +++ b/src/functions.php @@ -1,56 +1,5 @@ str_replace( $big, '%#%', get_pagenum_link($big) ), + 'current' => max( 1, get_query_var('paged') ), + 'total' => $wp_query->max_num_pages, + 'mid_size' => 5, + 'prev_next' => True, + 'prev_text' => __('< Newer', 'tainacan'), + 'next_text' => __('Older >', 'tainacan'), + 'type' => 'list' + ) ); + $paginate_links = str_replace( "