/modules/comments.php

  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. * Additional Search Queries: comments, comment, facebook, twitter, google+, social 
  12. */ 
  13.  
  14. require dirname( __FILE__ ) . '/comments/comments.php'; 
  15.  
  16. if ( is_admin() ) { 
  17. require dirname( __FILE__ ) . '/comments/admin.php'; 
  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. function jetpack_comments_configuration_load() { 
  33. wp_safe_redirect( admin_url( 'options-discussion.php#jetpack-comments-settings' ) ); 
  34. exit; 
  35.  
  36. add_action( 'jetpack_modules_loaded', 'jetpack_comments_load' ); 
  37.  
  38. Jetpack::dns_prefetch( array( 
  39. '//jetpack.wordpress.com',  
  40. '//s0.wp.com',  
  41. '//s1.wp.com',  
  42. '//s2.wp.com',  
  43. '//public-api.wordpress.com',  
  44. '//0.gravatar.com',  
  45. '//1.gravatar.com',  
  46. '//2.gravatar.com',  
  47. ) ); 
.