Server IP : 172.67.157.199 / Your IP : 3.17.186.162 [ Web Server : Apache System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64 User : root ( 0) PHP Version : 8.0.30.2 Disable Function : NONE Domains : 0 Domains MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/wp-content/themes/CubicWP/inc/functions/ |
Upload File : |
<?php /** * Posts navigation functions * * @package ListMode WordPress Theme * @copyright Copyright (C) 2024 ThemesDNA * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later * @author ThemesDNA <[email protected]> */ class ListMode_Navigation { private static $instance; public static function get_instance() { if (null === self::$instance) { self::$instance = new self(); } return self::$instance; } public function wp_pagenavi() { ?> <nav class="navigation posts-navigation listmode-clearfix" role="navigation"> <?php wp_pagenavi(); ?> </nav><!-- .navigation --> <?php } public function posts_navigation() { if ( !(listmode_get_option('hide_posts_navigation')) ) { if ( function_exists( 'wp_pagenavi' ) ) { $this->wp_pagenavi(); } else { if ( listmode_get_option('posts_navigation_type') === 'normalnavi' ) { the_posts_navigation(array('prev_text' => esc_html__( 'Older posts', 'listmode' ), 'next_text' => esc_html__( 'Newer posts', 'listmode' ))); } else { the_posts_pagination(array('mid_size' => 2, 'prev_text' => esc_html__( '← Newer posts', 'listmode' ), 'next_text' => esc_html__( 'Older posts →', 'listmode' ))); } } } } public function post_navigation() { global $post; if ( !(listmode_get_option('hide_post_navigation')) ) { the_post_navigation(array('prev_text' => esc_html__( '%title →', 'listmode' ), 'next_text' => esc_html__( '← %title', 'listmode' ))); } } } // Initialize the instance ListMode_Navigation::get_instance();