comments.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Module Name: Comments
  4. * Module Description: Let readers use WordPress.com, Twitter, Facebook, or Google+ accounts 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, google+, social
  12. */
  13. require dirname( __FILE__ ) . '/comments/comments.php';
  14. if ( is_admin() ) {
  15. require dirname( __FILE__ ) . '/comments/admin.php';
  16. }
  17. function jetpack_comments_load() {
  18. Jetpack::enable_module_configurable( __FILE__ );
  19. Jetpack::module_configuration_load( __FILE__, 'jetpack_comments_configuration_load' );
  20. }
  21. function jetpack_comments_configuration_load() {
  22. wp_safe_redirect( admin_url( 'options-discussion.php#jetpack-comments-settings' ) );
  23. exit;
  24. }
  25. add_action( 'jetpack_modules_loaded', 'jetpack_comments_load' );
  26. Jetpack::dns_prefetch( array(
  27. '//jetpack.wordpress.com',
  28. '//s0.wp.com',
  29. '//s1.wp.com',
  30. '//s2.wp.com',
  31. '//public-api.wordpress.com',
  32. '//0.gravatar.com',
  33. '//1.gravatar.com',
  34. '//2.gravatar.com',
  35. ) );