Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Google Analytics module #5603

Merged
merged 43 commits into from
Jan 31, 2017
Merged

Add Google Analytics module #5603

merged 43 commits into from
Jan 31, 2017

Conversation

rodrigoi
Copy link
Contributor

@rodrigoi rodrigoi commented Nov 11, 2016

Synopsis: Add the existing Google Analytics plugin from WordPress.com as a Jetpack module. It is intended to be enabled for Jetpack Professional users.

Responsible: @rodrigoi

Technical approach:

  1. wp-google-analytics plugin distributed as-is as a module.
  2. class.wpcom-json-api-site-settings-endpoint.php was modified to include a Jetpack or WordPress.com check when updating the wga option.
  3. The JSON API was modified to support a google_analytics_tracking_id field. That is translated to the same wga option WordPress.com uses.
  4. Engagement settings page was modified to support paid plans detection, and to include the new Google Analytics settings form.

Testing instructions:

  • Run this branch on a WordPress installation.
  • A new Google Analytics item should show on the Engagement tab
  • only sites with a Professional plan should be able to activate the module. Otherwise, a upgrade button should show.
  • when active and configured, the Google Analytics script should be added to any page.

It'll be ideal to include this on 4.4, but set as 4.4.1 given the short timeline for review.

Complete: 80%

Difficulty:

Last Updated: 11/11 by @jeherve

@rodrigoi rodrigoi added Touches WP.com Files [Status] Needs Changelog [Status] Needs Review This PR is ready for review. [Status] Needs Testing We need to add this change to the testing call for this month's release [Type] Feature Request labels Nov 11, 2016
@rodrigoi rodrigoi added this to the 4.4.1 milestone Nov 11, 2016
@jeherve jeherve added Epic Formerly "Primary Issue", or "Master Issue" [Feature] Google Analytics labels Nov 11, 2016

<div className="dops-card">
<FormLabel>
<FormLegend>Google Analytics Tracking Id</FormLegend>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be translatable.

element[1] = <span>{ element[1] }<Button compact href="#/plans">{ __( 'Pro' ) }</Button></span>;
}

if ( element[0] === 'google-analytics' && sitePlan.product_slug !== 'jetpack_business' ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll need to support monthly plans as well. They use the jetpack_business_monthly slug.


/**
* Module Name: Google Analytics
* Module Description: MODULE DESCRIPTION COPY.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be updated.

* Module Description: MODULE DESCRIPTION COPY.
* First Introduced: 4.4
* Sort Order: 37
* Requires Connection: No
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it does require a connection. That feature won't be available in Dev mode.

/**
* Removes the Google Analytics plugin settings page
*/
function removeSettingsPage() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use only lowercase names for function names, as per the WP coding standards?

'token' => '%the_author%',
'callback' => 'get_the_author',
'callback_returns' => 'string',
'description' => __( 'Post author for current view', 'wp-google-analytics' ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to use the jetpack textdomain across all the module.

),
);

$this->tokens = apply_filters( 'wga_tokens', $this->tokens );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you give it a unique name, and add a docblock? You can check some of the past PRs for some examples:
https://github.com/Automattic/jetpack/pulls?q=is%3Apr+is%3Aclosed+label%3ADocs

* This adds the options page for this plugin to the Options page
*/
public function admin_menu() {
add_options_page(__('Google Analytics', 'wp-google-analytics'), __('Google Analytics', 'wp-google-analytics'), 'manage_options', self::$page_slug, array( $this, 'settings_view' ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing spaces here.

public function field_additional_items() {
$addtl_items = array(
'log_404s' => __( 'Log 404 errors as events', 'wp-google-analytics' ),
'log_searches' => sprintf( __( 'Log searches as /search/{search}?referrer={referrer} (<a href="%s">deprecated</a>)', 'wp-google-analytics' ), 'http://wordpress.org/extend/plugins/wp-google-analytics/faq/' ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's bundled in Jetpack, we should probably link to a Jetpack support doc instead.

$this->tokens = apply_filters( 'wga_tokens', $this->tokens );
}

/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we removed the settings page earlier, it might not be worth adding all this code. It's not used at all.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. @rodrigoi Can we remove this extra settings code here? It is going to be managed in Calypso.

@jeherve jeherve added [Status] In Progress [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review This PR is ready for review. [Status] Needs Testing We need to add this change to the testing call for this month's release labels Nov 11, 2016
@jeherve
Copy link
Member

jeherve commented Nov 11, 2016

I'll let @samhotchkiss confirm, but this might not make it into 4.4.1. We wanted this release to be a compatibility release for the upcoming WordPress 4.7.

4.5, on the other hand, will then be released a few weeks later.

@jeherve jeherve modified the milestones: 4.5, 4.4.1 Nov 11, 2016
* Removes the Google Analytics plugin settings page
*/
function removeSettingsPage() {
remove_submenu_page( 'options-general.php', 'wp-google-analytics' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're not going to use the existing settings code, could we remove completely instead of hiding it?

@@ -0,0 +1,615 @@
<?php
/**
* Plugin Name: WP Google Analytics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove this header completely, leaving in the copyright note below it.

* Google Analytics
*/
function jetpack_google_analytics_more_link() {
echo 'https://support.wordpress.com/google-analytics/';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use Jetpack support instead of en.support?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brandon, there's not a page at https://jetpack.com/support/google-analytics yet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The page will be published on release day. The draft is ready.

@dereksmart
Copy link
Member

@rodrigoi do you think you'll be able to give this some love sometime this week?

@samhotchkiss
Copy link
Contributor

@dereksmart -- I talked with @rodrigoi yesterday, he's planning to give it some love today

@rodrigoi rodrigoi force-pushed the add/google-analytics branch 2 times, most recently from 380b19f to ef7868c Compare December 9, 2016 06:11
/**
* Module Name: Google Analytics
* Module Description: Lets you use <a href="http://analytics.google.com">Google Analytics</a> to track your WordPress site statistics.
* First Introduced: 4.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4.5

* Google Analytics
*/
function jetpack_google_analytics_more_link() {
echo 'https://jetpack.com/support/';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will want a dedicated support page. Is there one on wordpress.com we can point to for now?

@dereksmart
Copy link
Member

dereksmart commented Dec 9, 2016

jshint is failing ATM

See comment above

.jshintignore Outdated
@@ -9,6 +9,7 @@ modules/shortcodes/js/jmpress.js
modules/shortcodes/js/jmpress.min.js
modules/shortcodes/js/jquery.cycle.js
modules/theme-tools/responsive-videos/responsive-videos.min.js
modules/google-analytics/wp-google-analytics.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't being ignored, but it's not your fault. Can you please add it to https://github.com/Automattic/jetpack/blob/master/gulpfile.js#L449 until we fix this? Thanks

@dereksmart
Copy link
Member

I'm seeing the module listed in /search, and it shows a toggle where it should be "upgrade". I am on a personal plan.

@dereksmart
Copy link
Member

I'm still seeing upgrade when I'm on the Professional Monthly plan

@dereksmart
Copy link
Member

When active, I'm not sure where to go to configure it. We need some sort of CTA/text for when it's active https://cloudup.com/cxp-1reWZbi

@rodrigoi
Copy link
Contributor Author

rodrigoi commented Dec 9, 2016

I think this is ready for another round of reviews 😉

jetpack docker site wordpress

jetpack docker site wordpress - disabled

jetpack docker site wordpress - enabled

@rodrigoi rodrigoi added [Status] Needs Review This PR is ready for review. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Jan 31, 2017
@rodrigoi
Copy link
Contributor Author

@dereksmart I think this is ready for another review.

@rodrigoi rodrigoi dismissed jeherve’s stale review January 31, 2017 19:54

Changes completed on November 11th.

@dereksmart
Copy link
Member

Thanks! Looking good. There are a couple of awkward things going on with timing/updating state.

  • When on Pro plan, you will see the upgrade button in the card flash for a second. I assume it's the default to show in the ProStatus card while we wait for the site plan. I think we've hacked in fixes for this for the other pro cards to display nothing when we're fetching site plan.

  • seems like it takes calypso a while to register whether the module is enabled, so if you navigate there quickly after activating, calypso will think it's not and you'll be prompted to enable it through the wp-admin again. This problem isn't limited to this module, but a general problem we're having, but if you have any ideas to fix for this instance, let's do it. Otherwise I think we can tackle it later.

  • Let's get a review of the copy/descriptions for active/inactive states. @richardmuscat? (this can be done in a separate PR as well)

@rodrigoi
Copy link
Contributor Author

Thanks @dereksmart !!

I've added the return ''; when fetchingSiteData to <ProStatus /> so the upgrade button won't flash until the site settings are loaded.

One step closer...

@dereksmart
Copy link
Member

Thanks @rodrigoi!

I'm going to give this my 👍 , pending @jeherve and @eliorivero approvals. The timing issue with calypso is not specific to this module, and I'm okay with the descriptions can be modified during beta.

@eliorivero
Copy link
Contributor

Shouldn't this module be at the top after SEO Tools? Right now is at the bottom of the list and someone could miss it.

@@ -5,7 +5,7 @@ import React from 'react';
import { connect } from 'react-redux';
import FoldableCard from 'components/foldable-card';
import { ModuleToggle } from 'components/module-toggle';
import forEach from 'lodash/forEach';
import { includes, forEach } from 'lodash';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be written as

import forEach from 'lodash/forEach';
import includes from 'lodash/includes';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in 386a85d.

@rodrigoi
Copy link
Contributor Author

@eliorivero on 921f864 I've moved the GA module to the top with the rest of the paid modules, right below Ads.

Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to work. I had a few remarks on my end as well:

Shouldn't this module be at the top after SEO Tools? Right now is at the bottom of the list and someone could miss it.

@eliorivero This was my first thought as well, and then I realized that it was the same for the VideoPress module in the Writing tab. I suppose it's not that important since Google Analytics isn't one of our main features right now, and since the whole thing will change with the new Settings UI?

if ( ! isset( $value['code'] ) || ! preg_match( '/^$|^UA-[\d-]+$/i', $value['code'] ) ) {
return new WP_Error( 'invalid_code', 'Invalid UA ID' );
}
$wga = get_option( 'wga', array() );

$is_wpcom = ! $is_jetpack && defined( 'IS_WPCOM' ) && IS_WPCOM;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This triggers a PHP Notice when saving the tracking ID on wpcom:

Undefined variable: is_jetpack in /wp-content/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php on line 364

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just remove that variable, it's not used in jetpack

@dereksmart
Copy link
Member

@jeherve I've fixed the undefined variable and updated the support link. Since the rest of the issues are wordpress.com related I'm going to merge this as-is and fix anything else that's needed during beta/testing.

@dereksmart dereksmart merged commit cfc5267 into master Jan 31, 2017
@dereksmart dereksmart deleted the add/google-analytics branch January 31, 2017 22:57
jeherve added a commit that referenced this pull request Feb 1, 2017
dereksmart pushed a commit that referenced this pull request Feb 2, 2017
* Changelog: move 4.5 changelog to changelog.txt

* Changelog: add #5603

* Changelog: add #6242

* Changelog: add #6104

* Changelog: add #6109

* Changelog: add #6118

* Changelog: adf #6122

* Changelog: add #6115

* Changelog: add #6126

* Changelog: add #6131

* Changelog: add #6140

* Testing list: add testing instructions for Widget fixes.

* Changelog: add #6142

* Changelog: add #6149

* Changelog: add #6151

* Changelog: add #6153

* Changelog: add #6154

* Changelog: add #6155

* Changelog: add #6158

* Changelog: add #6170

* Changelog: add #6182

* Changelog: add #6183

* Changelog: add #5821

* Changelog: add #5953

* Changelog: add #5988

* Changelog: add #6002

* Changelog: add #6021

* Changelog: add #6038

* Changelog: add #6040

* Changelog: add #6060

* Changelog: add #6068

* Changelog: add #6083

* Changelog: add #6098

* Changelog: add #6186

* Testing list: add Publicize instructions.

* Changelog: add #6190

* Changelog: add #6194

* Changelog: add #6230

* Changelog: add #6232

* Changelog: add #6234

* Testing list: add instructions to test Woo JITM.

* Testing list: add PHP 7.1 testing.

* Testing list: add compat tests for widgets and shortcodes.

* Testing list: add wpcom REST API testing.

* Missing word in testing list.
dereksmart pushed a commit that referenced this pull request Feb 2, 2017
* Changelog: move 4.5 changelog to changelog.txt

* Changelog: add #5603

* Changelog: add #6242

* Changelog: add #6104

* Changelog: add #6109

* Changelog: add #6118

* Changelog: adf #6122

* Changelog: add #6115

* Changelog: add #6126

* Changelog: add #6131

* Changelog: add #6140

* Testing list: add testing instructions for Widget fixes.

* Changelog: add #6142

* Changelog: add #6149

* Changelog: add #6151

* Changelog: add #6153

* Changelog: add #6154

* Changelog: add #6155

* Changelog: add #6158

* Changelog: add #6170

* Changelog: add #6182

* Changelog: add #6183

* Changelog: add #5821

* Changelog: add #5953

* Changelog: add #5988

* Changelog: add #6002

* Changelog: add #6021

* Changelog: add #6038

* Changelog: add #6040

* Changelog: add #6060

* Changelog: add #6068

* Changelog: add #6083

* Changelog: add #6098

* Changelog: add #6186

* Testing list: add Publicize instructions.

* Changelog: add #6190

* Changelog: add #6194

* Changelog: add #6230

* Changelog: add #6232

* Changelog: add #6234

* Testing list: add instructions to test Woo JITM.

* Testing list: add PHP 7.1 testing.

* Testing list: add compat tests for widgets and shortcodes.

* Testing list: add wpcom REST API testing.

* Missing word in testing list.
samhotchkiss pushed a commit that referenced this pull request Feb 10, 2017
* update google analytics description (#6250)

* Add user tracking for disconnecting site (#6248)

* Minor whitespace cleanups

* Changelog and Testing list for Jetpack 4.6 (#6245)

* Changelog: move 4.5 changelog to changelog.txt

* Changelog: add #5603

* Changelog: add #6242

* Changelog: add #6104

* Changelog: add #6109

* Changelog: add #6118

* Changelog: adf #6122

* Changelog: add #6115

* Changelog: add #6126

* Changelog: add #6131

* Changelog: add #6140

* Testing list: add testing instructions for Widget fixes.

* Changelog: add #6142

* Changelog: add #6149

* Changelog: add #6151

* Changelog: add #6153

* Changelog: add #6154

* Changelog: add #6155

* Changelog: add #6158

* Changelog: add #6170

* Changelog: add #6182

* Changelog: add #6183

* Changelog: add #5821

* Changelog: add #5953

* Changelog: add #5988

* Changelog: add #6002

* Changelog: add #6021

* Changelog: add #6038

* Changelog: add #6040

* Changelog: add #6060

* Changelog: add #6068

* Changelog: add #6083

* Changelog: add #6098

* Changelog: add #6186

* Testing list: add Publicize instructions.

* Changelog: add #6190

* Changelog: add #6194

* Changelog: add #6230

* Changelog: add #6232

* Changelog: add #6234

* Testing list: add instructions to test Woo JITM.

* Testing list: add PHP 7.1 testing.

* Testing list: add compat tests for widgets and shortcodes.

* Testing list: add wpcom REST API testing.

* Missing word in testing list.

* generate new module headers (#6264)

* Tracks: don't track during CI runs

* WPCOM MERGE Infinite Scroll (#6246)

* VIP: Query errors generated for HoopsHype are caused by the infinite scroll functionality. This filter will allow to use rewrite rules so that the infinity functions can be called by rewrite rules that will be cached by batcache.

Merges r120201-wpcom.

* Infinite Scroll: only disable in the Customizer when previewing a non-active theme.

Fixes #7507
See [115743] #6795

Merges r122634-wpcom.

* Infinite Scroll: allow `get_settings` to be filtered at later points than just `__construct`. See #7539.

Merges r123819-wpcom.

* Infinite Scroll: add translation function to credit line.

Merges #2537
Fixes #2528

https://[private link]

Merges r132540-wpcom.

* Infinite Scroll: fix IS when content includes Curly Quotes (and other non-UTF8 chars)

Using wp_json_encode instead of json_encode allowing us to replace invalid chars with HTML entities.

Merges #1447
Fixes #1446
props jtsternberg

https://[private link]

Merges r132541-wpcom.

* Infinite Scroll: add check on ob_end_clean for cases where output_buffering is disabled

Merges #2545
Props drrobotnik

https://[private link]

Merges r132542-wpcom.

* Infinite Scroll: check that search terms exist before matching against post title.

Merges #2128
Fixes #2075
Props cainm

https://[private link]

Merges r132543-wpcom.

* Infinite Scroll: Fatal error when calling protected method from WP_Query

Since we already have wp_query() we can use its query_vars['search_terms'] property instead of calling parse_search_terms().
It gets populated on https://github.com/WordPress/WordPress/blob/4.3.1/wp-includes/query.php#L2075 with the same data.

Merges #2827
Fixes #2255
Props osiux

https://[private link]

Merges r132544-wpcom.

* Infinite Scroll: Hide infinite-scroll class if the option is disabled

The Jetpack support page says that the infinite-scroll class should be used in a theme to hide the navigation links.
However, even when disabled in the Reading page, the class is still visible and the CSS is applied just as if the scroll is enabled.

This commit adds an option check before filtering the body_class classes.

Merges #1208
Props mpeshev

https://[private link]

Merges r132546-wpcom.

* Infinite Scroll: Don't clobber the posts_per_page option if provided

Infinite Scroll currently clobbers any passed-in value for posts_per_page if the type is set to click.
This commit changes the behavior to match the documentation:
https://jetpack.me/support/infinite-scroll/

Merges #2808
Props codebykat

https://[private link]

Merges r132547-wpcom.

* Infinite Scroll: document all filter and action hooks

Merges #2852

https://[private link]

Merges r132551-wpcom.

* Infinite Scroll: favor user set settings over theme settings

If user changed their posts_per_page option, use that in Infinite Scroll instead of the value set in theme's IS support declaration.
Only true when IS is set to click.

Related: r132547
Discussion: https://[private link]#comment-31306

Merges r132764-wpcom.

* Infinite Scroll: Merge changes from Jetpack into wpcom

Just removing some whitespace so the 2 files are exactly similar and do not trigger the build script anymore.

Merges r132787-wpcom.

* Infinite Scroll: Make sure the body class gets updated once we are done with IS even when we just click

Merges r134572-wpcom.

* Remove `target="_blank"` from internal link.

Accidentally added by #3600, which was intended to add only to external links.

* JSON API: Removes PHP notice when no taxonomy description provided

Fixes #4424

* JSON API: Removes PHP notice when no term description provided

Fixes: #5943

* Google Analytics: hook tracking code into wp_footer. (#6284)

get_footer might not be compatible with every theme out there.

* Google Analytics: add HTML comment before the script output. (#6288)

* Sync: Return expected response on Jetpack side

* GA: Update inactive description to match calypso (#6291)

* lodash: import specific function (#6295)

* Change Infinite Scroll Google Analytics option label (#6239)

* Sync: Fixes an issue where sync_wait_time was immediately overwritten in sync sender (#6281)

* Documentation: reorganize current docs and create new ones. (#5985)

* Documentation: reorganize current docs and create new ones.

- Make contributing less frightening and easier for all potential contributors.
- Make our guidelines and requirements clearer.
- Surface all data in our contributing guide.
- Offer options to contribute to everyone, even if it's not via code.
- Outline our release management process, and approach to code reviews and Pull Requests.

* Documentation: fix typos, headings, wrong links.

* Add PHPCS and ESLint to the development environment documentation.

* Docs: include some information about PHP Unit Testing.

Fixes #6236

* Docs: add "Development" section.

@see #5985 (comment)

* update languages (#6302)

* Bump version to 4.7-alpha (#6301)

* Fix: Use the site_icon id instead of the url (#6303)

When $image_url is set to a photon image we are not able to deremine
the $image_id. Instead we should use the option that stores the ID
instead.

This fixes the issue when we show the default image instead of the
site icon as the open graph main image. When photon is enabled and the
site icon is set.

* Add unit test for Publicize (#6018)

* Add the accessible-focus library from dops-components to enable keyboard focus styles (#6300)

* Use shorter WooCommerce Services MC stat slug.

* Track WooCommerce services install as a module activation, not a WPCOM tools event.

* Track WooCommerce Services JITM click and activation separately.

* Update printThis to v1.9.0 (#6263)

* Update to printThis v1.9

Additional options, including:
* base tag
* preservation of form values
* doctype
* canvas (experimental)
* Additional cleanup

* Added jshint

* Date update

Update date for `wp_enqueue_script` for printThis to prevent caching issues

* Add filter for WordPress Posts widget content

* Replace esc_html_e with esc_html__. Change the initialization of .

* Don't call site_url() twice

Instead of calling the function twice, which is a waste, assign the
value to a variable and use that value to check whether we're on a
tld-less domain or not.

* Upgrades yarn lock file and fixes builds for master branch. (#6309)

* Fixing a problem with local import.

* Running yarn upgrade.

* Added the print this library to jshint ignore.

* Added a new generated RTL CSS file.

* Changelog: update for release (#6280)

* Changelog: add release post link.

* Improved the changelog for readability and understanding

* some minor adjustments were made to wording and to eliminate errors

* Fix typos

* update SSO changelog entry verbiage

* changelogs edits per sdquirk

* Adds vscode dir to ignore

Visual Studio Code can store per-project settings in a .vscode folder;
this updates .gitignore to ignore that, since it shouldn't be checked
in.

* Follow Widget: load translation files using wpcom language codes. (#5941)

* Follow Widget: load translation files using wpcom language codes.

Related: #2698

The widget previously used the site's language code to populate the `data-lang` parameter.
that parameter is used to grab language files from WordPress.com, and should consequently use a language code that's available on
WordPress.com.

We consequently use the data available in locales.php to use the `slug` language code instead of `wp_locale` for each language.

* Follow Widget / Notes: avoid calling get_locale() twice.

It's been called before on the file.

@see #5941 (review)

* Remove Jetpack_Network::wp_get_sites in favor of core's wp_get_sites (#3405)

* Removes Jetpack_Network::wp_get_sites and uses core's wp_get_sites instead.

Changes usages of returned array since the one in Jetpack returned an array of objects and the one in core returns an array of arrays.
Call to wp_get_sites has offset set to 1 to dismiss the first site since Function in Jetpack excluded the first site as well.

* Make strings available for translation.

* Use get_sites() instead of deprecated wp_get_sites()

* Escape URLs in network admin, even though they are presumed safe

* Network: introduce get_current_blog_id() when discarding the main site from sites table

* Holiday Snow: remove settings outside of Holiday Snow period (#6298)

* Only show holiday snow option 1 week before, through to 1 week after holiday snow period. Always show holiday snow option if custom rules have been set for holiday snow period.

* Disable holiday snow option on Jan 4; not Jan 11

* Don't use Initial_State to fetch holiday snow option visibility

* Media Summary: improve performance with single page load caching (#5938)

* improve Jetpack_Media_Summary performance by caching result for a single pageload

* spacing

* no need to md5, also set cache to private

* Remove unnecessary error_log (#6318)

* Improve translatability of plurals and texts with variables (#6307)

* Make gettext call plural aware
* Add translator comments and convert plural strings

* Slideshow: add filter to customize speed of the Slideshow.

Suggested in https://wordpress.org/support/topic/gallery-slideshow-settings-editable-somehow

* Slideshow: bump js version to bust cache.

* Slideshow: use the timeout param instead of speed

@see http://jquery.malsup.com/cycle/options.html

* Slideshow shortcode: update version number in docblock.

* Replace text labels with x and + icons.

* Fix bug where wrong xmlrpc url was being sent to Jetpack Debugger (#6321)

* Ignore GET parameters when checking an image's original file url matches container href (#6296)

* Add email field to Contact Info Widget (#6275)

* Add email field to Contact Info Widget

* Replace admin email with sample email. Validate email and remove link if it is not

* Display nothing when the email check fails

* Remove email default value

* Remove PHP error on uninstall, by making sure that jetpack includes all the required files (#6320)

* Add image caching to jetpack_og_get_image() (#6297)

* Add image caching to jetpack_og_get_image()

This adds a transient to store the value of the $image_id to "speed up"  the function to fix #6017

* Added missing semicolons at EOL on a couple lines

* Adding some whitespace per coding standards

* upgrade yarn.lock
@kraftbj kraftbj removed the [Status] Needs Review This PR is ready for review. label Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants