PluginProbe
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites / trunk
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites vtrunk
4.1.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.1.2 2.5.0 2.5.3 2.6.1 All 38 releases
← All changes | freemius/includes/class-fs-security.php +18 -0 1.3.1trunk View file →
@@ -81,5 +81,23 @@
81 81 's_ctx_ts' => $timestamp,
82 82 's_ctx_secure' => $this->get_secure_token( $entity, $timestamp, $action ),
83 83 );
84 84 }
85 +
86 + /**
87 + * Gets a sandbox trial token for a given plugin, plan, and trial timestamp.
88 + *
89 + * @param FS_Plugin $plugin
90 + * @param FS_Plugin_Plan $plan
91 + * @param int $trial_timestamp
92 + *
93 + * @return string
94 + */
95 + function get_trial_token( FS_Plugin $plugin, FS_Plugin_Plan $plan, $trial_timestamp ) {
96 + return md5(
97 + $plugin->secret_key . $plugin->public_key .
98 + $plan->trial_period .
99 + $plan->id .
100 + $trial_timestamp
101 + );
102 + }
85 103 }