| 1 |
<?php |
| 2 |
/** |
| 3 |
* Module Name: Comments |
| 4 |
* Module Description: Let visitors use a WordPress.com, Twitter, or Facebook account to comment |
| 5 |
* First Introduced: 1.4 |
| 6 |
* Sort Order: 20 |
| 7 |
* Requires Connection: Yes |
| 8 |
* Auto Activate: No |
| 9 |
* Module Tags: Social |
| 10 |
* Feature: Engagement |
| 11 |
* Additional Search Queries: comments, comment, facebook, twitter, social |
| 12 |
* |
| 13 |
* @package automattic/jetpack |
| 14 |
*/ |
| 15 |
|
| 16 |
use Automattic\Jetpack\Assets; |
| 17 |
|
| 18 |
Assets::add_resource_hint( |
| 19 |
array( |
| 20 |
'//jetpack.wordpress.com', |
| 21 |
'//s0.wp.com', |
| 22 |
'//public-api.wordpress.com', |
| 23 |
'//0.gravatar.com', |
| 24 |
'//1.gravatar.com', |
| 25 |
'//2.gravatar.com', |
| 26 |
), |
| 27 |
'dns-prefetch' |
| 28 |
); |
| 29 |
|
| 30 |
/* |
| 31 |
* Add the main commenting system. |
| 32 |
*/ |
| 33 |
require __DIR__ . '/comments/comments.php'; |
| 34 |
|
| 35 |
if ( is_admin() ) { |
| 36 |
/** |
| 37 |
* Add the admin functionality. |
| 38 |
*/ |
| 39 |
require __DIR__ . '/comments/admin.php'; |
| 40 |
} |
| 41 |
|
| 42 |
/** |
| 43 |
* Module loader. |
| 44 |
*/ |
| 45 |
function jetpack_comments_load() { |
| 46 |
Jetpack::enable_module_configurable( __FILE__ ); |
| 47 |
} |
| 48 |
|
| 49 |
add_action( 'jetpack_modules_loaded', 'jetpack_comments_load' ); |
| 50 |
|