PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 2.0.1
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v2.0.1
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 -225 2.3.22.0.1 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,35 +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 - 'post',
140 - );
141 -
142 - /**
143 - * Defines the Post Types that support Restricted Content / Members Content functionality.
144 - *
145 - * @since 2.0.0
146 - *
147 - * @param array $post_types Post Types
148 - */
149 - $post_types = apply_filters( 'convertkit_get_supported_restrict_content_post_types', $post_types );
150 -
151 - return $post_types;
152 -
153 -}
154 -
155 -/**
156 129 * Helper method to get registered Shortcodes.
157 130 *
158 131 * @since 1.9.6.5
159 132 *
@@ -200,32 +173,8 @@
200 173
201 174 }
202 175
203 176 /**
204 - * Helper method to get registered Block formatters for Gutenberg.
205 - *
206 - * @since 2.2.0
207 - *
208 - * @return array Block formatters
209 - */
210 -function convertkit_get_block_formatters() {
211 -
212 - $block_formatters = array();
213 -
214 - /**
215 - * Registers block formatters in Gutenberg for the ConvertKit Plugin.
216 - *
217 - * @since 2.2.0
218 - *
219 - * @param array $block_formatters Block formatters.
220 - */
221 - $block_formatters = apply_filters( 'convertkit_get_block_formatters', $block_formatters );
222 -
223 - return $block_formatters;
224 -
225 -}
226 -
227 -/**
228 177 * Helper method to return the Plugin Settings Link
229 178 *
230 179 * @since 1.9.6
231 180 *
@@ -245,29 +194,8 @@
245 194
246 195 }
247 196
248 197 /**
249 - * Helper method to return the Plugin Settings Link
250 - *
251 - * @since 2.2.4
252 - *
253 - * @param array $query_args Optional Query Args.
254 - * @return string Settings Link
255 - */
256 -function convertkit_get_setup_wizard_plugin_link( $query_args = array() ) {
257 -
258 - $query_args = array_merge(
259 - $query_args,
260 - array(
261 - 'page' => 'convertkit-setup',
262 - )
263 - );
264 -
265 - return add_query_arg( $query_args, admin_url( 'options.php' ) );
266 -
267 -}
268 -
269 -/**
270 198 * Helper method to return the URL the user needs to visit to register a ConvertKit account.
271 199 *
272 200 * @since 1.9.8.4
273 201 *
@@ -274,16 +202,9 @@
274 202 * @return string ConvertKit Registration URL.
275 203 */
276 204 function convertkit_get_registration_url() {
277 205
278 - return add_query_arg(
279 - array(
280 - 'utm_source' => 'wordpress',
281 - 'utm_term' => get_locale(),
282 - 'utm_content' => 'convertkit',
283 - ),
284 - 'https://app.convertkit.com/users/signup'
285 - );
206 + return 'https://app.convertkit.com/users/signup?utm_source=wordpress&utm_content=convertkit';
286 207
287 208 }
288 209
289 210 /**
@@ -294,40 +215,13 @@
294 215 * @return string ConvertKit Login URL.
295 216 */
296 217 function convertkit_get_sign_in_url() {
297 218
298 - return add_query_arg(
299 - array(
300 - 'utm_source' => 'wordpress',
301 - 'utm_term' => get_locale(),
302 - 'utm_content' => 'convertkit',
303 - ),
304 - 'https://app.convertkit.com/'
305 - );
219 + return 'https://app.convertkit.com/?utm_source=wordpress&utm_content=convertkit';
306 220
307 221 }
308 222
309 223 /**
310 - * Helper method to return the URL the user needs to visit to manage thier billing.
311 - *
312 - * @since 2.2.7
313 - *
314 - * @return string ConvertKit Billing URL.
315 - */
316 -function convertkit_get_billing_url() {
317 -
318 - return add_query_arg(
319 - array(
320 - 'utm_source' => 'wordpress',
321 - 'utm_term' => get_locale(),
322 - 'utm_content' => 'convertkit',
323 - ),
324 - 'https://app.convertkit.com/account_settings/billing/'
325 - );
326 -
327 -}
328 -
329 -/**
330 224 * Helper method to return the URL the user needs to visit on the ConvertKit app to obtain their API Key and Secret.
331 225 *
332 226 * @since 1.9.6.1
333 227 *
@@ -334,100 +228,13 @@
334 228 * @return string ConvertKit App URL.
335 229 */
336 230 function convertkit_get_api_key_url() {
337 231
338 - return add_query_arg(
339 - array(
340 - 'utm_source' => 'wordpress',
341 - 'utm_term' => get_locale(),
342 - 'utm_content' => 'convertkit',
343 - ),
344 - 'https://app.convertkit.com/account_settings/advanced_settings/'
345 - );
232 + return 'https://app.convertkit.com/account_settings/advanced_settings/?utm_source=wordpress&utm_content=convertkit';
346 233
347 234 }
348 235
349 236 /**
350 - * Helper method to return the URL the user needs to visit on the ConvertKit app to create a new Form or Landing Page.
351 - *
352 - * @since 2.2.3
353 - *
354 - * @return string ConvertKit App URL
355 - */
356 -function convertkit_get_new_form_url() {
357 -
358 - return add_query_arg(
359 - array(
360 - 'utm_source' => 'wordpress',
361 - 'utm_term' => get_locale(),
362 - 'utm_content' => 'convertkit',
363 - ),
364 - 'https://app.convertkit.com/forms/new/'
365 - );
366 -
367 -}
368 -
369 -/**
370 - * Helper method to return the URL the user needs to visit to edit ConvertKit forms.
371 - *
372 - * @since 2.2.3
373 - *
374 - * @return string ConvertKit Form Editor URL.
375 - */
376 -function convertkit_get_form_editor_url() {
377 -
378 - return add_query_arg(
379 - array(
380 - 'utm_source' => 'wordpress',
381 - 'utm_term' => get_locale(),
382 - 'utm_content' => 'convertkit',
383 - ),
384 - 'https://app.convertkit.com/forms'
385 - );
386 -
387 -}
388 -
389 -/**
390 - * Helper method to return the URL the user needs to visit on the ConvertKit app to create a new Broadcast.
391 - *
392 - * @since 2.2.6
393 - *
394 - * @return string ConvertKit App URL.
395 - */
396 -function convertkit_get_new_broadcast_url() {
397 -
398 - return add_query_arg(
399 - array(
400 - 'utm_source' => 'wordpress',
401 - 'utm_term' => get_locale(),
402 - 'utm_content' => 'convertkit',
403 - ),
404 - 'https://app.convertkit.com/campaigns/'
405 - );
406 -
407 -}
408 -
409 -/**
410 - * Helper method to return the URL the user needs to visit on the ConvertKit app to create a new Product.
411 - *
412 - * @since 2.2.3
413 - *
414 - * @return string ConvertKit App URL.
415 - */
416 -function convertkit_get_new_product_url() {
417 -
418 - return add_query_arg(
419 - array(
420 - 'utm_source' => 'wordpress',
421 - 'utm_term' => get_locale(),
422 - 'utm_content' => 'convertkit',
423 - ),
424 - 'https://app.convertkit.com/products/new/'
425 - );
426 -
427 -}
428 -
429 -/**
430 237 * Helper method to enqueue Select2 scripts for use within the ConvertKit Plugin.
431 238 *
432 239 * @since 1.9.6.4
433 240 */
@@ -446,34 +253,6 @@
446 253 function convertkit_select2_enqueue_styles() {
447 254
448 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 );
449 256 wp_enqueue_style( 'convertkit-admin-select2', CONVERTKIT_PLUGIN_URL . 'resources/backend/css/select2.css', array(), CONVERTKIT_PLUGIN_VERSION );
450 -
451 -}
452 -
453 -/**
454 - * Return the contents of the given local file.
455 - *
456 - * @since 2.2.2
457 - *
458 - * @param string $local_file Local file, including path.
459 - * @return string File contents.
460 - */
461 -function convertkit_get_file_contents( $local_file ) {
462 -
463 - // Bail if the file doesn't exist.
464 - if ( ! file_exists( $local_file ) ) {
465 - return '';
466 - }
467 -
468 - // Read file.
469 - $contents = file_get_contents( $local_file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
470 -
471 - // Return an empty string if the contents of the file could not be read.
472 - if ( ! $contents ) {
473 - return '';
474 - }
475 -
476 - // Return file's contents.
477 - return $contents;
478 257
479 258 }