Plugin Directory

Changeset 3828805


Ignore:
Timestamp:
11/27/2026 06:38:58 AM (less than one hour ago)
Author:
okvee
Message:

v1.7.8

Location:
okv-oauth
Files:
121 added
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • okv-oauth/trunk/App/Controllers/Admin/HookNetworkSettings.php

    r3499942 r3828805  
    2828                $this->init();
    2929
    30                 wp_enqueue_script('okv-oauth-admin-network-settings', plugin_dir_url(OKVOAUTH_FILE) . 'assets/js/Admin/rd-oauth-adminnetworksettings.js', ['jquery'], OKVOAUTH_VERSION, true);
     30                $admin_network_settings_handle = 'okv-oauth-admin-network-settings';
     31                wp_enqueue_script(
     32                    $admin_network_settings_handle,
     33                    plugin_dir_url(OKVOAUTH_FILE) . 'assets/js/Admin/rd-oauth-adminnetworksettings.js',
     34                    [],
     35                    OKVOAUTH_VERSION,
     36                    true
     37                );
    3138                wp_localize_script(
    32                     'okv-oauth-admin-network-settings',
     39                    $admin_network_settings_handle,
    3340                    'RdOauthAdminNetworkSettings',
    3441                    [
    … …  
    3643                    ]
    3744                );
     45                unset($admin_network_settings_handle);
    3846            }
    3947        }// adminEnqueueScripts
    … …  
    5159        public function FilterUpdateSiteRegistration($value, $old_value, $option, $network_id)
    5260        {
     61            if ('registration' !== $option) {
     62                return $value;
     63            }
     64
    5365            $this->init();
    5466
    5567            if (2 === $this->loginMethod) {
    5668                // if settings was set to use oauth only.
    57                 // cannot allow register form to register user and blog
    58                 // because user can register any email that is not oauth user
     69                // cannot allow register form to **register user and blog**
     70                // because oauth registration button will not work with site register and
     71                // if user email field is allowed, users can register any email that is not oauth user
    5972                // but cannot login with [oauth only login form].
    60                 $value = 'blog';
     73                if ('all' === $value) {
     74                    $value = 'user';
     75                }
    6176            }
    6277
  • okv-oauth/trunk/App/Controllers/Front/HookLoginPage.php

    r3626100 r3828805  
    275275                    case 'lostpassword':
    276276                        if (2 === $this->loginMethod) {
    277                             wp_enqueue_script('okv-oauth-lostpassword', plugin_dir_url(OKVOAUTH_FILE) . 'assets/js/rd-oauth-lostpassword.js', ['jquery'], OKVOAUTH_VERSION, true);
     277                            $lost_password_handle = 'okv-oauth-lostpassword';
     278                            wp_enqueue_script(
     279                                $lost_password_handle,
     280                                plugin_dir_url(OKVOAUTH_FILE) . 'assets/js/rd-oauth-lostpassword.js',
     281                                [],
     282                                OKVOAUTH_VERSION,
     283                                true
     284                            );
    278285                            wp_localize_script(
    279                                 'okv-oauth-lostpassword',
     286                                $lost_password_handle,
    280287                                'RdOauthLostPassword',
    281288                                [
    … …  
    283290                                ]
    284291                            );
     292                            unset($lost_password_handle);
    285293                        }
    286294                        break;
    … …  
    298306                if (isset($action) && 'register' === $action) {
    299307                    // if in register page.
    300                     wp_enqueue_script('okv-oauth-register', plugin_dir_url(OKVOAUTH_FILE) . 'assets/js/rd-oauth-register.js', ['jquery'], OKVOAUTH_VERSION, true);
     308                    $register_handle = 'okv-oauth-register';
     309                    wp_enqueue_script(
     310                        $register_handle,
     311                        plugin_dir_url(OKVOAUTH_FILE) . 'assets/js/rd-oauth-register.js',
     312                        [],
     313                        OKVOAUTH_VERSION,
     314                        true
     315                    );
    301316                    wp_localize_script(
    302                         'okv-oauth-register',
     317                        $register_handle,
    303318                        'RdOauthRegister',
    304319                        [
    … …  
    306321                        ]
    307322                    );
     323                    unset($register_handle);
    308324                } elseif (isset($action) && 'login' === $action) {
    309325                    // if in login page.
    310                     wp_enqueue_script('okv-oauth-login-js', plugin_dir_url(OKVOAUTH_FILE) . 'assets/js/rd-oauth-login.js', ['jquery'], OKVOAUTH_VERSION, true);
     326                    $login_handle = 'okv-oauth-login-js';
     327                    wp_enqueue_script(
     328                        $login_handle,
     329                        plugin_dir_url(OKVOAUTH_FILE) . 'assets/js/rd-oauth-login.js',
     330                        [],
     331                        OKVOAUTH_VERSION,
     332                        true
     333                    );
    311334                    wp_localize_script(
    312                         'okv-oauth-login-js',
     335                        $login_handle,
    313336                        'RdOauthLogin',
    314337                        [
    … …  
    316339                        ]
    317340                    );
     341                    unset($login_handle);
    318342                }
    319343            }
    … …  
    341365            }
    342366        }// loginForm
    343 
    344 
    345         /**
    346          * Change URL of login logo.
    347          *
    348          * @link https://codex.wordpress.org/Plugin_API/Filter_Reference/login_headerurl Reference.
    349          * @return string
    350          */
    351         public function loginHeaderUrl()
    352         {
    353             return home_url();
    354         }// loginHeaderUrl
    355367
    356368
    … …  
    409421                    [
    410422                        'okv_oauth_options' => $okv_oauth_options,
    411                         'oauthProviders' => $this->oauthProviders,
    412                         'active_signup' => $active_signup,
    413423                    ]
    414424                );
    … …  
    430440            // add css to login page.
    431441            add_action('login_enqueue_scripts', [$this, 'loginEnqueueScripts']);
    432             // change login url on the logo.
    433             add_filter('login_headerurl', [$this, 'loginHeaderUrl']);
    434442
    435443            // register page. -------------------------------------------------------------------
    … …  
    675683            $providers = $OAuthProviders->getAllClasses();
    676684            unset($OAuthProviders);
    677             if (is_iterable($providers)) {
     685            if (is_array($providers)) {
    678686                foreach ($providers as $providerKey => $OAuthClass) {
    679687                    /* @var $OAuthClass \OKVOauth\App\Libraries\MyOauth\Interfaces\MyOAuthInterface */
    … …  
    724732            wp_enqueue_style('okv-oauth-login-css');
    725733            wp_enqueue_style('okv-oauth-font-awesome6');
    726             wp_enqueue_script('okv-oauth-wpsignup', plugin_dir_url(OKVOAUTH_FILE) . 'assets/js/rd-oauth-wpsignup.js', ['jquery'], OKVOAUTH_VERSION, true);
    727             $active_signup = get_site_option('registration', 'none');// 'all', 'none', 'blog', or 'user'
     734            $handle_signup = 'okv-oauth-wpsignup';
     735            wp_enqueue_script(
     736                $handle_signup,
     737                plugin_dir_url(OKVOAUTH_FILE) . 'assets/js/rd-oauth-wpsignup.js',
     738                [],
     739                OKVOAUTH_VERSION,
     740                true
     741            );
    728742            wp_localize_script(
    729                 'okv-oauth-wpsignup',
     743                $handle_signup,
    730744                'RdOauthRegister',
    731745                [
    732                     'active_signup' => $active_signup,
     746                    'active_signup' => get_site_option('registration', 'none'),// 'all', 'none', 'blog', or 'user'
    733747                    'loginMethod' => $this->loginMethod,
    734748                ]
    735749            );
     750            unset($handle_signup);
    736751        }// wpSignupEnqueueScripts
    737752
  • okv-oauth/trunk/App/Libraries/RundizOauth.php

    r3488365 r3828805  
    2828
    2929        /**
    30          * @var array The oAuth providers that was enabled in the settings will appears here in the array value. Example: array('google', 'facebook');
    31          */
    32         public $oauthProviders = [];
    33 
    34 
    35         /**
    3630         * @var bool If settings to use wp login with oauth or oauth only then this value will be true.
    3731         */
    … …  
    5549
    5650            global $okv_oauth_options;
     51            $oauthProviders = [];
    5752
    5853            if (is_array($okv_oauth_options)) {
    … …  
    7772                        !empty($okv_oauth_options['google_client_secret'])
    7873                    ) {
    79                         $this->oauthProviders[] = 'google';
     74                        $oauthProviders[] = 'google';
    8075                    }
    8176                    if (
    … …  
    8782                        !empty($okv_oauth_options['facebook_app_secret'])
    8883                    ) {
    89                         $this->oauthProviders[] = 'facebook';
     84                        $oauthProviders[] = 'facebook';
     85                    }
     86                    if (
     87                        array_key_exists('linenaver_login_enable', $okv_oauth_options) &&
     88                        array_key_exists('linenaver_channel_id', $okv_oauth_options) &&
     89                        array_key_exists('linenaver_channel_secret', $okv_oauth_options) &&
     90                        '1' === strval($okv_oauth_options['linenaver_login_enable']) &&
     91                        !empty($okv_oauth_options['linenaver_channel_id']) &&
     92                        !empty($okv_oauth_options['linenaver_channel_secret'])
     93                    ) {
     94                        $oauthProviders[] = 'linenaver';
    9095                    }
    9196
    9297                    // at last, verify that if login method is set to use oauth only and providers was set.
    93                     if (2 === $this->loginMethod && empty($this->oauthProviders)) {
     98                    if (2 === $this->loginMethod && empty($oauthProviders)) {
    9499                        // if login method is using oauth only and providers was not set (maybe not enabled or missed config values).
    95100                        // change login method to 1
  • okv-oauth/trunk/assets/js/Admin/rd-oauth-adminnetworksettings.js

    r3499942 r3828805  
    66
    77
    8 jQuery(function($) {
     8document.addEventListener('DOMContentLoaded', () => {
    99    if (RdOauthAdminNetworkSettings.loginMethod === '2') {
    1010        // if settings is use oauth only.
    1111        // remove option that is "Both sites and user accounts can be registered".
    12         $('label:has(#registration4)').remove();
     12        document.querySelectorAll('label:has(#registration4)')?.forEach((item) => {
     13            item.remove();
     14        });
    1315    }
    1416});
  • okv-oauth/trunk/assets/js/rd-oauth-login.js

    r2206594 r3828805  
    44
    55
    6 function rdOauthGetParameterByName(name, url) {
    7     if (!url) url = window.location.href;
    8     name = name.replace(/[\[\]]/g, "\\$&");
    9     var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
    10         results = regex.exec(url);
    11     if (!results) return null;
    12     if (!results[2]) return '';
    13     return decodeURIComponent(results[2].replace(/\+/g, " "));
     6/**
     7 * Get the value of a query string parameter by name from the current page URL.
     8 *
     9 * @since 1.0.0
     10 * @param {string} name The query parameter name to look for.
     11 * @returns {string|null} The decoded parameter value, an empty string if the name is present without a value, or null if not found.
     12 */
     13function rdOauthGetParameterByName(name) {
     14    const params = new URLSearchParams(window.location.search);
     15    if (!params.has(name)) {
     16        return null;
     17    }
     18    return params.get(name);
    1419}// rdOauthGetParameterByName
    1520
    1621
    17 jQuery(function($) {
     22document.addEventListener('DOMContentLoaded', () => {
     23    const loginForm = document.getElementById('loginform');
     24
    1825    if (RdOauthLogin.loginMethod === '1') {
    19         // use wp login + oauth.
     26        // if use wp login + oauth.
    2027        // move those social login btn to top.
    21         $('#loginform').find('.rd-oauth-form').prependTo('#loginform');
     28        loginForm.querySelectorAll('.rd-oauth-form').forEach((form) => {
     29            loginForm.prepend(form);
     30        });
    2231    } else if (RdOauthLogin.loginMethod === '2') {
    23         // use oauth only.
     32        // if use oauth only.
     33        const navElement = document.getElementById('nav');
     34
    2435        if (rdOauthGetParameterByName('checkemail') === 'registered') {
    25             // registration completed page.
    26             $('#loginform').remove();
     36            // if in registration completed page.
     37            loginForm.remove();
    2738        } else {
    28             $('#loginform').addClass('oauth-only');
     39            loginForm.classList.add('oauth-only');
    2940            // remove login form.
    30             $('#loginform').find('p:has(label)').remove();
     41            loginForm.querySelectorAll('p:has(label)')?.forEach((item) => {
     42                item.remove();
     43            });
    3144            // remove password form.
    32             $('#loginform .user-pass-wrap').remove();
     45            loginForm.querySelectorAll('.user-pass-wrap')?.forEach((item) => {
     46                item.remove();
     47            });
    3348            // remove remember me form and submit btn
    34             $('#loginform').find('.forgetmenot, .submit').remove();
     49            loginForm.querySelectorAll('.forgetmenot, .submit')?.forEach((item) => {
     50                item.remove();
     51            });
     52
     53            // remove forgot password link.
     54            document.querySelectorAll('.wp-login-lost-password')?.forEach((item) => {
     55                item.remove();
     56            });
     57            // remove forgot password link same as above but for fallback on older WP version.
     58            navElement?.querySelectorAll('a')?.forEach((item) => {
     59                if (item.href && item.href.indexOf('lostpassword') !== -1) {
     60                    item.remove();
     61                }
     62            });
     63
     64            // after remove forgot password link, there may have the last character as `|`.
     65            // example: `Login | Forgot password` becomes => `Login |`.
     66            // remove the last character.
     67            // @link https://stackoverflow.com/a/32516190/128761 Original source code.
     68            const navHtmlString = navElement.innerHTML.trim();
     69            const trimLastSep = navHtmlString.replace(/^\|+|\|+$/g, '');
     70            navElement.innerHTML = trimLastSep;
    3571        }
    36 
    37         // remove forgot password link.
    38         $('#nav a').each(function() {
    39             if (this.href && this.href.indexOf('lostpassword') !== -1) {
    40                 this.remove();
    41             }
    42         });
    43         // trim last character.
    44         // example: "Login |" will be "Login"
    45         // https://stackoverflow.com/a/32516190/128761 original source code.
    46         let navHtml = ($('#nav').html()).trim();
    47         let trimLastSep = navHtml.replace(/^\|+|\|+$/g, '');
    48         $('#nav').html(trimLastSep);
    49     }
     72    }// endif; login method.
    5073});
  • okv-oauth/trunk/assets/js/rd-oauth-lostpassword.js

    r2206594 r3828805  
    44
    55
    6 jQuery(function($) {
    7     // display error on lost password form.
    8     $('#lostpasswordform').find('.error-message').insertBefore('#lostpasswordform');
     6document.addEventListener('DOMContentLoaded', () => {
     7    const lostPasswordForm = document.getElementById('lostpasswordform');
    98
    10     // if okvoauth_login_method = 2 (use oauth only)
     9    if (lostPasswordForm) {
     10        lostPasswordForm.querySelectorAll('.error-message').forEach((message) => {
     11            lostPasswordForm.before(message);
     12        });
     13    }
     14
    1115    if (typeof(RdOauthLostPassword.loginMethod) != 'undefined' && RdOauthLostPassword.loginMethod === '2') {
     16        // if okvoauth_login_method = 2 (use oauth only)
    1217        // hide default instruction message.
    13         $('.message').remove();
     18        document.querySelectorAll('.message')?.forEach((eachMsg) => {
     19            eachMsg.remove();
     20        });
    1421
    15         $('#lostpasswordform').addClass('oauth-only').hide();
    16         // remove login form.
    17         $('#lostpasswordform').find('p:has(label)').remove();
    18         // remove submit btn
    19         $('#lostpasswordform').find('.submit').remove();
     22        if (lostPasswordForm) {
     23            // hide login (lost password) form.
     24            lostPasswordForm.classList.add('oauth-only');
     25            lostPasswordForm.style.display = 'none';
    2026
    21         // remove register link
    22         /*$('#nav a').each(function() {
    23             if (this.href && this.href.indexOf('register') !== -1) {
    24                 this.remove();
    25             }
    26         });
    27         // trim last character.
    28         // example: "Login |" will be "Login"
    29         // https://stackoverflow.com/a/32516190/128761 original source code.
    30         let navHtml = ($('#nav').html()).trim();
    31         let trimLastSep = navHtml.replace(/^\|+|\|+$/g, '');
    32         $('#nav').html(trimLastSep);*/// register link will be remove only from WP admin settings.
    33     }
     27            // remove login form field.
     28            lostPasswordForm.querySelectorAll('p:has(label)')?.forEach((item) => {
     29                item.remove();
     30            });
     31            // remove submit btn
     32            lostPasswordForm.querySelectorAll('.submit')?.forEach((item) => {
     33                item.remove();
     34            });
     35        }
     36    }// endif; login method oauth only.
    3437});
  • okv-oauth/trunk/assets/js/rd-oauth-register.js

    r2206594 r3828805  
    44
    55
    6 jQuery(function($) {
    7     // move those social login btn to top.
    8     $('#registerform').find('.rd-oauth-form').prependTo('#registerform');
    9     // move error message to below generic message.
    10     $('#registerform').find('.error-message').insertAfter($('.message'));
     6document.addEventListener('DOMContentLoaded', () => {
     7    const registerForm = document.getElementById('registerform');
    118
    12     if (RdOauthRegister.loginMethod === '1') {
    13         // use wp login + oauth.
    14     } else if (RdOauthRegister.loginMethod === '2') {
    15         // use oauth only.
    16         $('#registerform').addClass('oauth-only');
    17         // remove register form
    18         $('#registerform').find('p:has(label)').remove();
    19         // remove register message (register confirmation will be ...), button.
    20         $('#registerform').find('#reg_passmail, .clear, .submit').remove();
     9    if (registerForm) {
     10        // move those social login btn to top.
     11        registerForm.querySelectorAll('.rd-oauth-form').forEach((form) => {
     12            registerForm.prepend(form);
     13        });
     14        // move error message to below generic message.
     15        const registerMessage = document.querySelector('.message');
     16        if (registerMessage) {
     17            registerForm.querySelectorAll('.error-message').forEach((error) => {
     18                registerMessage.after(error);
     19            });
     20        }
     21        const navElement = document.getElementById('nav');
    2122
    22         // remove forgot password link.
    23         $('#nav a').each(function() {
    24             if (this.href && this.href.indexOf('lostpassword') !== -1) {
    25                 this.remove();
     23        if (RdOauthRegister.loginMethod === '1') {
     24            // use wp login + oauth.
     25        } else if (RdOauthRegister.loginMethod === '2') {
     26            // use oauth only.
     27            if (registerForm) {
     28                // use oauth only.
     29                registerForm.classList.add('oauth-only');
     30                // remove register form
     31                registerForm.querySelectorAll('p:has(label)')?.forEach((item) => {
     32                    item.remove();
     33                });
     34                // remove register message (register confirmation will be ...), button.
     35                registerForm.querySelectorAll('#reg_passmail, .clear, .submit').forEach((item) => {
     36                    item.remove();
     37                });
     38
     39                // remove forgot password link.
     40                document.querySelectorAll('.wp-login-lost-password')?.forEach((item) => {
     41                    item.remove();
     42                });
     43                // remove forgot password link same as above but for fallback on older WP version.
     44                navElement?.querySelectorAll('a')?.forEach((item) => {
     45                    if (item.href && item.href.indexOf('lostpassword') !== -1) {
     46                        item.remove();
     47                    }
     48                });
     49
     50                // after remove forgot password link, there may have the last character as `|`.
     51                // example: `Login | Forgot password` becomes => `Login |`.
     52                // remove the last character.
     53                // @link https://stackoverflow.com/a/32516190/128761 Original source code.
     54                const navHtmlString = navElement.innerHTML.trim();
     55                const trimLastSep = navHtmlString.replace(/^\|+|\|+$/g, '');
     56                navElement.innerHTML = trimLastSep;
    2657            }
    27         });
    28         // trim last character.
    29         // example: "Login |" will be "Login"
    30         // https://stackoverflow.com/a/32516190/128761 original source code.
    31         let navHtml = ($('#nav').html()).trim();
    32         let trimLastSep = navHtml.replace(/^\|+|\|+$/g, '');
    33         $('#nav').html(trimLastSep);
    34     }
     58        }// endif; oauth only.
     59    }// endif; registerform
    3560});
  • okv-oauth/trunk/assets/js/rd-oauth-wpsignup.js

    r2206594 r3828805  
    44
    55
    6 jQuery(function($) {
    7     // move those social login btn to top.
    8     $('#setupform').find('.rd-oauth-form').insertBefore('#setupform');
    9     // move error message to below generic message.
    10     $('#setupform').find('.error-message').insertAfter($('.message'));
     6document.addEventListener('DOMContentLoaded', () => {
     7    const setupForm = document.getElementById('setupform');
     8    if (setupForm) {
     9        // move those social login btn to top.
     10        setupForm.querySelectorAll('.rd-oauth-form').forEach(oauthForm => {
     11            setupForm.before(oauthForm);
     12        });
     13
     14        // move error message to below generic message.
     15        const messageEl = document.querySelector('.message');
     16        setupForm.querySelectorAll('.error-message').forEach(eachMessage => {
     17            messageEl.after(eachMessage)
     18        });
     19    }// endif;
    1120
    1221    if (RdOauthRegister.loginMethod === '1') {
    … …  
    1423    } else if (RdOauthRegister.loginMethod === '2') {
    1524        // use oauth only.
    16         $('#setupform').addClass('oauth-only');
     25        if (setupForm) {
     26            setupForm.classList.add('oauth-only');
    1727
    18         if (RdOauthRegister.active_signup === 'user') {
    19             // if allow register for user only.
    20             // remove register form
    21             $('#setupform').html('');
    22         } else if (RdOauthRegister.active_signup === 'all') {
    23             // if allow register user and blog.
    24             // remove "Just a username please" option.
    25             $('#setupform #signupuser').remove();
    26             $('#setupform label[for="signupuser"]').remove();
    27             // force select radio to "Gimme a site!"
    28             $('#setupform #signupblog').prop('checked', 'checked');
    29             $('#setupform #signupblog').attr('checked', 'checked');
     28            if (RdOauthRegister.active_signup === 'user') {
     29                // if allow register for user only.
     30                // remove register form
     31                setupForm.innerHTML = '';
     32            } else if (RdOauthRegister.active_signup === 'all') {
     33                // if allow register user and blog.
     34                // remove "Just a username please" option.
     35                setupForm.querySelector('#signupuser')?.remove();
     36                setupForm.querySelector('label[for="signupuser"]')?.remove();
     37                // force select radio to "Gimme a site!"
     38                setupForm.querySelector('#signupblog').checked = true;
     39            }
    3040        }
    31     }
     41    }// endif;
    3242});
  • okv-oauth/trunk/okv-oauth.php

    r3659421 r3828805  
    44 * Plugin URI: https://rundiz.com/?p=319
    55 * Description: Use OAuth such as Google, LINE to login and register.
    6  * Version: 1.7.7
     6 * Version: 1.7.8
    77 * Requires at least: 5.0
    88 * Requires PHP: 5.4
  • okv-oauth/trunk/readme.txt

    r3659421 r3828805  
    22Contributors: okvee
    33Tags: oauth, google, social login, social connect
    4 Tested up to: 7.1
     4Tested up to: 7.2
    55Requires at least: 5.0
    66Requires PHP: 5.4
    7 Stable tag: 1.7.7
     7Stable tag: 1.7.8
    88License: MIT
    99License URI: https://opensource.org/licenses/MIT
    … …  
    2626Please <a href="https://rundiz.com/en/donate" target="donate">donate</a> to support the developer.
    2727
    28 Tested up to PHP 8.5.
     28Tested up to PHP 8.6.
    2929
    3030Original source of the block(s) is on GitHub. ( https://github.com/Rundiz-WP/okv-oauth )
    … …  
    5858
    5959== Changelog ==
     60= 1.7.8 =
     612026-11-27
     62
     63* Removed hook to change login header URL. There is no setting about this so it should not work by force.
     64* Modernize JavaScript to not depend on jQuery.
     65
    6066= 1.7.7 =
    61672026-08-21
  • okv-oauth/trunk/templates/okv-oauth/partials/lostPasswordForm_v.php

    r3488365 r3828805  
    1818}
    1919?>
    20 <div class="error-message" id="login_error"><p><?php
     20<div id="login_error" class="error-message notice notice-info"><p><?php
    2121echo wp_kses(
    2222    \OKVOauth\App\Libraries\ErrorsCollection::getErrorMessage('originalforgotpwdisabled'),
  • okv-oauth/trunk/templates/okv-oauth/partials/registerForm_v.php

    r3488365 r3828805  
    99
    1010
     11/** @var array $okv_oauth_options The app main options that have values stored in the DB. */
     12
     13
    1114if (!defined('ABSPATH')) {
    1215    exit();
    1316}
     17
    1418
    1519$okv_oauth_kses_file = dirname(OKVOAUTH_FILE) . '/App/config/kses_data.php';
    … …  
    3842        $okv_oauth_classes = $okv_oauth_OauthProviders->getClasses($okv_oauth_options);
    3943        unset($okv_oauth_OauthProviders);
    40         if (is_iterable($okv_oauth_classes)) {
     44        if (is_array($okv_oauth_classes)) {
    4145            foreach ($okv_oauth_classes as $okv_oauth_providerKey => $okv_oauth_OAuthClass) {
    4246        ?>
    … …  
    4953            }// endforeach;
    5054            unset($okv_oauth_providerKey, $okv_oauth_OAuthClass);
    51         }// endif; is_iterable
     55        }// endif; is_array
    5256        unset($okv_oauth_classes);
    5357        ?>
Note: See TracChangeset for help on using the changeset viewer.