PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 6.3
Jetpack – WP Security, Backup, Speed, & Growth v6.3
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
← All changes | modules/comments.php +22 -38 16.2-beta6.3 View file →
@@ -1,8 +1,9 @@
1 1 <?php
2 +
2 3 /**
3 4 * Module Name: Comments
4 - * Module Description: Replace the default comment form with a modern, feature‑rich alternative.
5 + * Module Description: Let readers use WordPress.com, Twitter, Facebook, or Google+ accounts to comment
5 6 * First Introduced: 1.4
6 7 * Sort Order: 20
7 8 * Requires Connection: Yes
8 9 * Auto Activate: No
@@ -7,52 +8,35 @@
7 8 * Requires Connection: Yes
8 9 * Auto Activate: No
9 10 * Module Tags: Social
10 11 * Feature: Engagement
11 - * Additional Search Queries: comments, comment, facebook, social
12 - *
13 - * @package automattic/jetpack
12 + * Additional Search Queries: comments, comment, facebook, twitter, google+, social
14 13 */
15 14
16 -use Automattic\Jetpack\Assets;
17 -use Automattic\Jetpack\Comments\Comments;
15 +require dirname( __FILE__ ) . '/comments/comments.php';
18 16
19 -if ( ! defined( 'ABSPATH' ) ) {
20 - exit( 0 );
21 -}
22 -
23 -// Guarded because the module file and the package can land in either order on a staged deploy.
24 -if ( class_exists( Comments::class ) && Comments::is_enabled() ) {
25 - Comments::init();
26 -} else {
27 - Assets::add_resource_hint(
28 - array(
29 - '//jetpack.wordpress.com',
30 - '//s0.wp.com',
31 - '//public-api.wordpress.com',
32 - '//secure.gravatar.com',
33 - ),
34 - 'dns-prefetch'
35 - );
36 -}
37 -
38 -/*
39 - * Add the main commenting system.
40 - */
41 -require __DIR__ . '/comments/comments.php';
42 -require __DIR__ . '/comments/subscription-modal-on-comment/class-jetpack-subscription-modal-on-comment.php';
43 -
44 17 if ( is_admin() ) {
45 - /**
46 - * Add the admin functionality.
47 - */
48 - require __DIR__ . '/comments/admin.php';
18 + require dirname( __FILE__ ) . '/comments/admin.php';
49 19 }
50 20
51 -/**
52 - * Module loader.
53 - */
54 21 function jetpack_comments_load() {
55 22 Jetpack::enable_module_configurable( __FILE__ );
23 + Jetpack::module_configuration_load( __FILE__, 'jetpack_comments_configuration_load' );
56 24 }
57 25
26 +function jetpack_comments_configuration_load() {
27 + wp_safe_redirect( admin_url( 'options-discussion.php#jetpack-comments-settings' ) );
28 + exit;
29 +}
30 +
58 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 +) );