+                'eraser'
118
+            ),
119
+        );
120
+
121
+        return $erasers;
122
+    }
123
+
124
+    public function eraser($email_address, $page = 1) {
125
+        return array(
126
+            'items_removed'  => false,
127
+            'items_retained' => false,
128
+            'messages'       => array(),
129
+            'done'           => true,
130
+        );
131
+    }
132
+}
133
+
134
+
135
+new GDPR();

+ 214 - 0
app/wp-content/plugins/nextend-facebook-connect/NSL/Notices.php

@@ -0,0 +1,214 @@
1
+<?php
2
+
3
+namespace NSL;
4
+
5
+use NSL\Persistent\Persistent;
6
+use WP_Error;
7
+
8
+class Notices {
9
+
10
+    private static $notices;
11
+
12
+    private static $instance;
13
+
14
+    public static function init() {
15
+        if (self::$instance === null) {
16
+            self::$instance = new self;
17
+        }
18
+    }
19
+
20
+    private function __construct() {
21
+        if (is_admin() || (isset($_GET['nsl-notice']) && $_GET['nsl-notice'] == 1)) {
22
+            add_action('init', array(
23
+                $this,
24
+                'load'
25
+            ), 11);
26
+
27
+            if (basename($_SERVER['PHP_SELF']) !== 'options-general.php' || empty($_GET['page']) || $_GET['page'] !== 'nextend-social-login') {
28
+                add_action('admin_notices', array(
29
+                    $this,
30
+                    'admin_notices'
31
+                ));
32
+            }
33
+
34
+            add_action('admin_print_footer_scripts', array(
35
+                $this,
36
+                'notices_fallback'
37
+            ));
38
+            add_action('wp_print_footer_scripts', array(
39
+                $this,
40
+                'notices_fallback'
41
+            ));
42
+        }
43
+    }
44
+
45
+    public function load() {
46
+        self::$notices = maybe_unserialize(self::get());
47
+        if (!is_array(self::$notices)) {
48
+            self::$notices = array();
49
+        }
50
+    }
51
+
52
+    private static function add($type, $message) {
53
+        if (!isset(self::$notices[$type])) {
54
+            self::$notices[$type] = array();
55
+        }
56
+
57
+        if (!in_array($message, self::$notices[$type])) {
58
+            self::$notices[$type][] = $message;
59
+        }
60
+
61
+        self::set();
62
+    }
63
+
64
+    /**
65
+     * @param $message string|WP_Error
66
+     */
67
+    public static function addError($message) {
68
+        if (is_wp_error($message)) {
69
+            foreach ($message->get_error_messages() as $m) {
70
+                self::add('error', $m);
71
+            }
72
+        } else {
73
+            self::add('error', $message);
74
+        }
75
+    }
76
+
77
+    public static function getErrors() {
78
+        if (isset(self::$notices['error'])) {
79
+
80
+            $errors = self::$notices['error'];
81
+
82
+            unset(self::$notices['error']);
83
+            self::set();
84
+
85
+            return $errors;
86
+        }
87
+
88
+        return false;
89
+    }
90
+
91
+    public static function addSuccess($message) {
92
+        self::add('success', $message);
93
+    }
94
+
95
+    public static function displayNotices() {
96
+
97
+        $html = self::getHTML();
98
+
99
+        if (!empty($html)) {
100
+            echo '<div class="nsl-admin-notices">' . $html . '</div>';
101
+        }
102
+    }
103
+
104
+    public function admin_notices() {
105
+        echo self::getHTML();
106
+    }
107
+
108
+    /**
109
+     * Displays the non-displayed notices in lightbox as a fallback
110
+     */
111
+    public function notices_fallback() {
112
+
113
+        $html = self::getHTML();
114
+
115
+        if (!empty($html)) {
116
+            ?>
117
+            <div id="nsl-notices-fallback" onclick="this.parentNode.removeChild(this);">
118
+                <?php echo $html; ?>
119
+                <style>
120
+                    #nsl-notices-fallback {
121
+                        position: fixed;
122
+                        right: 10px;
123
+                        top: 10px;
124
+                        z-index: 10000;
125
+                    }
126
+
127
+                    .admin-bar #nsl-notices-fallback {
128
+                        top: 42px;
129
+                    }
130
+
131
+                    #nsl-notices-fallback > div {
132
+                        position: relative;
133
+                        background: #fff;
134
+                        border-left: 4px solid #fff;
135
+                        box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
136
+                        margin: 5px 15px 2px;
137
+                        padding: 1px 20px;
138
+                    }
139
+
140
+                    #nsl-notices-fallback > div.error {
141
+                        display: block;
142
+                        border-left-color: #dc3232;
143
+                    }
144
+
145
+                    #nsl-notices-fallback > div.updated {
146
+                        display: block;
147
+                        border-left-color: #46b450;
148
+                    }
149
+
150
+                    #nsl-notices-fallback p {
151
+                        margin: .5em 0;
152
+                        padding: 2px;
153
+                    }
154
+
155
+                    #nsl-notices-fallback > div:after {
156
+                        position: absolute;
157
+                        right: 5px;
158
+                        top: 5px;
159
+                        content: '\00d7';
160
+                        display: block;
161
+                        height: 16px;
162
+                        width: 16px;
163
+                        line-height: 16px;
164
+                        text-align: center;
165
+                        font-size: 20px;
166
+                        cursor: pointer;
167
+                    }
168
+                </style>
169
+            </div>
170
+            <?php
171
+        }
172
+    }
173
+
174
+    private static function getHTML() {
175
+        $html = '';
176
+        if (isset(self::$notices['success'])) {
177
+            foreach (self::$notices['success'] AS $message) {
178
+                $html .= '<div class="updated"><p>' . $message . '</p></div>';
179
+            }
180
+        }
181
+
182
+        if (isset(self::$notices['error'])) {
183
+            foreach (self::$notices['error'] AS $message) {
184
+                $html .= '<div class="error"><p>' . $message . '</p></div>';
185
+            }
186
+        }
187
+
188
+        self::clear();
189
+
190
+        return $html;
191
+    }
192
+
193
+    private static function get() {
194
+        return Persistent::get('notices');
195
+    }
196
+
197
+    private static function set() {
198
+        Persistent::set('notices', self::$notices);
199
+    }
200
+
201
+    public static function clear() {
202
+
203
+        Persistent::delete('notices');
204
+        self::$notices = array();
205
+    }
206
+
207
+    public static function hasErrors() {
208
+        if (isset(self::$notices['error'])) {
209
+            return true;
210
+        }
211
+
212
+        return false;
213
+    }
214
+}

+ 93 - 0
app/wp-content/plugins/nextend-facebook-connect/NSL/Persistent/Persistent.php

@@ -0,0 +1,93 @@
1
+<?php
2
+
3
+namespace NSL\Persistent;
4
+
5
+use NSL\Persistent\Storage\Session;
6
+use NSL\Persistent\Storage\StorageAbstract;
7
+use NSL\Persistent\Storage\Transient;
8
+use WP_User;
9
+
10
+require_once dirname(__FILE__) . '/Storage/Abstract.php';
11
+require_once dirname(__FILE__) . '/Storage/Session.php';
12
+require_once dirname(__FILE__) . '/Storage/Transient.php';
13
+
14
+class Persistent {
15
+
16
+    private static $instance;
17
+
18
+    /** @var StorageAbstract */
19
+    private $storage;
20
+
21
+    public function __construct() {
22
+        self::$instance = $this;
23
+        add_action('init', array(
24
+            $this,
25
+            'init'
26
+        ), 0);
27
+
28
+        add_action('wp_login', array(
29
+            $this,
30
+            'transferSessionToUser'
31
+        ), 10, 2);
32
+    }
33
+
34
+    public function init() {
35
+        if ($this->storage === NULL) {
36
+            if (is_user_logged_in()) {
37
+                $this->storage = new Transient();
38
+            } else {
39
+                $this->storage = new Session();
40
+            }
41
+        }
42
+    }
43
+
44
+    public static function set($key, $value) {
45
+        if (self::$instance->storage) {
46
+            self::$instance->storage->set($key, $value);
47
+        }
48
+    }
49
+
50
+    public static function get($key) {
51
+        if (self::$instance->storage) {
52
+            return self::$instance->storage->get($key);
53
+        }
54
+
55
+        return false;
56
+    }
57
+
58
+    public static function delete($key) {
59
+        if (self::$instance->storage) {
60
+            self::$instance->storage->delete($key);
61
+        }
62
+    }
63
+
64
+    /**
65
+     * @param          $user_login
66
+     * @param WP_User  $user
67
+     */
68
+    public function transferSessionToUser($user_login, $user = null) {
69
+
70
+        if (!$user) { // For do_action( 'wp_login' ) calls that lacked passing the 2nd arg.
71
+            $user = get_user_by('login', $user_login);
72
+        }
73
+
74
+        $newStorage = new Transient($user->ID);
75
+        /**
76
+         * $this->storage might be NULL if init action not called yet
77
+         */
78
+        if ($this->storage !== NULL) {
79
+            $newStorage->transferData($this->storage);
80
+        }
81
+
82
+        $this->storage = $newStorage;
83
+    }
84
+
85
+    public static function clear() {
86
+        if (self::$instance->storage) {
87
+            self::$instance->storage->clear();
88
+        }
89
+    }
90
+}
91
+
92
+
93
+new Persistent();

+ 72 - 0
app/wp-content/plugins/nextend-facebook-connect/NSL/Persistent/Storage/Abstract.php

@@ -0,0 +1,72 @@
1
+<?php
2
+
3
+namespace NSL\Persistent\Storage;
4
+
5
+abstract class StorageAbstract {
6
+
7
+    protected $sessionId = null;
8
+
9
+    protected $data = array();
10
+
11
+    public function set($key, $value) {
12
+        $this->load(true);
13
+
14
+        $this->data[$key] = $value;
15
+
16
+        $this->store();
17
+    }
18
+
19
+    public function get($key) {
20
+        $this->load();
21
+
22
+        if (isset($this->data[$key])) {
23
+            return $this->data[$key];
24
+        }
25
+
26
+        return null;
27
+    }
28
+
29
+    public function delete($key) {
30
+        $this->load();
31
+
32
+        if (isset($this->data[$key])) {
33
+            unset($this->data[$key]);
34
+            $this->store();
35
+        }
36
+    }
37
+
38
+    public function clear() {
39
+        $this->data = array();
40
+        $this->store();
41
+    }
42
+
43
+    protected function load($createSession = false) {
44
+        static $isLoaded = false;
45
+
46
+        if (!$isLoaded) {
47
+            $data = maybe_unserialize(get_site_transient($this->sessionId));
48
+            if (is_array($data)) {
49
+                $this->data = $data;
50
+            }
51
+            $isLoaded = true;
52
+        }
53
+    }
54
+
55
+    private function store() {
56
+        if (empty($this->data)) {
57
+            delete_site_transient($this->sessionId);
58
+        } else {
59
+            set_site_transient($this->sessionId, $this->data, apply_filters('nsl_persistent_expiration', HOUR_IN_SECONDS));
60
+        }
61
+    }
62
+
63
+    /**
64
+     * @param StorageAbstract $storage
65
+     */
66
+    public function transferData($storage) {
67
+        $this->data = $storage->data;
68
+        $this->store();
69
+
70
+        $storage->clear();
71
+    }
72
+}

+ 86 - 0
app/wp-content/plugins/nextend-facebook-connect/NSL/Persistent/Storage/Session.php

@@ -0,0 +1,86 @@
1
+<?php
2
+
3
+namespace NSL\Persistent\Storage;
4
+
5
+class Session extends StorageAbstract {
6
+
7
+    /**
8
+     * @var string name of the cookie. Can be changed with nsl_session_name filter and NSL_SESSION_NAME constant.
9
+     *
10
+     * @see https://pantheon.io/docs/caching-advanced-topics/
11
+     */
12
+    private $sessionName = 'SESSnsl';
13
+
14
+    public function __construct() {
15
+
16
+        /**
17
+         * WP Engine hosting needs custom cookie name to prevent caching.
18
+         *
19
+         * @see https://wpengine.com/support/wpengine-ecommerce/
20
+         */
21
+        if (class_exists('WpePlugin_common', false)) {
22
+            $this->sessionName = 'wordpress_nsl';
23
+        }
24
+        if (defined('NSL_SESSION_NAME')) {
25
+            $this->sessionName = NSL_SESSION_NAME;
26
+        }
27
+        $this->sessionName = apply_filters('nsl_session_name', $this->sessionName);
28
+    }
29
+
30
+    public function clear() {
31
+        parent::clear();
32
+
33
+        $this->destroy();
34
+    }
35
+
36
+    private function destroy() {
37
+        $sessionID = $this->sessionId;
38
+        if ($sessionID) {
39
+            $this->setCookie($sessionID, time() - YEAR_IN_SECONDS, apply_filters('nsl_session_use_secure_cookie', false));
40
+
41
+            add_action('shutdown', array(
42
+                $this,
43
+                'destroySiteTransient'
44
+            ));
45
+        }
46
+    }
47
+
48
+    public function destroySiteTransient() {
49
+        $sessionID = $this->sessionId;
50
+        if ($sessionID) {
51
+            delete_site_transient('nsl_' . $sessionID);
52
+        }
53
+    }
54
+
55
+    protected function load($createSession = false) {
56
+        static $isLoaded = false;
57
+        if ($this->sessionId === null) {
58
+            if (isset($_COOKIE[$this->sessionName])) {
59
+                $this->sessionId = 'nsl_persistent_' . md5(SECURE_AUTH_KEY . $_COOKIE[$this->sessionName]);
60
+            } else if ($createSession) {
61
+                $unique = uniqid('nsl', true);
62
+
63
+                $this->setCookie($unique, apply_filters('nsl_session_cookie_expiration', 0), apply_filters('nsl_session_use_secure_cookie', false));
64
+
65
+                $this->sessionId = 'nsl_persistent_' . md5(SECURE_AUTH_KEY . $unique);
66
+
67
+                $isLoaded = true;
68
+            }
69
+        }
70
+
71
+        if (!$isLoaded) {
72
+            if ($this->sessionId !== null) {
73
+                $data = maybe_unserialize(get_site_transient($this->sessionId));
74
+                if (is_array($data)) {
75
+                    $this->data = $data;
76
+                }
77
+                $isLoaded = true;
78
+            }
79
+        }
80
+    }
81
+
82
+    private function setCookie($value, $expire, $secure = false) {
83
+
84
+        setcookie($this->sessionName, $value, $expire, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, $secure);
85
+    }
86
+}

+ 13 - 0
app/wp-content/plugins/nextend-facebook-connect/NSL/Persistent/Storage/Transient.php

@@ -0,0 +1,13 @@
1
+<?php
2
+
3
+namespace NSL\Persistent\Storage;
4
+
5
+class Transient extends StorageAbstract {
6
+
7
+    public function __construct($user_id = false) {
8
+        if ($user_id === false) {
9
+            $user_id = get_current_user_id();
10
+        }
11
+        $this->sessionId = 'nsl_persistent_' . $user_id;
12
+    }
13
+}

+ 72 - 0
app/wp-content/plugins/nextend-facebook-connect/NSL/REST.php

@@ -0,0 +1,72 @@
1
+<?php
2
+
3
+namespace NSL;
4
+
5
+use Exception;
6
+use NextendSocialLogin;
7
+use WP_Error;
8
+use WP_REST_Request;
9
+use WP_REST_Response;
10
+use function add_action;
11
+use function register_rest_route;
12
+
13
+class REST {
14
+
15
+    public function __construct() {
16
+        add_action('rest_api_init', array(
17
+            $this,
18
+            'rest_api_init'
19
+        ));
20
+    }
21
+
22
+    public function rest_api_init() {
23
+        register_rest_route('nextend-social-login/v1', '/(?P<provider>\w[\w\s\-]*)/get_user', array(
24
+            'args' => array(
25
+                'provider'     => array(
26
+                    'required'          => true,
27
+                    'validate_callback' => array(
28
+                        $this,
29
+                        'validate_provider'
30
+                    )
31
+                ),
32
+                'access_token' => array(
33
+                    'required' => true,
34
+                ),
35
+            ),
36
+            array(
37
+                'methods'             => 'POST',
38
+                'callback'            => array(
39
+                    $this,
40
+                    'get_user'
41
+                ),
42
+                'permission_callback' => '__return_true'
43
+            ),
44
+        ));
45
+
46
+    }
47
+
48
+    public function validate_provider($providerID) {
49
+        return NextendSocialLogin::isProviderEnabled($providerID);
50
+    }
51
+
52
+    /**
53
+     * @param WP_REST_Request $request Full details about the request.
54
+     *
55
+     * @return WP_Error|WP_REST_Response
56
+     */
57
+    public function get_user($request) {
58
+
59
+        $provider = NextendSocialLogin::$enabledProviders[$request['provider']];
60
+        try {
61
+            $user = $provider->findUserByAccessToken($request['access_token']);
62
+        } catch (Exception $e) {
63
+            return new WP_Error('error', $e->getMessage());
64
+        }
65
+
66
+        return $user;
67
+    }
68
+
69
+}
70
+
71
+new REST();
72
+

+ 71 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/EditUser.php

@@ -0,0 +1,71 @@
1
+<?php
2
+/** @var $user WP_User */
3
+?>
4
+
5
+<?php foreach (NextendSocialLogin::$enabledProviders AS $provider): ?>
6
+    <?php
7
+    $settings = $provider->settings;
8
+    if (!$provider->isUserConnected($user->ID)) continue;
9
+    $hasData = false;
10
+    ob_start();
11
+    ?>
12
+
13
+    <h2><?php echo $provider->getLabel(); ?></h2>
14
+
15
+    <table class="form-table">
16
+        <tbody>
17
+        <?php foreach ($provider->getSyncFields() AS $fieldName => $fieldData): ?>
18
+            <tr>
19
+                <?php
20
+                $meta_key = $settings->get('sync_fields/fields/' . $fieldName . '/meta_key');
21
+                $value    = get_user_meta($user->ID, $meta_key, true);
22
+                if (isset($value) && $value !== '') {
23
+                    ?>
24
+                    <th><label><?php echo $fieldData['label'] ?></label></th>
25
+                    <td>
26
+                        <?php
27
+
28
+                        $unSerialized = maybe_unserialize($value);
29
+                        if (is_array($unSerialized) || is_object($unSerialized)) {
30
+
31
+                            echo "<pre>";
32
+                            print_r(formatUserMeta((array)$unSerialized));
33
+
34
+                            echo "</pre>";
35
+                        } else {
36
+                            echo esc_html($value);
37
+                        }
38
+                        $hasData = true;
39
+                        ?>
40
+                    </td>
41
+                    <?php
42
+                }
43
+                ?>
44
+            </tr>
45
+        <?php endforeach; ?>
46
+
47
+        </tbody>
48
+    </table>
49
+    <?php
50
+    if ($hasData) {
51
+        echo ob_get_clean();
52
+    } else {
53
+        ob_end_clean();
54
+    }
55
+    ?>
56
+<?php endforeach; ?>
57
+
58
+<?php
59
+
60
+function formatUserMeta($user_meta, $level = '') {
61
+    $formatted_usermeta = '';
62
+    if (is_array($user_meta)) {
63
+        foreach ($user_meta as $meta_key => $meta_value) {
64
+            $formatted_usermeta .= formatUserMeta($meta_value, $level . '[' . $meta_key . ']');
65
+        }
66
+    } else {
67
+        $formatted_usermeta .= "\n" . $level . ' = ' . $user_meta;
68
+    }
69
+
70
+    return $formatted_usermeta;
71
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1023 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/admin.php


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/buttons/default.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/buttons/fullwidth.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/buttons/icon.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/error.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/exclamation-mark.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/facebook/black.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/facebook/dark.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/facebook/light.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/facebook/white.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/google/dark.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/google/light.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/google/uniform.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/layouts/above-separator.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/layouts/above.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/layouts/below-floating.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/layouts/below-separator.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/layouts/below.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/layouts/default-separator.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/layouts/default.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/notice.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/notice/nslnotice.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/nsl-logo.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/ok.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/padlock.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/stars-big.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/stars-small.png


BIN
app/wp-content/plugins/nextend-facebook-connect/admin/images/test-needed.png


+ 38 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/interim.php

@@ -0,0 +1,38 @@
1
+<?php
2
+if (!defined('ABSPATH')) {
3
+    exit;
4
+}
5
+
6
+global $interim_login;
7
+$customize_login = isset($_REQUEST['customize-login']);
8
+if ($customize_login) {
9
+    wp_enqueue_script('customize-base');
10
+}
11
+
12
+$message = '<p class="message">' . __('You have logged in successfully.') . '</p>';
13
+$interim_login = 'success';
14
+?><!DOCTYPE html>
15
+<!--[if IE 8]>
16
+<html xmlns="http://www.w3.org/1999/xhtml" class="ie8" <?php language_attributes(); ?>>
17
+<![endif]-->
18
+<!--[if !(IE 8) ]><!-->
19
+<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
20
+<!--<![endif]-->
21
+<head>
22
+    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>"/>
23
+    <title><?php __('You have logged in successfully.'); ?></title>
24
+</head>
25
+<body class="login interim-login interim-login-success">
26
+<?php
27
+echo $message;
28
+/** This action is documented in wp-login.php */
29
+do_action('login_footer'); ?>
30
+<?php if ($customize_login) : ?>
31
+    <script type="text/javascript">setTimeout(function () {
32
+            new wp.customize.Messenger({url: '<?php echo wp_customize_url(); ?>', channel: 'login'}).send(
33
+                'login');
34
+        }, 1000);</script>
35
+<?php endif; ?>
36
+</body>
37
+</html>
38
+<?php exit;

+ 77 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/notice.php

@@ -0,0 +1,77 @@
1
+<?php
2
+
3
+
4
+$current = time();
5
+if (mktime(0, 0, 0, 11, 23, 2021) <= $current && $current < mktime(0, 0, 0, 12, 1, 2021)) {
6
+    if (get_option('nsl_bf_2021') != '1') {
7
+
8
+        add_action('admin_notices', function () {
9
+            ?>
10
+            <div class="notice notice-info is-dismissible" data-nsldismissable="nsl_bf_2021" style="display:grid;grid-template-columns: 100px auto;padding-top: 25px; padding-bottom: 22px;">
11
+                <img alt="Nextend Social Login" src="<?php echo plugins_url('images/notice/nslnotice.png', NSL_ADMIN_PATH) ?>" width="74" height="74" style="grid-row: 1 / 4; align-self: center;justify-self: center">
12
+                <h3 style="margin:0;">Nextend Social Login - Black Friday Deal</h3>
13
+                <p style="margin:0 0 2px;">Don't miss out on our biggest sale of the year! Get your <b>Pro Addon</b>
14
+                    with <b>40% OFF</b> to access <b>WooCommerce support</b>, Apple provider and much more!
15
+                    Limited time offer expires on November 30.</p>
16
+                <p style="margin:0;">
17
+                    <a class="button button-primary" href="https://nextendweb.com/social-login/?coupon=SAVE4021&utm_source=wpfree&utm_medium=wp&utm_campaign=bf21#pricing" target="_blank">
18
+                        Buy Now</a>
19
+                    <a class="button button-dismiss" href="#">Dismiss</a>
20
+                </p>
21
+            </div>
22
+            <?php
23
+        });
24
+
25
+        add_action('admin_footer', function () {
26
+            ?>
27
+            <script>
28
+                (function () {
29
+                    function ready(fn) {
30
+                        if (document.readyState === "complete" || document.readyState === "interactive") {
31
+                            fn();
32
+                        } else {
33
+                            document.addEventListener("DOMContentLoaded", fn);
34
+                        }
35
+                    }
36
+
37
+                    function serialize(obj) {
38
+                        return Object.keys(obj).reduce(function (a, k) {
39
+                            a.push(k + '=' + encodeURIComponent(obj[k]));
40
+                            return a;
41
+                        }, []).join('&');
42
+                    }
43
+
44
+                    ready(function () {
45
+                        setTimeout(function () {
46
+                            const buttons = document.querySelectorAll("div[data-nsldismissable] .notice-dismiss, div[data-nsldismissable] .button-dismiss");
47
+                            for (let i = 0; i < buttons.length; i++) {
48
+                                buttons[i].addEventListener('click', function (e) {
49
+                                    e.preventDefault();
50
+
51
+                                    const http = new XMLHttpRequest();
52
+                                    http.open('POST', ajaxurl, true);
53
+                                    http.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=UTF-8");
54
+
55
+                                    http.send(serialize({
56
+                                        'action': 'nsl_dismiss_admin_notice',
57
+                                        'nonce': <?php echo json_encode(wp_create_nonce('nsl-dismissible-notice')); ?>
58
+                                    }));
59
+
60
+                                    e.target.closest('.is-dismissible').remove();
61
+                                });
62
+                            }
63
+                        }, 1000);
64
+                    });
65
+                })();
66
+            </script>
67
+            <?php
68
+        });
69
+
70
+        add_action('wp_ajax_nsl_dismiss_admin_notice', function () {
71
+            check_ajax_referer('nsl-dismissible-notice', 'nonce');
72
+
73
+            update_option('nsl_bf_2021', '1');
74
+            wp_die();
75
+        });
76
+    }
77
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 529 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/style.css


+ 201 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/templates-provider/buttons.php

@@ -0,0 +1,201 @@
1
+<?php
2
+defined('ABSPATH') || die();
3
+/** @var $this NextendSocialProviderAdmin */
4
+
5
+$provider = $this->getProvider();
6
+
7
+$settings = $provider->settings;
8
+
9
+$isPRO = apply_filters('nsl-pro', false);
10
+?>
11
+<div class="nsl-admin-sub-content">
12
+    <script type="text/javascript">
13
+
14
+        document.addEventListener("DOMContentLoaded", function () {
15
+            window.resetButtonToDefault = function (id) {
16
+                var defaultButtonValues = {
17
+                    '#login_label': <?php echo wp_json_encode($settings->get('login_label', 'default')); ?>,
18
+                    '#register_label': <?php echo wp_json_encode($settings->get('register_label', 'default')); ?>,
19
+                    '#link_label': <?php echo wp_json_encode($settings->get('link_label', 'default')); ?>,
20
+                    '#unlink_label': <?php echo wp_json_encode($settings->get('unlink_label', 'default')); ?>,
21
+                    '#custom_default_button': <?php echo wp_json_encode($provider->getRawDefaultButton()); ?>,
22
+                    '#custom_icon_button': <?php echo wp_json_encode($provider->getRawIconButton()); ?>
23
+                };
24
+
25
+                var inputField = document.querySelector(id),
26
+                    codeMirror = inputField.parentNode.querySelector('.CodeMirror');
27
+
28
+                inputField.value = defaultButtonValues[id];
29
+                if (codeMirror) {
30
+                    codeMirror.CodeMirror.setValue(defaultButtonValues[id]);
31
+                }
32
+                return false;
33
+            };
34
+
35
+            var defaultButton = document.getElementById('custom_default_button_enabled');
36
+            defaultButton.addEventListener('change', function () {
37
+                if (this.checked) {
38
+                    document.getElementById('custom_default_button_textarea_container').style.removeProperty('display');
39
+
40
+                    var inputField = document.getElementById('custom_default_button'),
41
+                        codeMirror = inputField.parentNode.querySelector('.CodeMirror');
42
+                    if (codeMirror) {
43
+                        codeMirror.CodeMirror.refresh();
44
+                    }
45
+                } else {
46
+                    document.getElementById('custom_default_button_textarea_container').style.display = 'none';
47
+                }
48
+            });
49
+
50
+            var defaultIcon = document.getElementById('custom_icon_button_enabled');
51
+            defaultIcon.addEventListener('change', function () {
52
+                if (this.checked) {
53
+                    document.getElementById('custom_icon_button_textarea_container').style.removeProperty('display');
54
+
55
+                    var inputField = document.getElementById('custom_icon_button');
56
+                    var codeMirror = inputField.parentNode.querySelector('.CodeMirror');
57
+                    if (codeMirror) {
58
+                        codeMirror.CodeMirror.refresh();
59
+                    }
60
+                } else {
61
+                    document.getElementById('custom_icon_button_textarea_container').style.display = 'none';
62
+                }
63
+            });
64
+        });
65
+
66
+    </script>
67
+
68
+    <form method="post" action="<?php echo admin_url('admin-post.php'); ?>" novalidate="novalidate">
69
+
70
+        <?php wp_nonce_field('nextend-social-login'); ?>
71
+        <input type="hidden" name="action" value="nextend-social-login"/>
72
+        <input type="hidden" name="view" value="provider-<?php echo $provider->getId(); ?>"/>
73
+        <input type="hidden" name="subview" value="buttons"/>
74
+
75
+        <table class="form-table">
76
+            <tbody>
77
+            <?php
78
+            $buttonsPath = $provider->getPath() . '/admin/buttons.php';
79
+            if (file_exists($buttonsPath)) {
80
+                include($buttonsPath);
81
+            }
82
+            ?>
83
+
84
+            <tr>
85
+                <th scope="row"><label
86
+                            for="login_label"><?php _e('Login label', 'nextend-facebook-connect'); ?></label></th>
87
+                <td>
88
+                    <input name="login_label" type="text" id="login_label"
89
+                           value="<?php echo esc_attr($settings->get('login_label')); ?>" class="regular-text">
90
+                    <p class="description"><a href="#"
91
+                                              onclick="return resetButtonToDefault('#login_label');"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a>
92
+                    </p>
93
+                </td>
94
+            </tr>
95
+
96
+            <?php
97
+            $useCustomRegisterLabel = NextendSocialLogin::$settings->get('custom_register_label');
98
+            if ($useCustomRegisterLabel): ?>
99
+                <tr>
100
+                    <th scope="row"><label
101
+                                for="register_label"><?php _e('Register label', 'nextend-facebook-connect'); ?></label>
102
+                    </th>
103
+                    <td>
104
+                        <input name="register_label" type="text" id="register_label"
105
+                               value="<?php echo esc_attr($settings->get('register_label')); ?>" class="regular-text">
106
+                        <p class="description"><a href="#"
107
+                                                  onclick="return resetButtonToDefault('#register_label');"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a>
108
+                        </p>
109
+                    </td>
110
+                </tr>
111
+            <?php endif; ?>
112
+
113
+            <tr>
114
+                <th scope="row"><label for="link_label"><?php _e('Link label', 'nextend-facebook-connect'); ?></label>
115
+                </th>
116
+                <td>
117
+                    <input name="link_label" type="text" id="link_label"
118
+                           value="<?php echo esc_attr($settings->get('link_label')); ?>" class="regular-text">
119
+                    <p class="description"><a href="#"
120
+                                              onclick="return resetButtonToDefault('#link_label');"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a>
121
+                    </p>
122
+                </td>
123
+            </tr>
124
+            <tr>
125
+                <th scope="row"><label
126
+                            for="unlink_label"><?php _e('Unlink label', 'nextend-facebook-connect'); ?></label></th>
127
+                <td>
128
+                    <input name="unlink_label" type="text" id="unlink_label"
129
+                           value="<?php echo esc_attr($settings->get('unlink_label')); ?>" class="regular-text">
130
+                    <p class="description"><a href="#"
131
+                                              onclick="return resetButtonToDefault('#unlink_label');"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a>
132
+                    </p>
133
+                </td>
134
+            </tr>
135
+            <tr>
136
+                <th scope="row"><label
137
+                            for="custom_default_button"><?php _e('Default button', 'nextend-facebook-connect'); ?></label>
138
+                </th>
139
+                <td>
140
+                    <?php
141
+                    $useCustom      = false;
142
+                    $buttonTemplate = $settings->get('custom_default_button');
143
+                    if (!empty($buttonTemplate)) {
144
+                        $useCustom = true;
145
+                    } else {
146
+                        $buttonTemplate = $provider->getRawDefaultButton();
147
+                    }
148
+                    ?>
149
+                    <fieldset><label for="custom_default_button_enabled">
150
+                            <input name="custom_default_button_enabled" type="checkbox"
151
+                                   id="custom_default_button_enabled"
152
+                                   value="1" <?php if ($useCustom): ?> checked<?php endif; ?>>
153
+                            <?php _e('Use custom button', 'nextend-facebook-connect'); ?></label>
154
+                    </fieldset>
155
+                    <div id="custom_default_button_textarea_container" <?php if (!$useCustom): ?> style="display:none;"<?php endif; ?>>
156
+                        <textarea cols="160" rows="6" name="custom_default_button" id="custom_default_button"
157
+                                  class="nextend-html-editor"
158
+                                  aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo esc_textarea($buttonTemplate); ?></textarea>
159
+                        <p class="description"><a href="#"
160
+                                                  onclick="return resetButtonToDefault('#custom_default_button');"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a><br><br><?php printf(__('Use the %s in your custom button\'s code to make the label show up.', 'nextend-facebook-connect'), "<code>{{label}}</code>"); ?>
161
+                        </p>
162
+                    </div>
163
+                </td>
164
+            </tr>
165
+            <?php if ($isPRO): ?>
166
+                <tr>
167
+                    <th scope="row"><label
168
+                                for="custom_icon_button"><?php _e('Icon button', 'nextend-facebook-connect'); ?></label>
169
+                    </th>
170
+                    <td>
171
+                        <?php
172
+                        $useCustom      = false;
173
+                        $buttonTemplate = $settings->get('custom_icon_button');
174
+                        if (!empty($buttonTemplate)) {
175
+                            $useCustom = true;
176
+                        } else {
177
+                            $buttonTemplate = $provider->getRawIconButton();
178
+                        }
179
+                        ?>
180
+                        <fieldset><label for="custom_icon_button_enabled">
181
+                                <input name="custom_icon_button_enabled" type="checkbox" id="custom_icon_button_enabled"
182
+                                       value="1" <?php if ($useCustom): ?> checked<?php endif; ?>>
183
+                                <?php _e('Use custom button', 'nextend-facebook-connect'); ?></label>
184
+                        </fieldset>
185
+                        <div id="custom_icon_button_textarea_container" <?php if (!$useCustom): ?> style="display:none;"<?php endif; ?>>
186
+                        <textarea cols="160" rows="6" name="custom_icon_button" id="custom_icon_button"
187
+                                  class="nextend-html-editor"
188
+                                  aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo esc_textarea($buttonTemplate); ?></textarea>
189
+                            <p class="description"><a href="#"
190
+                                                      onclick="return resetButtonToDefault('#custom_icon_button');"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a>
191
+                            </p>
192
+                        </div>
193
+                    </td>
194
+                </tr>
195
+            <?php endif; ?>
196
+            </tbody>
197
+        </table>
198
+        <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
199
+                                 value="<?php _e('Save Changes'); ?>"></p>
200
+    </form>
201
+</div>

+ 25 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/templates-provider/menu.php

@@ -0,0 +1,25 @@
1
+<?php
2
+defined('ABSPATH') || die();
3
+/** @var $this NextendSocialProviderAdmin */
4
+/** @var $view string */
5
+
6
+$proBadge = '';
7
+if (!NextendSocialLoginAdmin::isPro()) {
8
+    $proBadge = '<span class="nsl-pro-badge">Pro</span>';
9
+}
10
+?>
11
+<div class="nsl-admin-sub-nav-bar">
12
+    <a href="<?php echo $this->getUrl(); ?>"
13
+       class="nsl-admin-nav-tab<?php if ($view === 'getting-started'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Getting Started', 'nextend-facebook-connect'); ?></a>
14
+    <a href="<?php echo $this->getUrl('settings'); ?>"
15
+       class="nsl-admin-nav-tab<?php if ($view === 'settings'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Settings', 'nextend-facebook-connect'); ?></a>
16
+    <a href="<?php echo $this->getUrl('buttons'); ?>"
17
+       class="nsl-admin-nav-tab<?php if ($view === 'buttons'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Buttons', 'nextend-facebook-connect'); ?></a>
18
+
19
+    <?php if ($this->provider->hasSyncFields()): ?>
20
+        <a href="<?php echo $this->getUrl('sync-data'); ?>"
21
+           class="nsl-admin-nav-tab<?php if ($view === 'sync-data'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Sync data', 'nextend-facebook-connect'); ?><?php echo $proBadge; ?></a>
22
+    <?php endif; ?>
23
+    <a href="<?php echo $this->getUrl('usage'); ?>"
24
+       class="nsl-admin-nav-tab<?php if ($view === 'usage'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Usage', 'nextend-facebook-connect'); ?></a>
25
+</div>

+ 73 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/templates-provider/settings-other.php

@@ -0,0 +1,73 @@
1
+<?php
2
+defined('ABSPATH') || die();
3
+/** @var $this NextendSocialProviderAdmin */
4
+
5
+$provider = $this->getProvider();
6
+
7
+$settings = $provider->settings;
8
+?>
9
+
10
+<hr/>
11
+<h2><?php _e('Other settings', 'nextend-facebook-connect'); ?></h2>
12
+<table class="form-table">
13
+    <tbody>
14
+    <tr>
15
+        <th scope="row"><label
16
+                    for="user_prefix"><?php _e('Username prefix on register', 'nextend-facebook-connect'); ?></label>
17
+        </th>
18
+        <td><input name="user_prefix" type="text" id="user_prefix"
19
+                   value="<?php echo esc_attr($settings->get('user_prefix')); ?>" class="regular-text"></td>
20
+    </tr>
21
+    <tr>
22
+        <th scope="row"><label
23
+                    for="user_fallback"><?php _e('Fallback username prefix on register', 'nextend-facebook-connect'); ?></label>
24
+        </th>
25
+        <td><input name="user_fallback" type="text" id="user_fallback"
26
+                   value="<?php echo esc_attr($settings->get('user_fallback')); ?>" class="regular-text">
27
+            <p class="description" id="tagline-user_fallback"><?php _e('Used when username is invalid or not stored', 'nextend-facebook-connect'); ?></p>
28
+        </td>
29
+    </tr>
30
+    <?php if (NextendSocialLogin::$settings->get('terms_show') == 1): ?>
31
+        <tr>
32
+            <th scope="row"><?php _e('Terms and conditions', 'nextend-facebook-connect'); ?></th>
33
+            <td>
34
+                <?php
35
+                $terms              = $settings->get('terms');
36
+                $hasOverriddenTerms = !empty($terms);
37
+                ?>
38
+                <fieldset>
39
+                    <label for="terms_override">
40
+                        <input type="hidden" name="terms_override" value="0">
41
+                        <input type="checkbox" name="terms_override" id="terms_override"
42
+                               value="1" <?php if ($hasOverriddenTerms) : ?> checked="checked" <?php endif; ?>>
43
+                        <?php printf(__('Override global "%1$s"', 'nextend-facebook-connect'), __('Terms and conditions', 'nextend-facebook-connect')); ?>
44
+                    </label>
45
+
46
+                    <div id="nsl-terms" <?php if (!$hasOverriddenTerms) : ?> style="display:none;" <?php endif; ?>>
47
+                        <?php
48
+                        wp_editor($terms, 'terms', array(
49
+                            'textarea_rows' => 4,
50
+                            'media_buttons' => false
51
+                        ));
52
+                        ?>
53
+                    </div>
54
+                </fieldset>
55
+                <script type="text/javascript">
56
+                    (function ($) {
57
+
58
+                        $(document).ready(function () {
59
+                            $('#terms_override').on('change', function () {
60
+                                if ($(this).is(':checked')) {
61
+                                    $('#nsl-terms').css('display', '');
62
+                                } else {
63
+                                    $('#nsl-terms').css('display', 'none');
64
+                                }
65
+                            });
66
+                        });
67
+                    })(jQuery);
68
+                </script>
69
+            </td>
70
+        </tr>
71
+    <?php endif; ?>
72
+    </tbody>
73
+</table>

+ 141 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/templates-provider/settings-pro.php

@@ -0,0 +1,141 @@
1
+<?php
2
+defined('ABSPATH') || die();
3
+/** @var $this NextendSocialProviderAdmin */
4
+
5
+$provider = $this->getProvider();
6
+
7
+$settings = $provider->settings;
8
+
9
+$isPRO = apply_filters('nsl-pro', false);
10
+
11
+$attr = '';
12
+if (!$isPRO) {
13
+    $attr = ' disabled ';
14
+}
15
+?>
16
+
17
+    <hr/>
18
+    <h1><?php _e('PRO settings', 'nextend-facebook-connect'); ?></h1>
19
+
20
+
21
+<?php
22
+NextendSocialLoginAdmin::showProBox();
23
+?>
24
+    <input type="hidden" name="tested" id="tested" value="<?php echo esc_attr($settings->get('tested')); ?>"/>
25
+    <table class="form-table" <?php if (!$isPRO): ?> style="opacity:0.5;"<?php endif; ?>>
26
+        <tbody>
27
+        <tr>
28
+            <th scope="row"><?php _e('Ask E-mail on registration', 'nextend-facebook-connect'); ?></th>
29
+            <td>
30
+                <fieldset>
31
+                    <legend class="screen-reader-text">
32
+                        <span><?php _e('Ask E-mail on registration', 'nextend-facebook-connect'); ?></span></legend>
33
+                    <label><input type="radio" name="ask_email"
34
+                                  value="never" <?php if ($settings->get('ask_email') == 'never') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
35
+                        <span><?php _e('Never', 'nextend-facebook-connect'); ?></span></label><br>
36
+                    <label><input type="radio" name="ask_email"
37
+                                  value="when-empty" <?php if ($settings->get('ask_email') == 'when-empty') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
38
+                        <span><?php _e('When email is not provided or empty', 'nextend-facebook-connect'); ?></span></label><br>
39
+                    <label><input type="radio" name="ask_email"
40
+                                  value="always" <?php if ($settings->get('ask_email') == 'always') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
41
+                        <span><?php _e('Always', 'nextend-facebook-connect'); ?></span></label><br>
42
+                </fieldset>
43
+            </td>
44
+        </tr>
45
+        <tr>
46
+            <th scope="row"><?php _e('Ask Username on registration', 'nextend-facebook-connect'); ?></th>
47
+            <td>
48
+                <fieldset>
49
+                    <legend class="screen-reader-text">
50
+                        <span><?php _e('Ask Username on registration', 'nextend-facebook-connect'); ?></span></legend>
51
+                    <label><input type="radio" name="ask_user"
52
+                                  value="never" <?php if ($settings->get('ask_user') == 'never') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
53
+                        <span><?php _e('Never, generate automatically', 'nextend-facebook-connect'); ?></span></label><br>
54
+                    <label><input type="radio" name="ask_user"
55
+                                  value="when-empty" <?php if ($settings->get('ask_user') == 'when-empty') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
56
+                        <span><?php _e('When username is empty or invalid', 'nextend-facebook-connect'); ?></span></label><br>
57
+                    <label><input type="radio" name="ask_user"
58
+                                  value="always" <?php if ($settings->get('ask_user') == 'always') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
59
+                        <span><?php _e('Always', 'nextend-facebook-connect'); ?></span></label><br>
60
+                </fieldset>
61
+            </td>
62
+        </tr>
63
+        <tr>
64
+            <th scope="row"><?php _e('Ask Password on registration', 'nextend-facebook-connect'); ?></th>
65
+            <td>
66
+                <fieldset>
67
+                    <label><input type="radio" name="ask_password"
68
+                                  value="never" <?php if ($settings->get('ask_password') == 'never') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
69
+                        <span><?php _e('Never', 'nextend-facebook-connect'); ?></span></label><br>
70
+                    <label><input type="radio" name="ask_password"
71
+                                  value="always" <?php if ($settings->get('ask_password') == 'always') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
72
+                        <span><?php _e('Always', 'nextend-facebook-connect'); ?></span></label><br>
73
+                </fieldset>
74
+            </td>
75
+        </tr>
76
+        <tr>
77
+            <th scope="row"><?php _e('Automatically connect the existing account upon registration', 'nextend-facebook-connect'); ?></th>
78
+            <td>
79
+                <fieldset>
80
+                    <legend class="screen-reader-text">
81
+                        <span><?php _e('Automatically connect the existing account upon registration', 'nextend-facebook-connect'); ?></span>
82
+                    </legend>
83
+                    <label><input type="radio" name="auto_link"
84
+                                  value="disabled" <?php if ($settings->get('auto_link') == 'disabled') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
85
+                        <span><?php _e('Disabled', 'nextend-facebook-connect'); ?></span></label><br>
86
+                    <label><input type="radio" name="auto_link"
87
+                                  value="email" <?php if ($settings->get('auto_link') == 'email') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
88
+                        <span><?php _e('Automatic, based on email address', 'nextend-facebook-connect'); ?></span></label><br>
89
+                </fieldset>
90
+            </td>
91
+        </tr>
92
+        <tr>
93
+            <th scope="row"><?php _e('Disable login for the selected roles', 'nextend-facebook-connect'); ?></th>
94
+            <td>
95
+                <?php
96
+                $wp_roles = new WP_Roles();
97
+                $roles    = $wp_roles->get_names();
98
+
99
+                $disable_roles = $settings->get('disabled_roles');
100
+                foreach ($roles AS $roleKey => $label):
101
+                    ?>
102
+                    <fieldset><label for="disabled_roles_<?php echo esc_attr($roleKey); ?>">
103
+                            <input name="disabled_roles[]" type="checkbox"
104
+                                   id="disabled_roles_<?php echo esc_attr($roleKey); ?>"
105
+                                   value="<?php echo esc_attr($roleKey); ?>" <?php if (in_array($roleKey, $disable_roles)) : ?> checked <?php endif ?> <?php echo $attr; ?> />
106
+                            <?php echo $label; ?></label>
107
+                    </fieldset>
108
+                <?php endforeach; ?>
109
+                <input type="hidden" name="disabled_roles[]" value=""/>
110
+            </td>
111
+        </tr>
112
+        <tr>
113
+            <th scope="row"><?php _e('Default roles for user who registered with this provider', 'nextend-facebook-connect'); ?></th>
114
+            <td>
115
+                <?php
116
+                $register_roles = $settings->get('register_roles');
117
+                ?>
118
+                <fieldset><label for="register_roles_default">
119
+                        <input name="register_roles[]" type="checkbox" id="register_roles_default"
120
+                               value="default" <?php if (in_array('default', $register_roles)) : ?> checked <?php endif ?> <?php echo $attr; ?> />
121
+                        <?php _e('Default', 'nextend-facebook-connect'); ?></label>
122
+                </fieldset>
123
+                <?php
124
+                foreach ($roles AS $roleKey => $label):
125
+                    ?>
126
+                    <fieldset><label for="register_roles_<?php echo esc_attr($roleKey); ?>">
127
+                            <input name="register_roles[]" type="checkbox"
128
+                                   id="register_roles_<?php echo esc_attr($roleKey); ?>"
129
+                                   value="<?php echo esc_attr($roleKey); ?>" <?php if (in_array($roleKey, $register_roles)) : ?> checked <?php endif ?> <?php echo $attr; ?> />
130
+                            <?php echo $label; ?></label>
131
+                    </fieldset>
132
+                <?php endforeach; ?>
133
+                <input type="hidden" name="register_roles[]" value=""/>
134
+            </td>
135
+        </tr>
136
+        </tbody>
137
+    </table>
138
+<?php if ($isPRO): ?>
139
+    <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
140
+                             value="<?php _e('Save Changes'); ?>"></p>
141
+<?php endif; ?>

+ 126 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/templates-provider/sync-data.php

@@ -0,0 +1,126 @@
1
+<?php
2
+defined('ABSPATH') || die();
3
+/** @var $this NextendSocialProviderAdmin */
4
+
5
+$provider = $this->getProvider();
6
+
7
+$settings = $provider->settings;
8
+
9
+$isPRO = apply_filters('nsl-pro', false);
10
+
11
+$attr = '';
12
+if (!$isPRO) {
13
+    $attr = ' disabled ';
14
+}
15
+?>
16
+
17
+<div class="nsl-admin-sub-content">
18
+
19
+    <?php
20
+    NextendSocialLoginAdmin::showProBox();
21
+    ?>
22
+
23
+    <form method="post" action="<?php echo admin_url('admin-post.php'); ?>" novalidate="novalidate">
24
+
25
+        <?php wp_nonce_field('nextend-social-login'); ?>
26
+        <input type="hidden" name="action" value="nextend-social-login"/>
27
+        <input type="hidden" name="view" value="provider-<?php echo $provider->getId(); ?>"/>
28
+        <input type="hidden" name="subview" value="sync-data"/>
29
+        <input type="hidden" name="settings_saved" value="1"/>
30
+
31
+        <?php
32
+        $sync_warning_message = apply_filters('nsl_' . $provider->getId() . '_sync_warning', false);
33
+        if (!empty($sync_warning_message)): ?>
34
+            <div class="notice notice-warning">
35
+                <p>
36
+                    <?php echo $sync_warning_message; ?>
37
+                </p>
38
+            </div>
39
+        <?php endif; ?>
40
+
41
+        <table class="form-table">
42
+            <tbody>
43
+            <tr>
44
+                <th scope="row"><label>Sync fields</label></th>
45
+                <td>
46
+                    <fieldset>
47
+                        <label for="sync_fields_register">
48
+                            <input type="checkbox" id="sync_fields_register"
49
+                                   value="1" checked disabled/>
50
+                            <?php _e('Register', 'nextend-facebook-connect'); ?>
51
+                        </label>
52
+                    </fieldset>
53
+                    <fieldset>
54
+                        <label for="sync_fields_login">
55
+                            <input name="sync_fields[login]" type="hidden" value="0"/>
56
+                            <input name="sync_fields[login]" type="checkbox" id="sync_fields_login"
57
+                                   value="1" <?php if ($settings->get('sync_fields/login')): ?> checked<?php endif; ?> <?php echo $attr; ?>/>
58
+                            <?php _e('Login', 'nextend-facebook-connect'); ?>
59
+                        </label>
60
+                    </fieldset>
61
+                    <fieldset>
62
+                        <label for="sync_fields_link">
63
+                            <input name="sync_fields[link]" type="hidden" value="0"/>
64
+                            <input name="sync_fields[link]" type="checkbox" id="sync_fields_link"
65
+                                   value="1" <?php if ($settings->get('sync_fields/link')): ?> checked<?php endif; ?> <?php echo $attr; ?>/>
66
+                            <?php _e('Link', 'nextend-facebook-connect'); ?>
67
+                        </label>
68
+                    </fieldset>
69
+                </td>
70
+            </tr>
71
+            <?php
72
+
73
+            $syncFields = $provider->getSyncFields();
74
+            foreach ($syncFields AS $fieldName => $fieldData):
75
+                ?>
76
+                <tr>
77
+                    <th scope="row"><label for="sync_fields_locale"><?php echo $fieldData['label']; ?></label></th>
78
+                    <td>
79
+                        <fieldset>
80
+                            <label for="sync_fields_<?php echo $fieldName; ?>_enabled">
81
+                                <input name="sync_fields[fields][<?php echo $fieldName; ?>][enabled]" type="hidden" value="0" <?php echo $attr; ?>/>
82
+                                <input name="sync_fields[fields][<?php echo $fieldName; ?>][enabled]" type="checkbox" id="sync_fields_<?php echo $fieldName; ?>_enabled"
83
+                                       value="1" <?php if ($settings->get('sync_fields/fields/' . $fieldName . '/enabled')): ?> checked<?php endif; ?> <?php echo $attr; ?>/>
84
+                                <?php _e('Store in meta key', 'nextend-facebook-connect'); ?>
85
+                            </label>
86
+                            <input name="sync_fields[fields][<?php echo $fieldName; ?>][meta_key]" type="text" id="sync_fields_<?php echo $fieldName; ?>_meta_key"
87
+                                   value="<?php echo esc_attr($settings->get('sync_fields/fields/' . $fieldName . '/meta_key')); ?>" class="regular-text" <?php echo $attr; ?>/>
88
+                        </fieldset>
89
+                        <?php
90
+                        $description = $provider->getSyncDataFieldDescription($fieldName);
91
+                        ?>
92
+                        <?php if (!empty($description)): ?>
93
+                            <p class="description">
94
+                                <?php echo $description; ?>
95
+                            </p>
96
+                        <?php endif; ?>
97
+                    </td>
98
+                </tr>
99
+            <?php endforeach; ?>
100
+            </tbody>
101
+        </table>
102
+        <?php if ($isPRO): ?>
103
+            <p class="submit">
104
+                <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Save Changes'); ?>">
105
+            </p>
106
+        <?php endif; ?>
107
+    </form>
108
+</div>
109
+
110
+<script type="text/javascript">
111
+    (function ($) {
112
+
113
+        $(document).ready(function () {
114
+            var $checkboxes = $('input[type="checkbox"]');
115
+            $checkboxes.on('change', function (e) {
116
+                var $checkbox = $(this);
117
+                $checkbox.closest('td').toggleClass('nsl-admin-setting-disabled', !$checkbox.is(':checked'));
118
+            });
119
+
120
+            $checkboxes.each(function () {
121
+                var $checkbox = $(this);
122
+                $checkbox.closest('td').toggleClass('nsl-admin-setting-disabled', !$checkbox.is(':checked'));
123
+            });
124
+        });
125
+    })(jQuery);
126
+</script>

+ 47 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/templates-provider/usage.php

@@ -0,0 +1,47 @@
1
+<?php
2
+defined('ABSPATH') || die();
3
+/** @var $this NextendSocialProviderAdmin */
4
+
5
+$provider = $this->getProvider();
6
+?>
7
+<div class="nsl-admin-sub-content">
8
+
9
+    <h4><?php _e('Shortcode', 'nextend-facebook-connect'); ?></h4>
10
+
11
+    <p>
12
+        <b><?php _e('Important!', 'nextend-facebook-connect'); ?></b>
13
+        &nbsp;<?php _e('The shortcodes are only rendered for users who haven\'t logged in yet!', 'nextend-facebook-connect'); ?>
14
+        &nbsp;<a href="https://nextendweb.com/nextend-social-login-docs/theme-developer/#shortcode"><?php _e('See the full list of shortcode parameters.', 'nextend-facebook-connect'); ?></a>
15
+    </p>
16
+
17
+    <?php
18
+    $shortcodes = array(
19
+        '[nextend_social_login]',
20
+        '[nextend_social_login provider="' . $provider->getId() . '"]',
21
+        '[nextend_social_login provider="' . $provider->getId() . '" style="icon"]',
22
+        '[nextend_social_login provider="' . $provider->getId() . '" style="icon" redirect="https://nextendweb.com/"]',
23
+        '[nextend_social_login trackerdata="source"]'
24
+    );
25
+    ?>
26
+
27
+    <textarea readonly cols="160" rows="6" class="nextend-html-editor-readonly"
28
+              aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo implode("\n\n", $shortcodes); ?></textarea>
29
+
30
+
31
+    <h4><?php _e('Simple link', 'nextend-facebook-connect'); ?></h4>
32
+
33
+    <?php
34
+    $html = '<a href="' . $provider->getLoginUrl() . '" data-plugin="nsl" data-action="connect" data-redirect="current" data-provider="' . esc_attr($provider->getId()) . '" data-popupwidth="' . $provider->getPopupWidth() . '" data-popupheight="' . $provider->getPopupHeight() . '">' . "\n\t" . __('Click here to login or register', 'nextend-facebook-connect') . "\n" . '</a>';
35
+    ?>
36
+    <textarea readonly cols="160" rows="6" class="nextend-html-editor-readonly"
37
+              aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo esc_textarea($html); ?></textarea>
38
+
39
+    <h4><?php _e('Image button', 'nextend-facebook-connect'); ?></h4>
40
+
41
+    <?php
42
+    $html = '<a href="' . $provider->getLoginUrl() . '" data-plugin="nsl" data-action="connect" data-redirect="current" data-provider="' . esc_attr($provider->getId()) . '" data-popupwidth="' . $provider->getPopupWidth() . '" data-popupheight="' . $provider->getPopupHeight() . '">' . "\n\t" . '<img src="' . __('Image url', 'nextend-facebook-connect') . '" alt="" />' . "\n" . '</a>';
43
+    ?>
44
+    <textarea readonly cols="160" rows="6" class="nextend-html-editor-readonly"
45
+              aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo esc_textarea($html); ?></textarea>
46
+
47
+</div>

+ 66 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/templates/debug.php

@@ -0,0 +1,66 @@
1
+<div class="nsl-admin-content">
2
+    <style>
3
+        .nsl-admin-notices {
4
+            display: none;
5
+        }
6
+    </style>
7
+    <h1 class="title"><?php _e('Debug', 'nextend-facebook-connect'); ?></h1>
8
+    <?php
9
+
10
+
11
+    if (NextendSocialLoginAdmin::isPro()) {
12
+        $activation_data = NextendSocialLogin::getLicense();
13
+
14
+        $proAddonState = NextendSocialLoginAdmin::getProState();
15
+        echo "<p><b>Pro Addon State</b>: " . $proAddonState . "</p>";
16
+
17
+        echo "<p><b>Authorized Domain</b>: " . $activation_data['domain'] . "</p>";
18
+
19
+        $currentDomain = NextendSocialLogin::getDomain();
20
+        echo "<p><b>Current Domain</b>: " . $currentDomain . "</p><br>";
21
+
22
+        $licenseKey = substr($activation_data['license_key'], 0, 8);
23
+        echo "<p><b>License Key</b>: " . $licenseKey . "...</p>";
24
+
25
+        $isLicenseKeyOk = NextendSocialLogin::hasLicense();
26
+        echo "<p><b>License Key OK</b>: " . (boolval($isLicenseKeyOk) ? 'Yes' : 'No') . "</p><br>";
27
+    }
28
+
29
+    $defaultRedirect = NextendSocialLogin::$settings->get('default_redirect');
30
+    echo "<p><b>Default Redirect URL</b>: " . $defaultRedirect . "</p>";
31
+
32
+    $defaultRedirectReg = NextendSocialLogin::$settings->get('default_redirect_reg');
33
+    echo "<p><b>Default Reg Redirect URL</b>: " . $defaultRedirectReg . "</p><br>";
34
+
35
+    $fixRedirect = NextendSocialLogin::$settings->get('redirect');
36
+    echo "<p><b>Fix Redirect URL</b>: " . $fixRedirect . "</p>";
37
+
38
+    $fixRedirectReg = NextendSocialLogin::$settings->get('redirect_reg');
39
+    echo "<p><b>Fix Reg Redirect URL</b>: " . $fixRedirectReg . "</p><br>";
40
+
41
+    echo '<h1>' . __('Test network connection with providers', 'nextend-facebook-connect') . '</h1>';
42
+
43
+    if (!function_exists('curl_init')) {
44
+        ?>
45
+
46
+        <div class="error">
47
+            <p>
48
+                <?php _e('You don\'t have cURL support, please enable it in php.ini!', 'nextend-facebook-connect'); ?>
49
+            </p>
50
+        </div>
51
+
52
+        <?php
53
+    } else {
54
+        foreach (NextendSocialLogin::$allowedProviders AS $provider) {
55
+            ?>
56
+            <p>
57
+                <a target="_blank" href="<?php echo add_query_arg('provider', $provider->getId(), NextendSocialLoginAdmin::getAdminUrl('test-connection')); ?>" class="button button-primary">
58
+                    <?php printf(__('Test %1$s connection', 'nextend-facebook-connect'), $provider->getLabel()); ?>
59
+                </a>
60
+            </p>
61
+            <?php
62
+        }
63
+    }
64
+
65
+    ?>
66
+</div>

+ 40 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/templates/fix-redirect-uri.php

@@ -0,0 +1,40 @@
1
+<div class="nsl-admin-content">
2
+    <h1 class="title"><?php _e('Fix Oauth Redirect URIs', 'nextend-facebook-connect'); ?></h1>
3
+    <?php
4
+    /** @var NextendSocialProvider[] $wrongOauthProviders */
5
+    $wrongOauthProviders = array();
6
+    foreach (NextendSocialLogin::$enabledProviders AS $provider) {
7
+        if (!$provider->checkOauthRedirectUrl()) {
8
+            $wrongOauthProviders[] = $provider;
9
+        }
10
+    }
11
+    ?>
12
+
13
+    <div class="nsl-admin-fix-redirect-uri">
14
+        <?php
15
+        if (count($wrongOauthProviders) === 0) {
16
+            echo '<div class="updated"><p>' . __('Every Oauth Redirect URI seems fine', 'nextend-facebook-connect') . '</p></div>';
17
+
18
+            foreach (NextendSocialLogin::$enabledProviders AS $provider) {
19
+                $provider->getAdmin()
20
+                         ->renderOauthChangedInstruction();
21
+            }
22
+        } else {
23
+            ?>
24
+            <p><?php printf(__('%s detected that your login url changed. You must update the Oauth redirect URIs in the related social applications.', 'nextend-facebook-connect'), '<b>Nextend Social Login</b>'); ?></p>
25
+
26
+            <?php
27
+            foreach ($wrongOauthProviders AS $provider) {
28
+                $provider->getAdmin()
29
+                         ->renderOauthChangedInstruction();
30
+            }
31
+            ?>
32
+
33
+
34
+            <a href="<?php echo wp_nonce_url(NextendSocialLoginAdmin::getAdminUrl('update_oauth_redirect_url'), 'nextend-social-login_update_oauth_redirect_url'); ?>" class="button button-primary">
35
+                <?php _e('Got it', 'nextend-facebook-connect'); ?>
36
+            </a>
37
+
38
+        <?php } ?>
39
+    </div>
40
+</div>

+ 4 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/templates/footer.php

@@ -0,0 +1,4 @@
1
+<?php
2
+defined('ABSPATH') || die();
3
+?>
4
+</div>

+ 0 - 0
app/wp-content/plugins/nextend-facebook-connect/admin/templates/global-settings.php


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels

tmt/tiger_frontend - Gogs: Simplico Git Service

Brak opisu

LICENSE 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. Apache License
  2. Version 2.0, January 2004
  3. http://www.apache.org/licenses/
  4. TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
  5. 1. Definitions.
  6. "License" shall mean the terms and conditions for use, reproduction,
  7. and distribution as defined by Sections 1 through 9 of this document.
  8. "Licensor" shall mean the copyright owner or entity authorized by
  9. the copyright owner that is granting the License.
  10. "Legal Entity" shall mean the union of the acting entity and all
  11. other entities that control, are controlled by, or are under common
  12. control with that entity. For the purposes of this definition,
  13. "control" means (i) the power, direct or indirect, to cause the
  14. direction or management of such entity, whether by contract or
  15. otherwise, or (ii) ownership of fifty percent (50%) or more of the
  16. outstanding shares, or (iii) beneficial ownership of such entity.
  17. "You" (or "Your") shall mean an individual or Legal Entity
  18. exercising permissions granted by this License.
  19. "Source" form shall mean the preferred form for making modifications,
  20. including but not limited to software source code, documentation
  21. source, and configuration files.
  22. "Object" form shall mean any form resulting from mechanical
  23. transformation or translation of a Source form, including but
  24. not limited to compiled object code, generated documentation,
  25. and conversions to other media types.
  26. "Work" shall mean the work of authorship, whether in Source or
  27. Object form, made available under the License, as indicated by a
  28. copyright notice that is included in or attached to the work
  29. (an example is provided in the Appendix below).
  30. "Derivative Works" shall mean any work, whether in Source or Object
  31. form, that is based on (or derived from) the Work and for which the
  32. editorial revisions, annotations, elaborations, or other modifications
  33. represent, as a whole, an original work of authorship. For the purposes
  34. of this License, Derivative Works shall not include works that remain
  35. separable from, or merely link (or bind by name) to the interfaces of,
  36. the Work and Derivative Works thereof.
  37. "Contribution" shall mean any work of authorship, including
  38. the original version of the Work and any modifications or additions
  39. to that Work or Derivative Works thereof, that is intentionally
  40. submitted to Licensor for inclusion in the Work by the copyright owner
  41. or by an individual or Legal Entity authorized to submit on behalf of
  42. the copyright owner. For the purposes of this definition, "submitted"
  43. means any form of electronic, verbal, or written communication sent
  44. to the Licensor or its representatives, including but not limited to
  45. communication on electronic mailing lists, source code control systems,
  46. and issue tracking systems that are managed by, or on behalf of, the
  47. Licensor for the purpose of discussing and improving the Work, but
  48. excluding communication that is conspicuously marked or otherwise
  49. designated in writing by the copyright owner as "Not a Contribution."
  50. "Contributor" shall mean Licensor and any individual or Legal Entity
  51. on behalf of whom a Contribution has been received by Licensor and
  52. subsequently incorporated within the Work.
  53. 2. Grant of Copyright License. Subject to the terms and conditions of
  54. this License, each Contributor hereby grants to You a perpetual,
  55. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  56. copyright license to reproduce, prepare Derivative Works of,
  57. publicly display, publicly perform, sublicense, and distribute the
  58. Work and such Derivative Works in Source or Object form.
  59. 3. Grant of Patent License. Subject to the terms and conditions of
  60. this License, each Contributor hereby grants to You a perpetual,
  61. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  62. (except as stated in this section) patent license to make, have made,
  63. use, offer to sell, sell, import, and otherwise transfer the Work,
  64. where such license applies only to those patent claims licensable
  65. by such Contributor that are necessarily infringed by their
  66. Contribution(s) alone or by combination of their Contribution(s)
  67. with the Work to which such Contribution(s) was submitted. If You
  68. institute patent litigation against any entity (including a
  69. cross-claim or counterclaim in a lawsuit) alleging that the Work
  70. or a Contribution incorporated within the Work constitutes direct
  71. or contributory patent infringement, then any patent licenses
  72. granted to You under this License for that Work shall terminate
  73. as of the date such litigation is filed.
  74. 4. Redistribution. You may reproduce and distribute copies of the
  75. Work or Derivative Works thereof in any medium, with or without
  76. modifications, and in Source or Object form, provided that You
  77. meet the following conditions:
  78. (a) You must give any other recipients of the Work or
  79. Derivative Works a copy of this License; and
  80. (b) You must cause any modified files to carry prominent notices
  81. stating that You changed the files; and
  82. (c) You must retain, in the Source form of any Derivative Works
  83. that You distribute, all copyright, patent, trademark, and
  84. attribution notices from the Source form of the Work,
  85. excluding those notices that do not pertain to any part of
  86. the Derivative Works; and
  87. (d) If the Work includes a "NOTICE" text file as part of its
  88. distribution, then any Derivative Works that You distribute must
  89. include a readable copy of the attribution notices contained
  90. within such NOTICE file, excluding those notices that do not
  91. pertain to any part of the Derivative Works, in at least one
  92. of the following places: within a NOTICE text file distributed
  93. as part of the Derivative Works; within the Source form or
  94. documentation, if provided along with the Derivative Works; or,
  95. within a display generated by the Derivative Works, if and
  96. wherever such third-party notices normally appear. The contents
  97. of the NOTICE file are for informational purposes only and
  98. do not modify the License. You may add Your own attribution
  99. notices within Derivative Works that You distribute, alongside
  100. or as an addendum to the NOTICE text from the Work, provided
  101. that such additional attribution notices cannot be construed
  102. as modifying the License.
  103. You may add Your own copyright statement to Your modifications and
  104. may provide additional or different license terms and conditions
  105. for use, reproduction, or distribution of Your modifications, or
  106. for any such Derivative Works as a whole, provided Your use,
  107. reproduction, and distribution of the Work otherwise complies with
  108. the conditions stated in this License.
  109. 5. Submission of Contributions. Unless You explicitly state otherwise,
  110. any Contribution intentionally submitted for inclusion in the Work
  111. by You to the Licensor shall be under the terms and conditions of
  112. this License, without any additional terms or conditions.
  113. Notwithstanding the above, nothing herein shall supersede or modify
  114. the terms of any separate license agreement you may have executed
  115. with Licensor regarding such Contributions.
  116. 6. Trademarks. This License does not grant permission to use the trade
  117. names, trademarks, service marks, or product names of the Licensor,
  118. except as required for reasonable and customary use in describing the
  119. origin of the Work and reproducing the content of the NOTICE file.
  120. 7. Disclaimer of Warranty. Unless required by applicable law or
  121. agreed to in writing, Licensor provides the Work (and each
  122. Contributor provides its Contributions) on an "AS IS" BASIS,
  123. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  124. implied, including, without limitation, any warranties or conditions
  125. of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
  126. PARTICULAR PURPOSE. You are solely responsible for determining the
  127. appropriateness of using or redistributing the Work and assume any
  128. risks associated with Your exercise of permissions under this License.
  129. 8. Limitation of Liability. In no event and under no legal theory,
  130. whether in tort (including negligence), contract, or otherwise,
  131. unless required by applicable law (such as deliberate and grossly
  132. negligent acts) or agreed to in writing, shall any Contributor be
  133. liable to You for damages, including any direct, indirect, special,
  134. incidental, or consequential damages of any character arising as a
  135. result of this License or out of the use or inability to use the
  136. Work (including but not limited to damages for loss of goodwill,
  137. work stoppage, computer failure or malfunction, or any and all
  138. other commercial damages or losses), even if such Contributor
  139. has been advised of the possibility of such damages.
  140. 9. Accepting Warranty or Additional Liability. While redistributing
  141. the Work or Derivative Works thereof, You may choose to offer,
  142. and charge a fee for, acceptance of support, warranty, indemnity,
  143. or other liability obligations and/or rights consistent with this
  144. License. However, in accepting such obligations, You may act only
  145. on Your own behalf and on Your sole responsibility, not on behalf
  146. of any other Contributor, and only if You agree to indemnify,
  147. defend, and hold each Contributor harmless for any liability
  148. incurred by, or claims asserted against, such Contributor by reason
  149. of your accepting any such warranty or additional liability.
  150. END OF TERMS AND CONDITIONS
  151. APPENDIX: How to apply the Apache License to your work.
  152. To apply the Apache License to your work, attach the following
  153. boilerplate notice, with the fields enclosed by brackets "{}"
  154. replaced with your own identifying information. (Don't include
  155. the brackets!) The text should be enclosed in the appropriate
  156. comment syntax for the file format. We also recommend that a
  157. file or class name and description of purpose be included on the
  158. same "printed page" as the copyright notice for easier
  159. identification within third-party archives.
  160. Copyright {yyyy} {name of copyright owner}
  161. Licensed under the Apache License, Version 2.0 (the "License");
  162. you may not use this file except in compliance with the License.
  163. You may obtain a copy of the License at
  164. http://www.apache.org/licenses/LICENSE-2.0
  165. Unless required by applicable law or agreed to in writing, software
  166. distributed under the License is distributed on an "AS IS" BASIS,
  167. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  168. See the License for the specific language governing permissions and
  169. limitations under the License.