PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 2.0.0
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v2.0.0
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-resource-forms.php +2 -26 2.2.12.0.0 View file →
@@ -106,34 +106,10 @@
106 106 // Return Legacy Form HTML.
107 107 return $api->get_form_html( $id );
108 108 }
109 109
110 - // If the form's format is not an inline form, add the inline script before the closing </body> tag.
111 - // This prevents a modal form's overlay being constrained by the WordPress Theme's styles,
112 - // and accidentally embedding the same non-inline form twice, which would result in e.g. the same modal form
113 - // displaying twice.
114 - if ( $this->resources[ $id ]['format'] !== 'inline' ) {
115 - add_filter(
116 - 'convertkit_output_scripts_footer',
117 - function( $scripts ) use ( $id ) {
118 -
119 - $scripts[] = array(
120 - 'async' => true,
121 - 'data-uid' => $this->resources[ $id ]['uid'],
122 - 'src' => $this->resources[ $id ]['embed_js'],
123 - );
124 -
125 - return $scripts;
126 -
127 - }
128 - );
129 -
130 - // Don't return a script for output, as it'll be output in the site's footer.
131 - return '';
132 - }
133 -
134 - // If here, return Form <script> embed now, as we want the inline form to display at this specific point of the content.
135 - return '<script async data-uid="' . esc_attr( $this->resources[ $id ]['uid'] ) . '" src="' . esc_url( $this->resources[ $id ]['embed_js'] ) . '"></script>';
110 + // If here, return Form <script> embed.
111 + return '<script async data-uid="' . $this->resources[ $id ]['uid'] . '" src="' . $this->resources[ $id ]['embed_js'] . '"></script>';
136 112
137 113 }
138 114
139 115 }