Skip to content

[KADENCE USES IT] Bugfix: multisite token logic#51

Draft
defunctl wants to merge 137 commits intomainfrom
bugfix/multisite-token-logic
Draft

[KADENCE USES IT] Bugfix: multisite token logic#51
defunctl wants to merge 137 commits intomainfrom
bugfix/multisite-token-logic

Conversation

@defunctl
Copy link
Copy Markdown
Contributor

@defunctl defunctl commented Dec 1, 2023

Main Changes

This PR completely changes the way Uplink treats multisite installations. See the new multisite licensing documentation.

  • All token storing/disconnecting logic now requires a Resource slug in order to test whether the plugin is network activated or not, so we know where to store the token.
  • Lots of new helper functions to provide a common interface for accessing Uplink functionality.

Other

  • Fixes failing Replacement_Key tests due to renaming of base API url.

@defunctl defunctl self-assigned this Dec 1, 2023
@defunctl defunctl added the bug Something isn't working label Dec 1, 2023
@defunctl defunctl added this to the 2.0.0 milestone Dec 6, 2023
Ben Ritner and others added 22 commits December 11, 2024 16:54
update the get_license_key function to be able to get from a file
Co-authored-by: Justin <defunctl@users.noreply.github.com>
Co-authored-by: Justin <defunctl@users.noreply.github.com>
Add caching to a false response for is auth to prevent requests every page load.
get_transient doesn't return an integer, so we need to store and test against a string
@dave-green-uk
Copy link
Copy Markdown
Contributor

@defunctl do you know what (if anything) is blocking this being reviewed and merged?

We could use it for: https://github.com/iconicwp/iconic-core/pull/50#issuecomment-3670503301

@defunctl
Copy link
Copy Markdown
Contributor Author

@defunctl do you know what (if anything) is blocking this being reviewed and merged?

We could use it for: iconicwp/iconic-core#50 (comment)

Hey @dave-green-uk Basically I created this for Kadence in a hurry to launch the AI licensing.

Because it's such a major change, I'm not sure how many sites it could affect/break if merged. I just know that Kadence does currently uses this branch in production.

@johnhooks johnhooks self-requested a review February 18, 2026 14:28
@tarecord tarecord self-requested a review February 18, 2026 14:30
Comment on lines +72 to +74
if ( is_wp_error( $is_authorized ) ) {
// Don't cache errors.
return false;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe cache errors but cache them for a shorter amount of time ? not caching errors could potentially result in our service being overwhelmed,

$info->sections = [ 'description' => '' ];
}
$slug = ! empty( $info->slug ) ? $info->slug : 'unknown';
$info = apply_filters('stellarwp/uplink/' . $slug . '/to_wp_format', $info);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's add a docblock please

@johnhooks
Copy link
Copy Markdown

@defunctl if you can resolve the conflicts, it would be very helpful. Thanks.

@nikolaystrikhar nikolaystrikhar changed the title Bugfix: multisite token logic [KADENCE USES IT] Bugfix: multisite token logic Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants