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