Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 17 |
|
0.00% |
0 / 1 |
CRAP | n/a |
0 / 0 |
|
| jetpack_comments_load | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Module Name: Comments |
| 4 | * Module Description: Replace the default comment form with a modern, feature‑rich alternative. |
| 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, social |
| 12 | * |
| 13 | * @package automattic/jetpack |
| 14 | */ |
| 15 | |
| 16 | use Automattic\Jetpack\Assets; |
| 17 | |
| 18 | if ( ! defined( 'ABSPATH' ) ) { |
| 19 | exit( 0 ); |
| 20 | } |
| 21 | |
| 22 | Assets::add_resource_hint( |
| 23 | array( |
| 24 | '//jetpack.wordpress.com', |
| 25 | '//s0.wp.com', |
| 26 | '//public-api.wordpress.com', |
| 27 | '//secure.gravatar.com', |
| 28 | ), |
| 29 | 'dns-prefetch' |
| 30 | ); |
| 31 | |
| 32 | /* |
| 33 | * Add the main commenting system. |
| 34 | */ |
| 35 | require __DIR__ . '/comments/comments.php'; |
| 36 | require __DIR__ . '/comments/subscription-modal-on-comment/class-jetpack-subscription-modal-on-comment.php'; |
| 37 | |
| 38 | if ( is_admin() ) { |
| 39 | /** |
| 40 | * Add the admin functionality. |
| 41 | */ |
| 42 | require __DIR__ . '/comments/admin.php'; |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Module loader. |
| 47 | */ |
| 48 | function jetpack_comments_load() { |
| 49 | Jetpack::enable_module_configurable( __FILE__ ); |
| 50 | } |
| 51 | |
| 52 | add_action( 'jetpack_modules_loaded', 'jetpack_comments_load' ); |