| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Module Name: Comments |
| 5 |
* Module Description: Allow comments with WordPress.com, Twitter, Facebook, or Google+. |
| 6 |
* First Introduced: 1.4 |
| 7 |
* Sort Order: 20 |
| 8 |
* Requires Connection: Yes |
| 9 |
* Auto Activate: No |
| 10 |
* Module Tags: Social |
| 11 |
* Feature: Engagement |
| 12 |
* Additional Search Queries: comments, comment, facebook, twitter, google+, social |
| 13 |
*/ |
| 14 |
|
| 15 |
require dirname( __FILE__ ) . '/comments/comments.php'; |
| 16 |
|
| 17 |
if ( is_admin() ) { |
| 18 |
require dirname( __FILE__ ) . '/comments/admin.php'; |
| 19 |
} |
| 20 |
|
| 21 |
function jetpack_comments_load() { |
| 22 |
Jetpack::enable_module_configurable( __FILE__ ); |
| 23 |
Jetpack::module_configuration_load( __FILE__, 'jetpack_comments_configuration_load' ); |
| 24 |
} |
| 25 |
|
| 26 |
function jetpack_comments_configuration_load() { |
| 27 |
wp_safe_redirect( admin_url( 'options-discussion.php#jetpack-comments-settings' ) ); |
| 28 |
exit; |
| 29 |
} |
| 30 |
|
| 31 |
add_action( 'jetpack_modules_loaded', 'jetpack_comments_load' ); |
| 32 |
|
| 33 |
Jetpack::dns_prefetch( array( |
| 34 |
'//jetpack.wordpress.com', |
| 35 |
'//s0.wp.com', |
| 36 |
'//s1.wp.com', |
| 37 |
'//s2.wp.com', |
| 38 |
'//public-api.wordpress.com', |
| 39 |
'//0.gravatar.com', |
| 40 |
'//1.gravatar.com', |
| 41 |
'//2.gravatar.com', |
| 42 |
) ); |
| 43 |
|