Insert Headers and Footers - Version 2.0.4.3

Version Description

  • Tweak: We updated the default behaviour of our page scripts metabox so that it is collapsed by default.
Download this release

Release Info

Developer gripgrip
Plugin Icon 128x128 Insert Headers and Footers
Version 2.0.4.3
Comparing to
See all releases

Code changes from version 2.0.4.2 to 2.0.4.3

build/notices.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array(), 'version' => '575dca5623010d5a9167457c48a6bb2b');
1
+ <?php return array('dependencies' => array(), 'version' => 'ab1b681998f921b5812d4439c9a28315');
build/notices.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";(window.WPCodeAdminWideNotices||function(i,n,e){var o={init:function(){e(o.ready)},ready:function(){o.events()},events:function(){e(i).on("click",".wpcode-notice .notice-dismiss, .wpcode-notice .wpcode-notice-dismiss",o.dismissNotice)},dismissNotice:function(i){e.post(wpcode_admin_notices.ajax_url,{action:"wpcode_notice_dismiss",_wpnonce:wpcode_admin_notices.nonce,id:(e(this).closest(".wpcode-notice").attr("id")||"").replace("wpcode-notice-","")})}};return o}(document,window,jQuery)).init()}();
1
+ !function(){"use strict";(window.WPCodeAdminWideNotices||function(i,e,c){var n={init:function(){c(n.ready)},ready:function(){n.events()},events:function(){c(i).on("click",".wpcode-notice .notice-dismiss, .wpcode-notice .wpcode-notice-dismiss",n.dismissNotice)},dismissNotice:function(i){i.target.classList.contains("wpcode-notice-dismiss")&&c(this).closest(".wpcode-notice").slideUp(),c.post(wpcode_admin_notices.ajax_url,{action:"wpcode_notice_dismiss",_wpnonce:wpcode_admin_notices.nonce,id:(c(this).closest(".wpcode-notice").attr("id")||"").replace("wpcode-notice-","")})}};return n}(document,window,jQuery)).init()}();
ihaf.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: WPCode Lite
4
  * Plugin URI: https://www.wpcode.com/
5
- * Version: 2.0.4.2
6
  * Requires at least: 4.6
7
  * Requires PHP: 5.5
8
  * Tested up to: 6.1
@@ -367,6 +367,8 @@ class WPCode {
367
  require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-metabox-snippets.php';
368
  // Metabox class.
369
  require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-admin-notice.php';
 
 
370
  }
371
 
372
  // Load lite-specific files.
2
  /**
3
  * Plugin Name: WPCode Lite
4
  * Plugin URI: https://www.wpcode.com/
5
+ * Version: 2.0.4.3
6
  * Requires at least: 4.6
7
  * Requires PHP: 5.5
8
  * Tested up to: 6.1
367
  require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-metabox-snippets.php';
368
  // Metabox class.
369
  require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-admin-notice.php';
370
+ // Ask for some love.
371
+ require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-review.php';
372
  }
373
 
374
  // Load lite-specific files.
includes/admin/class-wpcode-metabox-snippets.php CHANGED
@@ -68,6 +68,34 @@ abstract class WPCode_Metabox_Snippets {
68
  */
69
  public function hooks() {
70
  add_action( 'add_meta_boxes', array( $this, 'register_metabox' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  }
72
 
73
  /**
@@ -83,7 +111,7 @@ abstract class WPCode_Metabox_Snippets {
83
  return;
84
  }
85
 
86
- if ( wpcode()->settings->get_option('headers_footers_mode') ) {
87
  // Don't load the metabox when headers & footers mode is enabled.
88
  return;
89
  }
@@ -104,7 +132,7 @@ abstract class WPCode_Metabox_Snippets {
104
  ),
105
  $post_type,
106
  'normal',
107
- apply_filters( 'wpcode_post_metabox_priority', 'high' )
108
  );
109
  }
110
 
68
  */
69
  public function hooks() {
70
  add_action( 'add_meta_boxes', array( $this, 'register_metabox' ) );
71
+ add_action( 'admin_head', array( $this, 'close_metabox_for_current_screen' ) );
72
+ }
73
+
74
+ /**
75
+ * Make sure the metabox is closed by default.
76
+ *
77
+ * @return void
78
+ */
79
+ public function close_metabox_for_current_screen() {
80
+ // Close the metabox by default.
81
+ $screen = get_current_screen();
82
+ if ( ! isset( $screen->id ) ) {
83
+ return;
84
+ }
85
+ add_filter( 'get_user_option_closedpostboxes_' . $screen->id, array( $this, 'add_metabox_to_user_closed' ) );
86
+ }
87
+
88
+ /**
89
+ * Add our metabox id to the array of closed metaboxes when the page loads.
90
+ *
91
+ * @param array $closed
92
+ *
93
+ * @return array
94
+ */
95
+ public function add_metabox_to_user_closed( $closed ) {
96
+ $closed[] = $this->id;
97
+
98
+ return $closed;
99
  }
100
 
101
  /**
111
  return;
112
  }
113
 
114
+ if ( wpcode()->settings->get_option( 'headers_footers_mode' ) ) {
115
  // Don't load the metabox when headers & footers mode is enabled.
116
  return;
117
  }
132
  ),
133
  $post_type,
134
  'normal',
135
+ apply_filters( 'wpcode_post_metabox_priority', 'default' )
136
  );
137
  }
138
 
includes/admin/class-wpcode-review.php ADDED
@@ -0,0 +1,212 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Ask for some love.
5
+ *
6
+ *
7
+ */
8
+ class WPCode_Review {
9
+
10
+ /**
11
+ * Primary class constructor.
12
+ *
13
+ *
14
+ */
15
+ public function __construct() {
16
+
17
+ // Admin notice requesting review.
18
+ add_action( 'admin_init', array( $this, 'review_request' ) );
19
+
20
+ // Admin footer text.
21
+ add_filter( 'admin_footer_text', array( $this, 'admin_footer' ), 1, 2 );
22
+ }
23
+
24
+ /**
25
+ * Add admin notices as needed for reviews.
26
+ *
27
+ *
28
+ */
29
+ public function review_request() {
30
+
31
+ // Only consider showing the review request to admin users.
32
+ if ( ! is_super_admin() ) {
33
+ return;
34
+ }
35
+
36
+ // Don't show notice to headers & footers mode users.
37
+ if ( wpcode()->settings->get_option( 'headers_footers_mode' ) ) {
38
+ return;
39
+ }
40
+
41
+ // Verify that we can do a check for reviews.
42
+ $notices = get_option( 'wpcode_admin_notices', array() );
43
+ $time = time();
44
+ $load = false;
45
+
46
+ if ( empty( $notices['review_request'] ) ) {
47
+ $notices['review_request'] = array(
48
+ 'time' => $time,
49
+ 'dismissed' => false,
50
+ );
51
+
52
+ update_option( 'wpcode_admin_notices', $notices );
53
+
54
+ return;
55
+ }
56
+
57
+ // Check if it has been dismissed or not.
58
+ if (
59
+ ( isset( $notices['review_request']['dismissed'] ) &&
60
+ ! $notices['review_request']['dismissed'] ) &&
61
+ (
62
+ isset( $notices['review_request']['time'] ) &&
63
+ ( ( $notices['review_request']['time'] + DAY_IN_SECONDS ) <= $time )
64
+ )
65
+ ) {
66
+ $load = true;
67
+ }
68
+
69
+ // If we cannot load, return early.
70
+ if ( ! $load ) {
71
+ return;
72
+ }
73
+
74
+ $this->review();
75
+ }
76
+
77
+ /**
78
+ * Maybe show Lite review request.
79
+ */
80
+ public function review() {
81
+
82
+ // Fetch when plugin was initially installed.
83
+ $activated = get_option( 'ihaf_activated', array() );
84
+
85
+ if ( ! empty( $activated['wpcode'] ) ) {
86
+ // Only continue if plugin has been installed for at least 14 days.
87
+ if ( ( $activated['wpcode'] + ( DAY_IN_SECONDS * 14 ) ) > time() ) {
88
+ return;
89
+ }
90
+ } else {
91
+ $activated['wpcode'] = time();
92
+
93
+ update_option( 'ihaf_activated', $activated );
94
+
95
+ return;
96
+ }
97
+
98
+ // Only proceed with displaying if the user is using an active snippet.
99
+ $snippet_count = wp_count_posts( 'wpcode' );
100
+
101
+ if ( empty( $snippet_count->publish ) ) {
102
+ return;
103
+ }
104
+
105
+ $feedback_url = add_query_arg( array(
106
+ 'siteurl' => untrailingslashit( home_url() ),
107
+ 'plugin' => class_exists( 'WPCode_Premium') ? 'pro' : 'lite',
108
+ 'version' => WPCODE_VERSION,
109
+ ), 'https://www.wpcode.com/plugin-feedback/' );
110
+ $feedback_url = wpcode_utm_url( $feedback_url, 'review-notice', 'feedback' );
111
+
112
+ ob_start();
113
+
114
+ // We have a candidate! Output a review message.
115
+ ?>
116
+ <div class="wpcode-review-step wpcode-review-step-1">
117
+ <p><?php esc_html_e( 'Are you enjoying WPCode?', 'insert-headers-and-footers' ); ?></p>
118
+ <p>
119
+ <a href="#" class="wpcode-review-switch-step"
120
+ data-step="3"><?php esc_html_e( 'Yes', 'insert-headers-and-footers' ); ?></a><br/>
121
+ <a href="#" class="wpcode-review-switch-step"
122
+ data-step="2"><?php esc_html_e( 'Not Really', 'insert-headers-and-footers' ); ?></a>
123
+ </p>
124
+ </div>
125
+ <div class="wpcode-review-step wpcode-review-step-2" style="display: none">
126
+ <p><?php esc_html_e( 'We\'re sorry to hear you aren\'t enjoying WPCode. We would love a chance to improve. Could you take a minute and let us know what we can do better?', 'insert-headers-and-footers' ); ?></p>
127
+ <p>
128
+ <a href="<?php echo esc_url( $feedback_url ); ?>"
129
+ class="wpcode-notice-dismiss" target="_blank"><?php esc_html_e( 'Give Feedback', 'insert-headers-and-footers' ); ?></a><br>
130
+ <a href="#" class="wpcode-notice-dismiss"
131
+ rel="noopener noreferrer"><?php esc_html_e( 'No thanks', 'insert-headers-and-footers' ); ?></a>
132
+ </p>
133
+ </div>
134
+ <div class="wpcode-review-step wpcode-review-step-3" style="display: none">
135
+ <p><?php esc_html_e( 'That\'s awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?', 'insert-headers-and-footers' ); ?></p>
136
+ <p>
137
+ <strong><?php echo wp_kses( __( '~ Syed Balkhi<br>Co-Founder of WPCode', 'insert-headers-and-footers' ), array( 'br' => array() ) ); ?></strong>
138
+ </p>
139
+ <p>
140
+ <a href="https://wordpress.org/support/plugin/insert-headers-and-footers/reviews/?filter=5#new-post" class="wpcode-notice-dismiss wpcode-review-out" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Give Feedback', 'insert-headers-and-footers' ); ?></a><br>
141
+ <a href="#" class="wpcode-notice-dismiss" rel="noopener noreferrer"><?php esc_html_e( 'No thanks', 'insert-headers-and-footers' ); ?></a><br>
142
+ </p>
143
+ </div>
144
+ <script type="text/javascript">
145
+ jQuery(document).ready(function ($) {
146
+ $(document).on('click', '.wpcode-review-switch-step', function (e) {
147
+ e.preventDefault();
148
+ var target = $(this).attr('data-step');
149
+ if (target) {
150
+ var notice = $(this).closest('.wpcode-review-notice');
151
+ var review_step = notice.find('.wpcode-review-step-' + target);
152
+ if (review_step.length > 0) {
153
+ notice.find('.wpcode-review-step:visible').fadeOut(function () {
154
+ review_step.fadeIn();
155
+ });
156
+ }
157
+ }
158
+ })
159
+ });
160
+ </script>
161
+ <?php
162
+
163
+ WPCode_Notice::info(
164
+ ob_get_clean(),
165
+ array(
166
+ 'dismiss' => WPCode_Notice::DISMISS_GLOBAL,
167
+ 'slug' => 'review_request',
168
+ 'autop' => false,
169
+ 'class' => 'wpcode-review-notice',
170
+ )
171
+ );
172
+ }
173
+
174
+ /**
175
+ * When user is on a WPCode related admin page, display footer text
176
+ * that graciously asks them to rate us.
177
+ *
178
+ * @param string $text Footer text.
179
+ *
180
+ * @return string
181
+ *
182
+ *
183
+ */
184
+ public function admin_footer( $text ) {
185
+
186
+ global $current_screen;
187
+
188
+ if ( ! empty( $current_screen->id ) && strpos( $current_screen->id, 'wpcode' ) !== false ) {
189
+ $url = 'https://wordpress.org/support/plugin/insert-headers-and-footers/reviews/?filter=5#new-post';
190
+ $text = sprintf(
191
+ wp_kses( /* translators: $1$s - WPCode plugin name; $2$s - WP.org review link; $3$s - WP.org review link. */
192
+ __( 'Please rate %1$s <a href="%2$s" target="_blank" rel="noopener noreferrer">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href="%3$s" target="_blank" rel="noopener">WordPress.org</a> to help us spread the word. Thank you from the WPCode team!', 'insert-headers-and-footers' ),
193
+ array(
194
+ 'a' => array(
195
+ 'href' => array(),
196
+ 'target' => array(),
197
+ 'rel' => array(),
198
+ ),
199
+ )
200
+ ),
201
+ '<strong>WPCode</strong>',
202
+ $url,
203
+ $url
204
+ );
205
+ }
206
+
207
+ return $text;
208
+ }
209
+
210
+ }
211
+
212
+ new WPCode_Review();
includes/admin/pages/class-wpcode-admin-page-library.php CHANGED
@@ -199,7 +199,7 @@ class WPCode_Admin_Page_Library extends WPCode_Admin_Page {
199
  ),
200
  array(
201
  'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ),
202
- 'url' => wpcode_utm_url( 'https://wpcode.com/lite', 'library-page', 'my-library', 'features' ),
203
  ),
204
  array(
205
  __( 'Save your snippets to the WPCode Library', 'insert-headers-and-footers' ),
@@ -225,11 +225,11 @@ class WPCode_Admin_Page_Library extends WPCode_Admin_Page {
225
  '<p>' . __( 'Upgrade to WPCode PRO today and see the snippets you starred in the WPCode Library directly in the plugin.', 'insert-headers-and-footers' ) . '</p>',
226
  array(
227
  'text' => __( 'Upgrade to PRO and Unlock "My Favorites"', 'insert-headers-and-footers' ),
228
- 'url' => wpcode_utm_url( 'https://wpcode.com/lite', 'library-page', 'my-favorites', 'upgrade-and-unlock' ),
229
  ),
230
  array(
231
  'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ),
232
- 'url' => wpcode_utm_url( 'https://wpcode.com/lite', 'library-page', 'my-favorites', 'features' ),
233
  ),
234
  array(
235
  __( 'Load favorite snippets in the plugin', 'insert-headers-and-footers' ),
199
  ),
200
  array(
201
  'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ),
202
+ 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'library-page', 'my-library', 'features' ),
203
  ),
204
  array(
205
  __( 'Save your snippets to the WPCode Library', 'insert-headers-and-footers' ),
225
  '<p>' . __( 'Upgrade to WPCode PRO today and see the snippets you starred in the WPCode Library directly in the plugin.', 'insert-headers-and-footers' ) . '</p>',
226
  array(
227
  'text' => __( 'Upgrade to PRO and Unlock "My Favorites"', 'insert-headers-and-footers' ),
228
+ 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'library-page', 'my-favorites', 'upgrade-and-unlock' ),
229
  ),
230
  array(
231
  'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ),
232
+ 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'library-page', 'my-favorites', 'features' ),
233
  ),
234
  array(
235
  __( 'Load favorite snippets in the plugin', 'insert-headers-and-footers' ),
includes/admin/pages/class-wpcode-admin-page-snippet-manager.php CHANGED
@@ -1068,7 +1068,7 @@ class WPCode_Admin_Page_Snippet_Manager extends WPCode_Admin_Page {
1068
  $data['save_to_library_button'] = __( 'Upgrade to PRO', 'insert-headers-and-footers' );
1069
  $data['shortcode_title'] = __( 'Custom Shortcode is a Pro Feature', 'insert-headers-and-footers' );
1070
  $data['shortcode_text'] = __( 'Upgrade today to use a custom shortcode and nerver worry about changing snippet ids again, even when importing your snippets to another site. You\'ll also get access to a private library that makes setting up new sites a lot easier.', 'insert-headers-and-footers' );
1071
- $data['shortcode_url'] = wpcode_utm_url( 'https://wpcode.com/lite', 'snippet-editor', 'custom-shortcode', 'modal' );
1072
 
1073
  return $data;
1074
  }
@@ -1221,11 +1221,11 @@ class WPCode_Admin_Page_Snippet_Manager extends WPCode_Admin_Page {
1221
  ),
1222
  array(
1223
  'text' => esc_html__( 'Upgrade to Pro and Unlock Revisions', 'insert-headers-and-footers' ),
1224
- 'url' => wpcode_utm_url( 'https://wpcode.com/lite', 'snippet-editor', 'revisions', 'upgrade-to-pro' ),
1225
  ),
1226
  array(
1227
  'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ),
1228
- 'url' => wpcode_utm_url( 'https://wpcode.com/lite', 'snippet-editor', 'revisions', 'features' ),
1229
  )
1230
  );
1231
  }
1068
  $data['save_to_library_button'] = __( 'Upgrade to PRO', 'insert-headers-and-footers' );
1069
  $data['shortcode_title'] = __( 'Custom Shortcode is a Pro Feature', 'insert-headers-and-footers' );
1070
  $data['shortcode_text'] = __( 'Upgrade today to use a custom shortcode and nerver worry about changing snippet ids again, even when importing your snippets to another site. You\'ll also get access to a private library that makes setting up new sites a lot easier.', 'insert-headers-and-footers' );
1071
+ $data['shortcode_url'] = wpcode_utm_url( 'https://wpcode.com/lite/', 'snippet-editor', 'custom-shortcode', 'modal' );
1072
 
1073
  return $data;
1074
  }
1221
  ),
1222
  array(
1223
  'text' => esc_html__( 'Upgrade to Pro and Unlock Revisions', 'insert-headers-and-footers' ),
1224
+ 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'snippet-editor', 'revisions', 'upgrade-to-pro' ),
1225
  ),
1226
  array(
1227
  'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ),
1228
+ 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'snippet-editor', 'revisions', 'features' ),
1229
  )
1230
  );
1231
  }
includes/admin/pages/class-wpcode-admin-page.php CHANGED
@@ -254,7 +254,7 @@ abstract class WPCode_Admin_Page {
254
  <?php wpcode_icon( 'file', 48, 48 ); ?>
255
  <h3><?php esc_html_e( 'View Documentation', 'insert-headers-and-footers' ); ?></h3>
256
  <p><?php esc_html_e( 'Browse documentation, reference material, and tutorials for WPCode.', 'insert-headers-and-footers' ); ?></p>
257
- <a class="wpcode-button wpcode-button-secondary" href="<?php echo esc_url( wpcode_utm_url( 'https://wpcode.com/docs', 'help-overlay', 'docs', 'footer' ) ); ?>" target="_blank"><?php esc_html_e( 'View All Documentation', 'insert-headers-and-footers' ); ?></a>
258
  </div>
259
  <div class="wpcode-help-footer-box">
260
  <?php wpcode_icon( 'support', 48, 48 ); ?>
@@ -1049,7 +1049,7 @@ abstract class WPCode_Admin_Page {
1049
  array(
1050
  'tag' => 'a',
1051
  'text' => '',
1052
- 'url' => wpcode_utm_url( 'https://wpcode.com/lite' ),
1053
  'class' => 'wpcode-button wpcode-button-orange wpcode-button-large',
1054
  'attributes' => array(
1055
  'target' => '_blank',
@@ -1061,7 +1061,7 @@ abstract class WPCode_Admin_Page {
1061
  array(
1062
  'tag' => 'a',
1063
  'text' => '',
1064
- 'url' => wpcode_utm_url( 'https://wpcode.com/lite' ),
1065
  'class' => 'wpcode-upsell-button-text',
1066
  'attributes' => array(
1067
  'target' => '_blank',
254
  <?php wpcode_icon( 'file', 48, 48 ); ?>
255
  <h3><?php esc_html_e( 'View Documentation', 'insert-headers-and-footers' ); ?></h3>
256
  <p><?php esc_html_e( 'Browse documentation, reference material, and tutorials for WPCode.', 'insert-headers-and-footers' ); ?></p>
257
+ <a class="wpcode-button wpcode-button-secondary" href="<?php echo esc_url( wpcode_utm_url( 'https://wpcode.com/docs/', 'help-overlay', 'docs', 'footer' ) ); ?>" target="_blank"><?php esc_html_e( 'View All Documentation', 'insert-headers-and-footers' ); ?></a>
258
  </div>
259
  <div class="wpcode-help-footer-box">
260
  <?php wpcode_icon( 'support', 48, 48 ); ?>
1049
  array(
1050
  'tag' => 'a',
1051
  'text' => '',
1052
+ 'url' => wpcode_utm_url( 'https://wpcode.com/lite/' ),
1053
  'class' => 'wpcode-button wpcode-button-orange wpcode-button-large',
1054
  'attributes' => array(
1055
  'target' => '_blank',
1061
  array(
1062
  'tag' => 'a',
1063
  'text' => '',
1064
+ 'url' => wpcode_utm_url( 'https://wpcode.com/lite/' ),
1065
  'class' => 'wpcode-upsell-button-text',
1066
  'attributes' => array(
1067
  'target' => '_blank',
includes/helpers.php CHANGED
@@ -23,7 +23,7 @@ function wpcode_utm_url( $url, $medium = '', $campaign = '', $ad_content = '' )
23
  'utm_campaign' => sanitize_key( $campaign ),
24
  'utm_content' => sanitize_key( $ad_content ),
25
  ),
26
- trailingslashit( $url )
27
  );
28
  }
29
 
23
  'utm_campaign' => sanitize_key( $campaign ),
24
  'utm_content' => sanitize_key( $ad_content ),
25
  ),
26
+ $url
27
  );
28
  }
29
 
includes/lite/admin/class-wpcode-metabox-snippets-lite.php CHANGED
@@ -143,11 +143,11 @@ class WPCode_Metabox_Snippets_Lite extends WPCode_Metabox_Snippets {
143
  ),
144
  array(
145
  'text' => esc_html__( 'Upgrade to Pro and Unlock Page Scripts', 'insert-headers-and-footers' ),
146
- 'url' => wpcode_utm_url( 'https://wpcode.com/lite', 'post-editor-metabox', 'custom-snippets', 'upgrade-to-pro' ),
147
  ),
148
  array(
149
  'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ),
150
- 'url' => wpcode_utm_url( 'https://wpcode.com/lite', 'post-editor-metabox', 'custom-snippets', 'features' ),
151
  )
152
  );
153
  }
@@ -286,11 +286,11 @@ class WPCode_Metabox_Snippets_Lite extends WPCode_Metabox_Snippets {
286
  ),
287
  array(
288
  'text' => esc_html__( 'Upgrade to Pro and Unlock Page Scripts', 'insert-headers-and-footers' ),
289
- 'url' => wpcode_utm_url( 'https://wpcode.com/lite', 'post-editor-metabox', 'main-' . sanitize_title( $label ), 'upgrade-to-pro' ),
290
  ),
291
  array(
292
  'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ),
293
- 'url' => wpcode_utm_url( 'https://wpcode.com/lite', 'post-editor-metabox', 'main-' . sanitize_title( $label ), 'features' ),
294
  )
295
  );
296
  }
143
  ),
144
  array(
145
  'text' => esc_html__( 'Upgrade to Pro and Unlock Page Scripts', 'insert-headers-and-footers' ),
146
+ 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'post-editor-metabox', 'custom-snippets', 'upgrade-to-pro' ),
147
  ),
148
  array(
149
  'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ),
150
+ 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'post-editor-metabox', 'custom-snippets', 'features' ),
151
  )
152
  );
153
  }
286
  ),
287
  array(
288
  'text' => esc_html__( 'Upgrade to Pro and Unlock Page Scripts', 'insert-headers-and-footers' ),
289
+ 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'post-editor-metabox', 'main-' . sanitize_title( $label ), 'upgrade-to-pro' ),
290
  ),
291
  array(
292
  'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ),
293
+ 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'post-editor-metabox', 'main-' . sanitize_title( $label ), 'features' ),
294
  )
295
  );
296
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: code, css, php, footer, functions, content, facebook pixel, footer code, f
4
  Requires at least: 4.6
5
  Tested up to: 6.1
6
  Requires PHP: 5.5
7
- Stable tag: 2.0.4.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -308,6 +308,9 @@ Syed Balkhi
308
 
309
  == Changelog ==
310
 
 
 
 
311
  = 2.0.4.2 =
312
  * Tweak: Changing SweetAlert library version to prevent the interference on .ru sites.
313
 
4
  Requires at least: 4.6
5
  Tested up to: 6.1
6
  Requires PHP: 5.5
7
+ Stable tag: 2.0.4.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
308
 
309
  == Changelog ==
310
 
311
+ = 2.0.4.3 =
312
+ * Tweak: We updated the default behaviour of our page scripts metabox so that it is collapsed by default.
313
+
314
  = 2.0.4.2 =
315
  * Tweak: Changing SweetAlert library version to prevent the interference on .ru sites.
316