Skip to Content

infinite_load()

Actually loads the infinite query.

PHP April 26, 2017

Usage

This function runs automatically, so it is not called manually. Is this incorrect?

Source File

Located in /libs/Functions.php on line 2577.

No Hooks

This function does not have any filters or actions available. Request one?
PHP
    public function infinite_load(){
        if ( !wp_verify_nonce($_POST['nonce'], 'nebula_ajax_nonce') ){ die('Permission Denied.'); }

        $page_number = sanitize_text_field($_POST['page']);
        $args = $_POST['args'];
        $args['paged'] = $page_number;
        $loop = sanitize_text_field($_POST['loop']);

        $args = array_map('esc_attr', $args); //Sanitize the args array
        query_posts($args);

        if ( $loop == 'false' ){
            get_template_part('loop');
        } else {
            call_user_func($loop); //Custom loop callback function must be defined in a functions file (not a template file) for this to work.
        }

        wp_die();
    }

Override

This function can not be short-circuited with an override filter. Request one?