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
term_id;
wp_enqueue_script( 'edumall-term-view', EDUMALL_ADDONS_ASSETS_URI . '/js/terms-view.js', array( 'jquery' ), null, true );
wp_localize_script( 'edumall-term-view', 'edumallAddons', [
'ajax_url' => admin_url( 'admin-ajax.php' ),
'nonce' => wp_create_nonce( 'term_view' ),
'term_id' => (int) $term_id,
] );
}
}
public function set_views() {
if ( ! isset( $_POST['edumall_nonce'] ) || ! wp_verify_nonce( $_POST['edumall_nonce'], 'term_view' ) ) {
die( 'Permissions check failed!' );
}
$term_id = (int) $_POST['term_id'];
$count = (int) get_term_meta( $term_id, self::TERM_META_KEY, true );
$count++;
update_term_meta( $term_id, self::TERM_META_KEY, $count );
echo $count;
wp_die();
}
public function get_views( $term_id = null ) {
if ( isset( $term_id ) ) {
return (int) get_term_meta( $term_id, self::TERM_META_KEY, true );
}
if ( is_tax( 'course-tag' ) ) {
$queried_object = get_queried_object();
return (int) get_term_meta( $queried_object->term_id, self::TERM_META_KEY, true );
}
return 0;
}
}
Course_Term_Views::instance()->initialize();