PluginProbe
Passster – Password Protect Pages and Content / 4.3.17
Passster – Password Protect Pages and Content v4.3.17
4.3.17 4.3.16 4.3.15 4.3.14 4.3.12 4.3.13 4.3.11 4.3.10 4.3.9 4.3.8 4.3.7 4.3.6 4.3.5 trunk 3.5.4 3.5.5.2 3.5.5.8 3.5.5.9 4.0 4.1.4 4.2.10 4.2.11 4.2.12 4.2.13 4.2.14 All 49 releases
← All changes | inc/freemius/templates/gdpr-optin-js.php +66 -66 4.2.13 → 4.3.17 View file →
@@ -1,67 +1,67 @@
1 -<?php
2 - /**
3 - * @package Freemius
4 - * @copyright Copyright (c) 2015, Freemius, Inc.
5 - * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6 - * @since 2.1.0
7 - */
8 -
9 - if ( ! defined( 'ABSPATH' ) ) {
10 - exit;
11 - }
12 -
13 - /**
14 - * @var array $VARS
15 - */
16 - $fs = freemius( $VARS['id'] );
17 -?>
18 -<script type="text/javascript">
19 - (function( $ ) {
20 - $( document ).ready(function() {
21 - var $gdprOptinNotice = $( 'div[data-id^="gdpr_optin_actions"]' );
22 - if ( 0 === $gdprOptinNotice.length ) {
23 - return;
24 - }
25 -
26 - $gdprOptinNotice.on( 'click', '.button', function() {
27 - var
28 - $this = $( this ),
29 - allowMarketing = $this.hasClass( 'allow-marketing' ),
30 - cursor = $this.css( 'cursor' ),
31 - $products = $gdprOptinNotice.find( 'span[data-plugin-id]' ),
32 - pluginIDs = [],
33 - ajaxUrl = <?php echo Freemius::ajax_url() ?>;
34 -
35 - if ( $products.length > 0 ) {
36 - $products.each(function() {
37 - pluginIDs.push( $( this ).data( 'plugin-id' ) );
38 - });
39 - }
40 -
41 - $.ajax({
42 - url : ajaxUrl + (ajaxUrl.includes('?') ? '&' : '?') + $.param({
43 - action : '<?php echo $fs->get_ajax_action( 'gdpr_optin_action' ) ?>',
44 - security : '<?php echo $fs->get_ajax_security( 'gdpr_optin_action' ) ?>',
45 - module_id: '<?php echo $fs->get_id() ?>'
46 - }),
47 - method : 'POST',
48 - data : {
49 - is_marketing_allowed: allowMarketing,
50 - plugin_ids : pluginIDs
51 - },
52 - beforeSend: function() {
53 - $this.text( <?php fs_json_encode_echo_inline( 'Thanks, please wait', 'thanks-please-wait', $fs->get_slug() ) ?> + '...' );
54 - $this.css({'cursor': 'wait'});
55 -
56 - $gdprOptinNotice.find( '.button' ).addClass( 'disabled' );
57 - },
58 - complete : function() {
59 - $this.css({'cursor': cursor});
60 -
61 - $gdprOptinNotice.remove();
62 - }
63 - });
64 - });
65 - });
66 - })( jQuery );
1 +<?php
2 + /**
3 + * @package Freemius
4 + * @copyright Copyright (c) 2015, Freemius, Inc.
5 + * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6 + * @since 2.1.0
7 + */
8 +
9 + if ( ! defined( 'ABSPATH' ) ) {
10 + exit;
11 + }
12 +
13 + /**
14 + * @var array $VARS
15 + */
16 + $fs = freemius( $VARS['id'] );
17 +?>
18 +<script type="text/javascript">
19 + (function( $ ) {
20 + $( document ).ready(function() {
21 + var $gdprOptinNotice = $( 'div[data-id^="gdpr_optin_actions"]' );
22 + if ( 0 === $gdprOptinNotice.length ) {
23 + return;
24 + }
25 +
26 + $gdprOptinNotice.on( 'click', '.button', function() {
27 + var
28 + $this = $( this ),
29 + allowMarketing = $this.hasClass( 'allow-marketing' ),
30 + cursor = $this.css( 'cursor' ),
31 + $products = $gdprOptinNotice.find( 'span[data-plugin-id]' ),
32 + pluginIDs = [],
33 + ajaxUrl = <?php echo Freemius::ajax_url() ?>;
34 +
35 + if ( $products.length > 0 ) {
36 + $products.each(function() {
37 + pluginIDs.push( $( this ).data( 'plugin-id' ) );
38 + });
39 + }
40 +
41 + $.ajax({
42 + url : ajaxUrl + (ajaxUrl.includes('?') ? '&' : '?') + $.param({
43 + action : '<?php echo $fs->get_ajax_action( 'gdpr_optin_action' ) ?>',
44 + security : '<?php echo $fs->get_ajax_security( 'gdpr_optin_action' ) ?>',
45 + module_id: '<?php echo $fs->get_id() ?>'
46 + }),
47 + method : 'POST',
48 + data : {
49 + is_marketing_allowed: allowMarketing,
50 + plugin_ids : pluginIDs
51 + },
52 + beforeSend: function() {
53 + $this.text( <?php fs_json_encode_echo_inline( 'Thanks, please wait', 'thanks-please-wait', $fs->get_slug() ) ?> + '...' );
54 + $this.css({'cursor': 'wait'});
55 +
56 + $gdprOptinNotice.find( '.button' ).addClass( 'disabled' );
57 + },
58 + complete : function() {
59 + $this.css({'cursor': cursor});
60 +
61 + $gdprOptinNotice.remove();
62 + }
63 + });
64 + });
65 + });
66 + })( jQuery );
67 67 </script>