Plugin Directory

Changeset 3394797


Ignore:
Timestamp:
11/13/2025 06:44:38 AM (4 weeks ago)
Author:
naibabiji
Message:

up 2.3

Location:
naiba-coming-soon
Files:
21 added
3 edited

Legend:

Unmodified
Added
Removed
  • naiba-coming-soon/trunk/includes/class-naibabijicsmm-coming-soon.php

    r3390179 r3394797  
    44 *
    55 * @package Naibabiji_Coming_Soon
    6  * @version 2.1
     6 * @version 2.3
    77 * @author Naibabiji
    88 * @copyright 2024 Naibabiji
     
    121121        }
    122122       
     123        // 如果启用了允许登录用户访问,且用户已登录,不显示Coming Soon页面
     124        if (!empty($this->options['allow_logged_in_users']) && is_user_logged_in()) {
     125            return;
     126        }
     127       
    123128        // 检查密码验证
    124129        if (!empty($this->options['password_enabled']) && !empty($this->options['password'])) {
     
    311316       
    312317        add_settings_field(
     318            'allow_logged_in_users',
     319            __('Allow Logged-in Users', 'naiba-coming-soon'),
     320            array($this, 'allow_logged_in_users_callback'),
     321            'naiba-coming-soon',
     322            'naibabijicsmm_password_section'
     323        );
     324       
     325        add_settings_field(
    313326            'password_enabled',
    314327            __('Enable Password Protection', 'naiba-coming-soon'),
     
    371384            $sanitized['content'] = esc_html__('We are working hard to bring you something amazing. Stay tuned!', 'naiba-coming-soon');
    372385        }
     386       
     387        $sanitized['allow_logged_in_users'] = isset($input['allow_logged_in_users']) ? 1 : 0;
    373388       
    374389        $sanitized['password_enabled'] = isset($input['password_enabled']) ? 1 : 0;
     
    502517    }
    503518   
     519    public function allow_logged_in_users_callback() {
     520        $allow_logged_in_users = isset($this->options['allow_logged_in_users']) ? $this->options['allow_logged_in_users'] : 0;
     521        echo '<label class="naibabijicsmm-switch">';
     522        echo '<input type="checkbox" id="allow_logged_in_users" name="naibabijicsmm_options[allow_logged_in_users]" value="1" ' . checked(1, $allow_logged_in_users, false) . ' />';
     523        echo '<span class="naibabijicsmm-slider"></span>';
     524        echo '</label>';
     525        echo '<p class="description">' . esc_html__('When enabled, all logged-in users can access the website without any permission check', 'naiba-coming-soon') . '</p>';
     526    }
     527   
    504528    public function password_enabled_callback() {
    505529        $password_enabled = isset($this->options['password_enabled']) ? $this->options['password_enabled'] : 0;
  • naiba-coming-soon/trunk/naiba-coming-soon.php

    r3390179 r3394797  
    44 * Plugin URI: https://blog.naibabiji.com/
    55 * Description: A professional Coming Soon and Maintenance Mode plugin with password protection and multi-language support. Perfect for websites under development or maintenance.
    6  * Version: 2.2
     6 * Version: 2.3
    77 * Requires at least: 5.0
    88 * Requires PHP: 7.4
     
    1515 *
    1616 * @package Naibabiji_Coming_Soon
    17  * @version 2.2
     17 * @version 2.3
    1818 * @author Naibabiji
    1919 * @copyright 2024 Naibabiji
     
    3030
    3131// 定义插件常量
    32 define('NAIBABIJICSMM_VERSION', '2.2');
     32define('NAIBABIJICSMM_VERSION', '2.3');
    3333define('NAIBABIJICSMM_PLUGIN_DIR', plugin_dir_path(__FILE__));
    3434define('NAIBABIJICSMM_PLUGIN_URL', plugin_dir_url(__FILE__));
  • naiba-coming-soon/trunk/readme.txt

    r3390179 r3394797  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 2.2
     7Stable tag: 2.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    136136
    137137== Changelog ==
     138
     139= 2.3 =
     140* **New Feature** - Added "Allow Logged-in Users" option to grant access to all logged-in users without permission check
     141* **Access Control Enhancement** - Logged-in users can now bypass Coming Soon page when the option is enabled
     142* **Flexibility Improvement** - Provides more granular access control options for different user scenarios
     143* **User Experience** - Simplifies access management for membership sites and private communities
     144* **Settings Organization** - New option integrated seamlessly into the Password Protection Settings section
    138145
    139146= 2.2 =
Note: See TracChangeset for help on using the changeset viewer.