← All changes
|
includes/class-convertkit-output-restrict-content.php
+7
-7
3.4.5
→
3.4.6
View file →
| @@ -637,8 +637,15 @@ | ||
| 637 | 637 | 'debug' => $this->settings->debug_enabled(), |
| 638 | 638 | ) |
| 639 | 639 | ); |
| 640 | 640 | |
| 641 | + // Enqueue the active spam protection provider's client-side script, used by the login form. | |
| 642 | + $spam_protection = new ConvertKit_Spam_Protection(); | |
| 643 | + $spam_provider = $spam_protection->get_active_provider(); | |
| 644 | + if ( $spam_provider !== false ) { | |
| 645 | + $spam_provider->enqueue_scripts(); | |
| 646 | + } | |
| 647 | + | |
| 641 | 648 | } |
| 642 | 649 | |
| 643 | 650 | /** |
| 644 | 651 | * Outputs the login modal in the footer, ensuring it is only output once |
| @@ -1603,15 +1610,8 @@ | ||
| 1603 | 1610 | // If scripts are enabled, output the email login form in a modal, which will be displayed |
| 1604 | 1611 | // when the 'log in' link is clicked. |
| 1605 | 1612 | if ( ! $this->settings->scripts_disabled() ) { |
| 1606 | 1613 | $this->output_login_modal( $post_id, $resource_id, $resource_type ); |
| 1607 | - } | |
| 1608 | - | |
| 1609 | - // Enqueue the active spam protection provider's client-side script. | |
| 1610 | - $spam = new ConvertKit_Spam_Protection(); | |
| 1611 | - $spam_provider = $spam->get_active_provider(); | |
| 1612 | - if ( $spam_provider !== false ) { | |
| 1613 | - $spam_provider->enqueue_scripts(); | |
| 1614 | 1614 | } |
| 1615 | 1615 | |
| 1616 | 1616 | // Output. |
| 1617 | 1617 | ob_start(); |