Esempio n. 1
0
 /**
  * Enqueues all theme assets
  */
 public function enqueue_assets()
 {
     wp_enqueue_style('yoast-com');
     wp_enqueue_script('yoast-com');
     wp_localize_script('yoast-com', 'YoastAjax', array('ajaxurl' => admin_url('admin-ajax.php')));
     if (function_exists('edd_is_checkout') && edd_is_checkout()) {
         wp_enqueue_style('chosen');
         wp_enqueue_script('yoast-com-checkout');
         wp_localize_script('yoast-com-checkout', 'yoast_com_checkout_vars', array('ajaxurl' => edd_get_ajax_url(), 'checkout_nonce' => wp_create_nonce('edd_checkout_nonce'), 'taxes_enabled' => edd_use_taxes() ? '1' : '0', 'tax_rates' => $this->get_tax_rates()));
     }
     // Remove the cross selling CSS because we overwrite it completely.
     wp_deregister_style('edd-csau-css');
     if (is_singular('post') && !Hide_Comments::hide_comments() && comments_open()) {
         wp_enqueue_script('comment-reply');
     }
     if (is_singular(array('course', 'lesson', 'llms_quiz'))) {
         wp_enqueue_script('yoast-com-academy');
     }
 }
Esempio n. 2
0
<?php

/**
 * @package Yoast\YoastCom
 */
namespace Yoast\YoastCom\Theme;

use Yoast\YoastCom\Settings\Hide_Comments;
if (post_password_required()) {
    return;
}
if (Hide_Comments::hide_comments()) {
    return;
}
?>

<ol class="comment-list">
	<?php 
wp_list_comments(array('style' => 'ul', 'walker' => new Comment_Walker(), 'type' => 'comment'));
?>
</ol><!-- .comment-list -->
<?php 
Esempio n. 3
0
        }
        ?>
			</div>
		<?php 
    }
    ?>
	<?php 
}
?>

	<?php 
$comments_number = get_comments_number();
?>
	<div class="meta__date">
		<?php 
if (!Hide_Comments::hide_comments() && $comments_number > 0) {
    ?>
			<?php 
    the_time('d F, Y');
    ?>
			&ndash;
			<a href="#comments"><?php 
    get_template_part('html_includes/partials/comments-number');
    ?>
</a>
		<?php 
} else {
    ?>
			Last update: <?php 
    the_modified_date('d F, Y');
    ?>