protected function postsArgs() {
		global $wp_query, $wp_rewrite;

		// Setting up default values based on the current URL.
		$pagenum_link    = html_entity_decode( get_pagenum_link() );
		$this->url_parts = explode( '?', $pagenum_link );

		// Get total number of pages.
		$total = isset( $wp_query->max_num_pages ) ? $wp_query->max_num_pages : 1;

		// Get the current page.
		$current = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;

		// Append the format placeholder to the base URL.
		$base = trailingslashit( $this->url_parts[0] ) . '%_%';

		// URL base depends on permalink settings.
		$format  = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
		$format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';

		return [
			'base'    => $base,
			'format'  => $format,
			'total'   => $total,
			'current' => $current
		];
	}
protected function postsArgs() {
		global $wp_query, $wp_rewrite;

		// Setting up default values based on the current URL.
		$pagenum_link    = html_entity_decode( get_pagenum_link() );
		$this->url_parts = explode( '?', $pagenum_link );

		// Get total number of pages.
		$total = isset( $wp_query->max_num_pages ) ? $wp_query->max_num_pages : 1;

		// Get the current page.
		$current = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;

		// Append the format placeholder to the base URL.
		$base = trailingslashit( $this->url_parts[0] ) . '%_%';

		// URL base depends on permalink settings.
		$format  = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
		$format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';

		return [
			'base'    => $base,
			'format'  => $format,
			'total'   => $total,
			'current' => $current
		];
	}
protected function postsArgs ( ) { global $ wp_query , $ wp_rewrite ; // Setting up default values based on the current URL. $ pagenum_link = html_entity_decode ( get_pagenum_link ( ) ) ; $ this -> url_parts = explode ( '?' , $ pagenum_link ) ; // Get total number of pages. $ total = isset ( $ wp_query -> max_num_pages ) ? $ wp_query -> max_num_pages : 1 ; // Get the current page. $ current = get_query_var ( 'paged' ) ? intval ( get_query_var ( 'paged' ) ) : 1 ; // Append the format placeholder to the base URL. $ base = trailingslashit ( $ this -> url_parts [ 0 ] ) . '%_%' ; // URL base depends on permalink settings. $ format = $ wp_rewrite -> using_index_permalinks ( ) && ! strpos ( $ pagenum_link , 'index.php' ) ? 'index.php/' : '' ; $ format .= $ wp_rewrite -> using_permalinks ( ) ? user_trailingslashit ( $ wp_rewrite -> pagination_base . '/%#%' , 'paged' ) : '?paged=%#%' ; return [ 'base' => $ base , 'format' => $ format , 'total' => $ total , 'current' => $ current ] ; }
Returns custom arguments for normal, posts pagination.

@since  5.0.0
@access protected
@global object  $wp_query
@global object  $wp_rewrite
@return array
Returns custom arguments for normal posts pagination .