2019-11-15 23:26:29 +01:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* Module Name: Comments
|
2023-09-26 10:24:36 +02:00
|
|
|
* Module Description: Let visitors use a WordPress.com or Facebook account to comment
|
2019-11-15 23:26:29 +01:00
|
|
|
* First Introduced: 1.4
|
|
|
|
|
* Sort Order: 20
|
|
|
|
|
* Requires Connection: Yes
|
|
|
|
|
* Auto Activate: No
|
|
|
|
|
* Module Tags: Social
|
|
|
|
|
* Feature: Engagement
|
2023-09-26 10:24:36 +02:00
|
|
|
* Additional Search Queries: comments, comment, facebook, social
|
2020-09-15 14:30:05 +02:00
|
|
|
*
|
2021-04-27 08:32:47 +02:00
|
|
|
* @package automattic/jetpack
|
2019-11-15 23:26:29 +01:00
|
|
|
*/
|
|
|
|
|
|
2020-09-15 14:30:05 +02:00
|
|
|
use Automattic\Jetpack\Assets;
|
|
|
|
|
|
|
|
|
|
Assets::add_resource_hint(
|
|
|
|
|
array(
|
|
|
|
|
'//jetpack.wordpress.com',
|
|
|
|
|
'//s0.wp.com',
|
|
|
|
|
'//public-api.wordpress.com',
|
|
|
|
|
'//0.gravatar.com',
|
|
|
|
|
'//1.gravatar.com',
|
|
|
|
|
'//2.gravatar.com',
|
|
|
|
|
),
|
|
|
|
|
'dns-prefetch'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Add the main commenting system.
|
|
|
|
|
*/
|
2020-12-10 14:04:11 +01:00
|
|
|
require __DIR__ . '/comments/comments.php';
|
2024-02-16 11:03:01 +01:00
|
|
|
require __DIR__ . '/comments/subscription-modal-on-comment/class-jetpack-subscription-modal-on-comment.php';
|
2019-11-15 23:26:29 +01:00
|
|
|
|
|
|
|
|
if ( is_admin() ) {
|
2020-09-15 14:30:05 +02:00
|
|
|
/**
|
|
|
|
|
* Add the admin functionality.
|
|
|
|
|
*/
|
2020-12-10 14:04:11 +01:00
|
|
|
require __DIR__ . '/comments/admin.php';
|
2019-11-15 23:26:29 +01:00
|
|
|
}
|
|
|
|
|
|
2020-09-15 14:30:05 +02:00
|
|
|
/**
|
|
|
|
|
* Module loader.
|
|
|
|
|
*/
|
2019-11-15 23:26:29 +01:00
|
|
|
function jetpack_comments_load() {
|
|
|
|
|
Jetpack::enable_module_configurable( __FILE__ );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
add_action( 'jetpack_modules_loaded', 'jetpack_comments_load' );
|