Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Events+ Increase the limit of max result
<?php
/**
* Plugin Name: Events + max result limit increase
* Plugin URI: https://premium.wpmudev.org/
* Description: Increase the limit of max result
* Author: Ariful Islam @ WPMUDEV
* Author URI: https://premium.wpmudev.org/profile/itsarifulislam
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'EAB_MaxResultLimitIncrease' ) ) {
class EAB_MaxResultLimitIncrease {
private static $_instance = null;
private $limit = 3000; // Update the limit as appropriate
public static function get_instance() {
if ( is_null( self::$_instance ) ) {
self::$_instance = new EAB_MaxResultLimitIncrease();
}
return self::$_instance;
}
private function __construct() {
if ( !class_exists('Eab_EventsHub') ) return;
add_action('eab-collection-upcoming-max_results', array($this, 'eab_collection_upcoming_max_results'), 10, 1);
}
public function eab_collection_upcoming_max_results() {
return $this->limit;
}
}
function Render_eab_max_result_limit_increase(){
$GLOBALS['EAB_MaxResultLimitIncrease'] = EAB_MaxResultLimitIncrease::get_instance();
}
}
add_action( 'init', 'Render_eab_max_result_limit_increase' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.