PluginProbe
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz / 2.12.8
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz v2.12.8
2.12.8 2.12.7 2.12.6 2.12.5 2.12.4 2.12.3 2.12.2 2.12.1 2.12.0 2.11.1 2.11.0 2.10.1 2.10.0 2.9.1 2.9.0 2.8.2 2.8.1 2.7.0 2.7.1 2.8.0 trunk 0.0.10 0.0.11 0.0.12 0.0.13 All 98 releases
← All changes | inc/admin/editor-nudge.php +23 -2 2.8.2 → 2.12.8 View file →
@@ -84,9 +84,9 @@
84 84 * @since 2.8.2
85 85 * @return bool
86 86 */
87 87 public function allow_load() {
88 - if ( ! is_admin() ) {
88 + if ( ! is_admin() || Helper::hide_promotions() ) {
89 89 return false;
90 90 }
91 91
92 92 // Gate on the cap required to actually manage SureForms forms
@@ -180,8 +180,29 @@
180 180 [],
181 181 SRFM_VER
182 182 );
183 183
184 + // Editor nudge UTM attribution — start.
185 + // Tag the "Create Form" CTA with the same UTM scheme used by other
186 + // SureForms nudge links so the destination flow can attribute the
187 + // click. Only fills keys not already present in the URL.
188 + $create_form_url = admin_url( 'admin.php?page=add-new-form' );
189 + $nudge_utm = [
190 + 'utm_source' => 'sureforms_plugin',
191 + 'utm_medium' => 'editor_nudge',
192 + 'utm_campaign' => 'core_plugin',
193 + ];
194 + $existing_args = [];
195 + $query_string = wp_parse_url( $create_form_url, PHP_URL_QUERY );
196 + if ( is_string( $query_string ) && '' !== $query_string ) {
197 + parse_str( $query_string, $existing_args );
198 + }
199 + $missing_utm = array_diff_key( $nudge_utm, $existing_args );
200 + if ( ! empty( $missing_utm ) ) {
201 + $create_form_url = add_query_arg( $missing_utm, $create_form_url );
202 + }
203 + // Editor nudge UTM attribution — end.
204 +
184 205 wp_localize_script(
185 206 $handle,
186 207 'srfm_editor_nudge',
187 208 [
@@ -186,9 +207,9 @@
186 207 'srfm_editor_nudge',
187 208 [
188 209 'ajax_url' => admin_url( 'admin-ajax.php' ),
189 210 'nonce' => wp_create_nonce( self::NONCE_ACTION ),
190 - 'create_form_url' => admin_url( 'admin.php?page=add-new-form' ),
211 + 'create_form_url' => $create_form_url,
191 212 'message' => __( 'Hey! It looks like you\'re creating a form. Build a ready-to-use form in under 30 seconds with SureForms AI, with no extra setup required.', 'sureforms' ),
192 213 'button_label' => __( 'Create Form', 'sureforms' ),
193 214 'logo_url' => SRFM_URL . 'admin/assets/sureforms-logo.png',
194 215 ]