PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 2.0.2
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v2.0.2
3.4.2 3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 2.3.2 All 195 releases
← All changes | includes/functions.php +4 -205 2.2.62.0.2 View file →
@@ -46,9 +46,9 @@
46 46 * on a WordPress multisite setup.
47 47 *
48 48 * @since 1.9.7.4
49 49 *
50 - * @param WP_Site|int $site_or_blog_id WP_Site or Blog ID.
50 + * @param mixed $site_or_blog_id WP_Site or Blog ID.
51 51 */
52 52 function convertkit_plugin_activate_new_site( $site_or_blog_id ) {
53 53
54 54 // Check if $site_or_blog_id is a WP_Site or a blog ID.
@@ -125,34 +125,8 @@
125 125
126 126 }
127 127
128 128 /**
129 - * Helper method to get supported Post Types for Restricted Content (Member's Content)
130 - *
131 - * @since 2.1.0
132 - *
133 - * @return array Post Types
134 - */
135 -function convertkit_get_supported_restrict_content_post_types() {
136 -
137 - $post_types = array(
138 - 'page',
139 - );
140 -
141 - /**
142 - * Defines the Post Types that support Restricted Content / Members Content functionality.
143 - *
144 - * @since 2.0.0
145 - *
146 - * @param array $post_types Post Types
147 - */
148 - $post_types = apply_filters( 'convertkit_get_supported_restrict_content_post_types', $post_types );
149 -
150 - return $post_types;
151 -
152 -}
153 -
154 -/**
155 129 * Helper method to get registered Shortcodes.
156 130 *
157 131 * @since 1.9.6.5
158 132 *
@@ -199,32 +173,8 @@
199 173
200 174 }
201 175
202 176 /**
203 - * Helper method to get registered Block formatters for Gutenberg.
204 - *
205 - * @since 2.2.0
206 - *
207 - * @return array Block formatters
208 - */
209 -function convertkit_get_block_formatters() {
210 -
211 - $block_formatters = array();
212 -
213 - /**
214 - * Registers block formatters in Gutenberg for the ConvertKit Plugin.
215 - *
216 - * @since 2.2.0
217 - *
218 - * @param array $block_formatters Block formatters.
219 - */
220 - $block_formatters = apply_filters( 'convertkit_get_block_formatters', $block_formatters );
221 -
222 - return $block_formatters;
223 -
224 -}
225 -
226 -/**
227 177 * Helper method to return the Plugin Settings Link
228 178 *
229 179 * @since 1.9.6
230 180 *
@@ -244,29 +194,8 @@
244 194
245 195 }
246 196
247 197 /**
248 - * Helper method to return the Plugin Settings Link
249 - *
250 - * @since 2.2.4
251 - *
252 - * @param array $query_args Optional Query Args.
253 - * @return string Settings Link
254 - */
255 -function convertkit_get_setup_wizard_plugin_link( $query_args = array() ) {
256 -
257 - $query_args = array_merge(
258 - $query_args,
259 - array(
260 - 'page' => 'convertkit-setup',
261 - )
262 - );
263 -
264 - return add_query_arg( $query_args, admin_url( 'index.php' ) );
265 -
266 -}
267 -
268 -/**
269 198 * Helper method to return the URL the user needs to visit to register a ConvertKit account.
270 199 *
271 200 * @since 1.9.8.4
272 201 *
@@ -273,16 +202,9 @@
273 202 * @return string ConvertKit Registration URL.
274 203 */
275 204 function convertkit_get_registration_url() {
276 205
277 - return add_query_arg(
278 - array(
279 - 'utm_source' => 'wordpress',
280 - 'utm_term' => get_locale(),
281 - 'utm_content' => 'convertkit',
282 - ),
283 - 'https://app.convertkit.com/users/signup'
284 - );
206 + return 'https://app.convertkit.com/users/signup?utm_source=wordpress&utm_content=convertkit';
285 207
286 208 }
287 209
288 210 /**
@@ -293,16 +215,9 @@
293 215 * @return string ConvertKit Login URL.
294 216 */
295 217 function convertkit_get_sign_in_url() {
296 218
297 - return add_query_arg(
298 - array(
299 - 'utm_source' => 'wordpress',
300 - 'utm_term' => get_locale(),
301 - 'utm_content' => 'convertkit',
302 - ),
303 - 'https://app.convertkit.com/'
304 - );
219 + return 'https://app.convertkit.com/?utm_source=wordpress&utm_content=convertkit';
305 220
306 221 }
307 222
308 223 /**
@@ -313,100 +228,13 @@
313 228 * @return string ConvertKit App URL.
314 229 */
315 230 function convertkit_get_api_key_url() {
316 231
317 - return add_query_arg(
318 - array(
319 - 'utm_source' => 'wordpress',
320 - 'utm_term' => get_locale(),
321 - 'utm_content' => 'convertkit',
322 - ),
323 - 'https://app.convertkit.com/account_settings/advanced_settings/'
324 - );
232 + return 'https://app.convertkit.com/account_settings/advanced_settings/?utm_source=wordpress&utm_content=convertkit';
325 233
326 234 }
327 235
328 236 /**
329 - * Helper method to return the URL the user needs to visit on the ConvertKit app to create a new Form or Landing Page.
330 - *
331 - * @since 2.2.3
332 - *
333 - * @return string ConvertKit App URL
334 - */
335 -function convertkit_get_new_form_url() {
336 -
337 - return add_query_arg(
338 - array(
339 - 'utm_source' => 'wordpress',
340 - 'utm_term' => get_locale(),
341 - 'utm_content' => 'convertkit',
342 - ),
343 - 'https://app.convertkit.com/forms/new/'
344 - );
345 -
346 -}
347 -
348 -/**
349 - * Helper method to return the URL the user needs to visit to edit ConvertKit forms.
350 - *
351 - * @since 2.2.3
352 - *
353 - * @return string ConvertKit Form Editor URL.
354 - */
355 -function convertkit_get_form_editor_url() {
356 -
357 - return add_query_arg(
358 - array(
359 - 'utm_source' => 'wordpress',
360 - 'utm_term' => get_locale(),
361 - 'utm_content' => 'convertkit',
362 - ),
363 - 'https://app.convertkit.com/forms'
364 - );
365 -
366 -}
367 -
368 -/**
369 - * Helper method to return the URL the user needs to visit on the ConvertKit app to create a new Broadcast.
370 - *
371 - * @since 2.2.6
372 - *
373 - * @return string ConvertKit App URL.
374 - */
375 -function convertkit_get_new_broadcast_url() {
376 -
377 - return add_query_arg(
378 - array(
379 - 'utm_source' => 'wordpress',
380 - 'utm_term' => get_locale(),
381 - 'utm_content' => 'convertkit',
382 - ),
383 - 'https://app.convertkit.com/campaigns/'
384 - );
385 -
386 -}
387 -
388 -/**
389 - * Helper method to return the URL the user needs to visit on the ConvertKit app to create a new Product.
390 - *
391 - * @since 2.2.3
392 - *
393 - * @return string ConvertKit App URL.
394 - */
395 -function convertkit_get_new_product_url() {
396 -
397 - return add_query_arg(
398 - array(
399 - 'utm_source' => 'wordpress',
400 - 'utm_term' => get_locale(),
401 - 'utm_content' => 'convertkit',
402 - ),
403 - 'https://app.convertkit.com/products/new/'
404 - );
405 -
406 -}
407 -
408 -/**
409 237 * Helper method to enqueue Select2 scripts for use within the ConvertKit Plugin.
410 238 *
411 239 * @since 1.9.6.4
412 240 */
@@ -425,35 +253,6 @@
425 253 function convertkit_select2_enqueue_styles() {
426 254
427 255 wp_enqueue_style( 'convertkit-select2', 'https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css', array(), CONVERTKIT_PLUGIN_VERSION );
428 256 wp_enqueue_style( 'convertkit-admin-select2', CONVERTKIT_PLUGIN_URL . 'resources/backend/css/select2.css', array(), CONVERTKIT_PLUGIN_VERSION );
429 -
430 -}
431 -
432 -/**
433 - * Return the contents of the given local file.
434 - *
435 - * @since 2.2.2
436 - *
437 - * @param string $local_file Local file, including path.
438 - * @return string File contents.
439 - */
440 -function convertkit_get_file_contents( $local_file ) {
441 -
442 - // Call globals.
443 - global $wp_filesystem;
444 -
445 - // Load filesystem class.
446 - require_once ABSPATH . 'wp-admin/includes/file.php';
447 -
448 - // Initiate.
449 - WP_Filesystem();
450 -
451 - // Bail if the file doesn't exist.
452 - if ( ! $wp_filesystem->exists( $local_file ) ) {
453 - return '';
454 - }
455 -
456 - // Return file's contents.
457 - return $wp_filesystem->get_contents( $local_file );
458 257
459 258 }