Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 107
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 234
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 235
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 236
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 237
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 239
* @link https://themeum.com
* @since 1.0.0
*/
use TUTOR\Input;
! isset( $course_filter ) ? $course_filter = false : 0;
! isset( $supported_filters ) ? $supported_filters = tutor_utils()->get_option( 'supported_course_filters', array() ) : 0;
! isset( $loop_content_only ) ? $loop_content_only = false : 0;
! isset( $column_per_row ) ? $column_per_row = tutor_utils()->get_option( 'courses_col_per_row', 3 ) : 0;
! isset( $course_per_page ) ? $course_per_page = tutor_utils()->get_option( 'courses_per_page', 12 ) : 0;
! isset( $show_pagination ) ? $show_pagination = true : 0;
! isset( $current_page ) ? $current_page = 1 : 0;
// Hide pagination is there is no page after first one.
$pages_count = 0;
if ( isset( $the_query ) ) {
$pages_count = $the_query->max_num_pages;
} else {
global $wp_query;
$pages_count = $wp_query->max_num_pages;
}
$pages_count < 2 ? $show_pagination = false : 0;
// Set in global variable to avoid too many stack to pass to other templates.
$GLOBALS['tutor_course_archive_arg'] = compact(
'course_filter',
'supported_filters',
'loop_content_only',
'column_per_row',
'course_per_page',
'show_pagination'
);
// Render the loop.
ob_start();
do_action( 'tutor_course/archive/before_loop' );
if ( ( isset( $the_query ) && $the_query->have_posts() ) || have_posts() ) {
/* Start the Loop */
tutor_course_loop_start();
while ( isset( $the_query ) ? $the_query->have_posts() : have_posts() ) {
isset( $the_query ) ? $the_query->the_post() : the_post();
/**
* Usage Idea, you may keep a loop within a wrap, such as bootstrap col
*
* @hook tutor_course/archive/before_loop_course
* @type action
*/
do_action( 'tutor_course/archive/before_loop_course' );
tutor_load_template( 'loop.course' );
/**
* Usage Idea, If you start any div before course loop, you can end it here, such as
*
* @hook tutor_course/archive/after_loop_course
* @type action
*/
do_action( 'tutor_course/archive/after_loop_course' );
}
tutor_course_loop_end();
} else {
/**
* No course found
*/
tutor_utils()->tutor_empty_state( tutor_utils()->not_found_text() );
}
do_action( 'tutor_course/archive/after_loop' );
if ( $show_pagination ) {
global $wp_query;
$current_url = wp_doing_ajax() ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_REFERER'] ?? '' ) ) : tutor()->current_url;
//phpcs:disable WordPress.Security.NonceVerification.Missing
$push_link = add_query_arg( array_merge( $_POST, $GLOBALS['tutor_course_archive_arg'] ), $current_url );
$data = wp_doing_ajax() ? Input::sanitize_array( $_POST ) : Input::sanitize_array( $_GET );
$pagination_data = array(
'total_page' => isset( $the_query ) ? $the_query->max_num_pages : $wp_query->max_num_pages,
'per_page' => $course_per_page,
'paged' => $current_page,
'data_set' => array( 'push_state_link' => $push_link ),
'ajax' => array_merge(
$data,
array(
'loading_container' => '.tutor-course-filter-loop-container',
'action' => 'tutor_course_filter_ajax',
'course_per_page' => $course_per_page,
'column_per_row' => $column_per_row,
)
),
);
tutor_load_template_from_custom_path(
tutor()->path . 'templates/dashboard/elements/pagination.php',
$pagination_data
);
}
$course_loop = ob_get_clean();
if ( isset( $loop_content_only ) && true == $loop_content_only ) {
echo $course_loop; //phpcs:ignore --$course_loop contain sanitized data
return;
}
$course_archive_arg = isset( $GLOBALS['tutor_course_archive_arg'] ) ? $GLOBALS['tutor_course_archive_arg']['column_per_row'] : null;
$columns = null === $course_archive_arg ? tutor_utils()->get_option( 'courses_col_per_row', 3 ) : $course_archive_arg;
$has_course_filters = $course_filter && count( $supported_filters );
$supported_filters_keys = array_keys( $supported_filters );
?>