PluginProbe
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs / 2.6.6
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs v2.6.6
5.0.1 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 All 39 releases
← All changes | freemius/templates/contact.php +35 -10 5.0.1 → 2.6.6 View file →
@@ -6,22 +6,16 @@
6 6 * @since 1.0.3
7 7 */
8 8
9 9 /**
10 - * Update (October 9, 2024 by @swashata):
11 - * Following request from the wp.org plugin review team, we have stopped
12 - * embedding the contact form inside an i-frame for wp.org hosted free version
13 - * of plugins. Now they will be opened in a new tab.
14 - *
15 10 * Note for WordPress.org Theme/Plugin reviewer:
16 11 * Freemius is an SDK for plugin and theme developers. Since the core
17 12 * of the SDK is relevant both for plugins and themes, for obvious reasons,
18 13 * we only develop and maintain one code base.
19 14 *
20 - * This code (and page) will not run for wp.org themes or plugins. It will
21 - * run only for premium version of the plugin/theme that is using the SDK.
15 + * This code (and page) will not run for wp.org themes (only plugins).
22 16 *
23 - * In addition, when this page loads an i-frame. We intentionally named it 'frame'
17 + * In addition, this page loads an i-frame. We intentionally named it 'frame'
24 18 * so it will pass the "Theme Check" that is looking for the string "i" . "frame".
25 19 *
26 20 * UPDATE:
27 21 * After ongoing conversations with the WordPress.org TRT we received
@@ -43,9 +37,10 @@
43 37 exit;
44 38 }
45 39
46 40 wp_enqueue_script( 'jquery' );
47 - fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.js' );
41 + wp_enqueue_script( 'json2' );
42 + fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
48 43 fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
49 44 fs_enqueue_local_style( 'fs_checkout', '/admin/common.css' );
50 45
51 46 /**
@@ -54,10 +49,31 @@
54 49 */
55 50 $fs = freemius( $VARS['id'] );
56 51 $slug = $fs->get_slug();
57 52
58 - $query_params = FS_Contact_Form_Manager::instance()->get_query_params( $fs );
53 + $context_params = array(
54 + 'plugin_id' => $fs->get_id(),
55 + 'plugin_public_key' => $fs->get_public_key(),
56 + 'plugin_version' => $fs->get_plugin_version(),
57 + );
59 58
59 +
60 + // Get site context secure params.
61 + if ( $fs->is_registered() ) {
62 + $context_params = array_merge( $context_params, FS_Security::instance()->get_context_params(
63 + $fs->get_site(),
64 + time(),
65 + 'contact'
66 + ) );
67 + }
68 +
69 + $query_params = array_merge( $_GET, array_merge( $context_params, array(
70 + 'plugin_version' => $fs->get_plugin_version(),
71 + 'wp_login_url' => wp_login_url(),
72 + 'site_url' => Freemius::get_unfiltered_site_url(),
73 +// 'wp_admin_css' => get_bloginfo('wpurl') . "/wp-admin/load-styles.php?c=1&load=buttons,wp-admin,dashicons",
74 + ) ) );
75 +
60 76 $view_params = array(
61 77 'id' => $VARS['id'],
62 78 'page' => strtolower( $fs->get_text_inline( 'Contact', 'contact' ) ),
63 79 );
@@ -100,4 +116,13 @@
100 116 <?php
101 117 if ( $has_tabs ) {
102 118 $fs->_add_tabs_after_content();
103 119 }
120 +
121 + $params = array(
122 + 'page' => 'contact',
123 + 'module_id' => $fs->get_id(),
124 + 'module_type' => $fs->get_module_type(),
125 + 'module_slug' => $slug,
126 + 'module_version' => $fs->get_plugin_version(),
127 + );
128 + fs_require_template( 'powered-by.php', $params );