uage-php">+ <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


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor

tum/recycle_server - Gogs: Simplico Git Service

Нема описа