WordPress Cluster 10.3.81

  • MU Plugins Updated:
    • Advertising 2.4.52
  • Plugins Updated:
    • Post Expirator 2.9.2 to 3.0.4
    • Google Showcase 2.0.0
      • NEW:
        • PHP:
          • WordPress REST API:
            • Queries Piano ID /publisher/login/social endpoint to get the social login redirect URL.
              • Parameter provides an origin url to faciliate returning the user back to where the intervention flow began.
            • Queries Piano ID /publisher/login/social/code endpoint to get the social login code.
              • Parameter provides a Google response id to exchange for a Piano user access token.
        • JavaScript:
          • handleLoginPromise:
            • Lets the user log in to an existing publisher account and providing the userState object for the newly logged-in user.
          • getAuthorizationUrlPromise:
            • Related to Piano ID REST API.
              • Calls WordPress REST API /publisher/login/social endpoint which returns a URL, this is provided in the GaaMetering.init configuration.
          • getSocialLoginAccessToken:
            • Queries Piano to get the Social login code.
          • getUserCreateDate:
            • Related to: userState
              • Retrieve users account creation timestamp.
          • getSubscriptionStartDate:
            • Related to: userState
              • Retrieve users subscription start timestamp.
          • isSocialLogin (utility):
            • Check if it is a social login response.
          • removeURLParameter (utility):
            • Remove a querystring parameter from a given url.
          • getVariableFromDataLayer (utility):
            • Get variable from the dataLayer window object.
          • waitFor (utility):
            • Function to wait for predicates.
          • GaaMetering.init configuration
            • authorizationUrl:
              • Launch a third-party sign-in flow from an authorizationUrl. This enables an IDMS to redirect a user to Sign-in with Google through OAuth 2.0 and handles sign-in or registration on the publisher’s behalf.
            • shouldInitializeSwG:
              • Bypass the initialization of swg.js when another method call to the swg.js library initializes it, prior to a GaaMeterint.init call.
      • MODIFIED/REFACTORED:
        • Docker:
          • SSL Certificates
            • dctCA.srl, wpcluster.test.crt/ext modified adding showcase.dev domain required for Google Showcase local development, requires adding to browsers who won’t accept or allow bypass anymore.
        • PHP:
          • isAccessibleForFree expanded to take into account Premium content.
          • Request check now limited to article pages.
          • Enqueue script now in the footer.
          • Replaced accounts.google.com/gsi/client JavaScript library instead of the older apis.google.com/js/platform.js library.
        • JavaScript:
          • getUserStatePromise:
            • Replacing Blaize state with Piano equivalents.
          • publisherEntitlementPromise:
            • Using the unified userState and replacing additional Blaize states with Piano equivalents.
          • unlockArticle:
            • Dismiss the piano-overlay and scroll-lock.
          • openLoginPage:
            • Replacing Blaize UIC with Piano equivalent.
          • GaaMetering.init configuration:
            • Awaits tp object being available as well as authorizationUrl, userStates which are required before initialising GaaMetering.
      • REMOVED:
        • PHP:
          • registration-shim.
        • JavaScript:
          • getUserState function.
            • Replaced within getUserStatePromise, callback no longer required.
          • registerUser function.
            • Replaced by authorizationUrl.
  • Docker Updates
    • dctCA
    • added showcase.dev domain required for local testing

PRs: https://github.com/dc-thomson/wordpress/pull/5437, https://github.com/dc-thomson/wordpress/pull/5440, https://github.com/dc-thomson/wordpress/pull/5247