Astra_Ext_Blog_Pro_Markup::astra_blog_pagination( html $output )

Astra Blog Pagination


Description


Parameters

$output

(html) (Required) Pagination markup.


Return

(html)


Source

File: addons/blog-pro/classes/class-astra-ext-blog-pro-markup.php

		public function astra_blog_pagination( $output ) {

			global $wp_query;

			$pagination     = astra_get_option( 'blog-pagination' );
			$infinite_event = astra_get_option( 'blog-infinite-scroll-event' );
			$load_more_text = astra_get_option( 'blog-load-more-text' );

			if ( '' === $load_more_text ) {
				$load_more_text = __( 'Load More', 'astra-addon' );
			}

			if ( 'infinite' == $pagination ) {
				if ( $wp_query->max_num_pages > 1 ) {
					ob_start();
					?>
					<nav class="ast-pagination-infinite">
						<div class="ast-loader">
								<div class="ast-loader-1"></div>
								<div class="ast-loader-2"></div>
								<div class="ast-loader-3"></div>
						</div>
						<?php if ( 'click' == $infinite_event ) { ?>
							<span class="ast-load-more active">
								<?php echo apply_filters( 'astra_load_more_text', esc_html( $load_more_text ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
							</span>
						<?php } ?>
					</nav>
					<?php
					$output .= ob_get_clean();
				}
			}

			return $output;
		}

Changelog

Changelog
Version Description
1.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.