s-code">
+        $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


部分文件因文件數量過多而無法顯示

user profile · e5d90dc5de - Gogs: Simplico Git Service
tum před 1 rokem
rodič
revize
e5d90dc5de

+ 23 - 0
recycle/userprofile/migrations/0002_alter_userprofile_photos_and_more.py

@@ -0,0 +1,23 @@
1
+# Generated by Django 4.2.14 on 2024-07-28 14:55
2
+
3
+from django.db import migrations, models
4
+
5
+
6
+class Migration(migrations.Migration):
7
+
8
+    dependencies = [
9
+        ('userprofile', '0001_initial'),
10
+    ]
11
+
12
+    operations = [
13
+        migrations.AlterField(
14
+            model_name='userprofile',
15
+            name='photos',
16
+            field=models.ImageField(blank=True, null=True, upload_to='user_photos/%Y/%m/%d/'),
17
+        ),
18
+        migrations.AlterField(
19
+            model_name='userprofile',
20
+            name='upload_documents',
21
+            field=models.FileField(blank=True, null=True, upload_to='user_documents//%Y/%m/%d/'),
22
+        ),
23
+    ]