PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 3.4.4
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v3.4.4
3.4.4 3.4.3 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 All 197 releases
← All changes | includes/class-convertkit-shortcodes.php +19 -2 2.2.43.4.4 View file →
@@ -35,15 +35,14 @@
35 35 // Get shortcodes.
36 36 $shortcodes = convertkit_get_shortcodes();
37 37
38 38 // Bail if no shortcodes are available.
39 - if ( ! is_array( $shortcodes ) || ! count( $shortcodes ) ) {
39 + if ( ! count( $shortcodes ) ) {
40 40 return;
41 41 }
42 42
43 43 // Iterate through shortcodes, registering them as shortcodes.
44 44 foreach ( $shortcodes as $shortcode => $properties ) {
45 -
46 45 // Register shortcode.
47 46 add_shortcode(
48 47 'convertkit_' . $shortcode,
49 48 array(
@@ -51,12 +50,30 @@
51 50 $properties['render_callback'][1],
52 51 )
53 52 );
54 53
54 + // Register the shortcode using the kit_ prefix.
55 + add_shortcode(
56 + 'kit_' . $shortcode,
57 + array(
58 + $properties['render_callback'][0],
59 + $properties['render_callback'][1],
60 + )
61 + );
62 +
55 63 // For the Form shortcode, register the [convertkit] shortcode for backward compatibility.
56 64 if ( $shortcode === 'form' ) {
57 65 add_shortcode(
58 66 'convertkit',
67 + array(
68 + $properties['render_callback'][0],
69 + $properties['render_callback'][1],
70 + )
71 + );
72 +
73 + // For the Form shortcode, register the [kit] shortcode.
74 + add_shortcode(
75 + 'kit',
59 76 array(
60 77 $properties['render_callback'][0],
61 78 $properties['render_callback'][1],
62 79 )