diff --git a/Gruntfile.js b/Gruntfile.js index 4c0191284eb..e203adf5499 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -113,7 +113,7 @@ module.exports = function( grunt ) { dest: 'build', expand: true, options: { - noProcess: [ '*/**', 'LICENSE', 'jetpack-helper.php', 'wpcom-helper.php' ], // That is, only process amp.php and readme.txt. + noProcess: [ '*/**', 'LICENSE', 'wpcom-helper.php' ], // That is, only process amp.php and readme.txt. process: function( content, srcpath ) { var matches, version, versionRegex; if ( /amp\.php$/.test( srcpath ) ) { diff --git a/amp.php b/amp.php index 76164b750c1..598995a9d9b 100644 --- a/amp.php +++ b/amp.php @@ -266,10 +266,6 @@ function amp_init() { // Redirect the old url of amp page to the updated url. add_filter( 'old_slug_redirect_url', 'amp_redirect_old_slug_to_new_url' ); - if ( class_exists( 'Jetpack' ) && ! ( defined( 'IS_WPCOM' ) && IS_WPCOM ) && version_compare( JETPACK__VERSION, '6.2-alpha', '<' ) ) { - require_once AMP__DIR__ . '/jetpack-helper.php'; - } - // Add actions for legacy post templates. add_action( 'wp', 'amp_maybe_add_actions' ); diff --git a/jetpack-helper.php b/jetpack-helper.php deleted file mode 100644 index 17c17701a68..00000000000 --- a/jetpack-helper.php +++ /dev/null @@ -1,107 +0,0 @@ - - - . - $data = stats_build_view_data(); - } else { - $blog = Jetpack_Options::get_option( 'id' ); - $tz = get_option( 'gmt_offset' ); - $v = 'ext'; - $blog_url = wp_parse_url( site_url() ); - $srv = $blog_url['host']; - $j = sprintf( '%s:%s', JETPACK__API_VERSION, JETPACK__VERSION ); - $post = $wp_the_query->get_queried_object_id(); - $data = compact( 'v', 'j', 'blog', 'post', 'tz', 'srv' ); - } - - $data['host'] = isset( $_SERVER['HTTP_HOST'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : ''; // input var ok. - $data['rand'] = 'RANDOM'; // AMP placeholder. - $data['ref'] = 'DOCUMENT_REFERRER'; // AMP placeholder. - $data = array_map( 'rawurlencode', $data ); - return add_query_arg( $data, 'https://pixel.wp.com/g.gif' ); -} - -/** - * Force videopress to use html5 player that would generate