| Server IP : 68.183.124.220 / Your IP : 216.73.217.137 Web Server : Apache/2.4.18 (Ubuntu) System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : gavin ( 1000) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/wp-content/plugins/astra/inc/compatibility/ |
Upload File : |
<?php
/**
* Jetpack Compatibility File.
*
* @link https://jetpack.me/
*
* @package Astra
*/
// If plugin - 'Jetpack' not exist then return.
if ( ! class_exists( 'Jetpack' ) ) {
return;
}
/**
* Astra Jetpack Compatibility
*/
if ( ! class_exists( 'Astra_Jetpack' ) ) :
/**
* Astra Jetpack Compatibility
*
* @since 1.0.0
*/
class Astra_Jetpack {
/**
* Member Variable
*
* @var object instance
*/
private static $instance;
/**
* Initiator
*/
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self;
}
return self::$instance;
}
/**
* Constructor
*/
public function __construct() {
add_action( 'after_setup_theme', array( $this, 'jetpack_setup' ) );
}
/**
* Add theme support for Infinite Scroll.
* See: https://jetpack.me/support/infinite-scroll/
*/
function jetpack_setup() {
add_theme_support(
'infinite-scroll',
array(
'container' => 'main',
'render' => array( $this, 'infinite_scroll_render' ),
'footer' => 'page',
)
);
} // end function jetpack_setup
/**
* Custom render function for Infinite Scroll.
*/
function infinite_scroll_render() {
while ( have_posts() ) {
the_post();
get_template_part( 'template-parts/content', astra_get_post_format() );
}
} // end function infinite_scroll_render
}
endif;
/**
* Kicking this off by calling 'get_instance()' method
*/
Astra_Jetpack::get_instance();