comments.php
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Module Name: Jetpack 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 |