Plugin Directory

Changeset 3476230


Ignore:
Timestamp:
03/06/2026 09:45:39 AM (37 hours ago)
Author:
sakibsnaz
Message:

Deploy major update 1.1.0: Added custom headline and message support

Location:
sakibsnaz-light-maintenance-mode
Files:
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • sakibsnaz-light-maintenance-mode/tags/1.1.0/readme.txt

    r3441766 r3476230  
    66Tested up to: 6.9
    77Requires PHP: 7.2
    8 Stable tag: 1.0.1
     8Stable tag: 1.1.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3131**Features:**
    3232* Enable/disable maintenance mode with one checkbox.
    33 * Displays "Site Under Maintenance" message.
     33* **NEW: Custom headline and maintenance message support.**
     34* Displays "Site Under Maintenance" message by default.
    3435* Shows your admin email as a clickable contact link.
    3536* Returns proper HTTP 503 status (good for SEO).
     
    6667== Changelog ==
    6768
     69= 1.1.0 =
     70* Major Update: Added support for custom headlines and maintenance messages.
     71* Security: Improved sanitization for custom fields.
     72
    6873= 1.0.1 =
    6974* Added modern CSS styling to the maintenance page.
     
    7580== Upgrade Notice ==
    7681
    77 = 1.0.1 =
    78 New modern UI for the maintenance page. Highly recommended.
     82= 1.1.0 =
     83Added support for custom headlines and messages. Highly recommended.
  • sakibsnaz-light-maintenance-mode/tags/1.1.0/sakibsnaz-light-maintenance-mode.php

    r3476220 r3476230  
    44 * Plugin URI:  https://www.lightmaintenance.site/
    55 * Description: A lightweight plugin to enable a simple maintenance/coming soon page with one click.
    6  * Version:     1.0.1
     6 * Version:     1.1.0
    77 * Author:      Sakib MD Nazmush
    88 * Author URI:  https://sakibmdnazmush.vercel.app
     
    3131    if (slmm_is_enabled() && !current_user_can('manage_options') && !is_admin()) {
    3232        $admin_email = get_option('admin_email');
     33        $headline    = get_option('slmm_headline', __('We’ll Be Right Back!', 'sakibsnaz-light-maintenance-mode'));
     34        $message     = get_option('slmm_message', __('Our site is currently undergoing scheduled maintenance to improve your experience. Please check back soon.', 'sakibsnaz-light-maintenance-mode'));
     35
     36        // Fallback to defaults if options are empty strings
     37        if (empty($headline)) {
     38            $headline = __('We’ll Be Right Back!', 'sakibsnaz-light-maintenance-mode');
     39        }
     40        if (empty($message)) {
     41            $message = __('Our site is currently undergoing scheduled maintenance to improve your experience. Please check back soon.', 'sakibsnaz-light-maintenance-mode');
     42        }
    3343
    3444        // Use a 503 Service Unavailable header for SEO
     
    4353            <meta charset="<?php bloginfo('charset'); ?>">
    4454            <meta name="viewport" content="width=device-width, initial-scale=1">
    45             <title><?php esc_html_e('Site Under Maintenance', 'sakibsnaz-light-maintenance-mode'); ?></title>
     55            <title><?php echo esc_html($headline); ?></title>
    4656            <style>
    4757                body {
     
    102112            <div class="container">
    103113                <div class="icon">🚧</div>
    104                 <h1><?php esc_html_e('We’ll Be Right Back!', 'sakibsnaz-light-maintenance-mode'); ?></h1>
    105                 <p><?php esc_html_e('Our site is currently undergoing scheduled maintenance to improve your experience. Please check back soon.', 'sakibsnaz-light-maintenance-mode'); ?>
    106                 </p>
     114                <h1><?php echo esc_html($headline); ?></h1>
     115                <p><?php echo esc_html($message); ?></p>
    107116
    108117                <?php if ($admin_email): ?>
     
    147156        'sanitize_callback' => 'rest_sanitize_boolean',
    148157        'default' => false,
     158    ));
     159
     160    register_setting('slmm_settings_group', 'slmm_headline', array(
     161        'type' => 'string',
     162        'sanitize_callback' => 'sanitize_text_field',
     163        'default' => '',
     164    ));
     165
     166    register_setting('slmm_settings_group', 'slmm_message', array(
     167        'type' => 'string',
     168        'sanitize_callback' => 'sanitize_textarea_field',
     169        'default' => '',
    149170    ));
    150171}
     
    171192                    </td>
    172193                </tr>
     194                <tr>
     195                    <th scope="row"><?php esc_html_e('Custom Headline', 'sakibsnaz-light-maintenance-mode'); ?></th>
     196                    <td>
     197                        <input type="text" name="slmm_headline" value="<?php echo esc_attr(get_option('slmm_headline')); ?>" class="regular-text" placeholder="<?php esc_attr_e('We’ll Be Right Back!', 'sakibsnaz-light-maintenance-mode'); ?>" />
     198                        <p class="description">
     199                            <?php esc_html_e('The main heading displayed on the maintenance page.', 'sakibsnaz-light-maintenance-mode'); ?>
     200                        </p>
     201                    </td>
     202                </tr>
     203                <tr>
     204                    <th scope="row"><?php esc_html_e('Custom Message', 'sakibsnaz-light-maintenance-mode'); ?></th>
     205                    <td>
     206                        <textarea name="slmm_message" rows="5" cols="50" class="large-text" placeholder="<?php esc_attr_e('Our site is currently undergoing scheduled maintenance to improve your experience. Please check back soon.', 'sakibsnaz-light-maintenance-mode'); ?>"><?php echo esc_textarea(get_option('slmm_message')); ?></textarea>
     207                        <p class="description">
     208                            <?php esc_html_e('A detailed message explaining the maintenance to your visitors.', 'sakibsnaz-light-maintenance-mode'); ?>
     209                        </p>
     210                    </td>
     211                </tr>
    173212            </table>
    174213            <?php submit_button(); ?>
  • sakibsnaz-light-maintenance-mode/trunk/readme.txt

    r3441766 r3476230  
    66Tested up to: 6.9
    77Requires PHP: 7.2
    8 Stable tag: 1.0.1
     8Stable tag: 1.1.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3131**Features:**
    3232* Enable/disable maintenance mode with one checkbox.
    33 * Displays "Site Under Maintenance" message.
     33* **NEW: Custom headline and maintenance message support.**
     34* Displays "Site Under Maintenance" message by default.
    3435* Shows your admin email as a clickable contact link.
    3536* Returns proper HTTP 503 status (good for SEO).
     
    6667== Changelog ==
    6768
     69= 1.1.0 =
     70* Major Update: Added support for custom headlines and maintenance messages.
     71* Security: Improved sanitization for custom fields.
     72
    6873= 1.0.1 =
    6974* Added modern CSS styling to the maintenance page.
     
    7580== Upgrade Notice ==
    7681
    77 = 1.0.1 =
    78 New modern UI for the maintenance page. Highly recommended.
     82= 1.1.0 =
     83Added support for custom headlines and messages. Highly recommended.
  • sakibsnaz-light-maintenance-mode/trunk/sakibsnaz-light-maintenance-mode.php

    r3476220 r3476230  
    44 * Plugin URI:  https://www.lightmaintenance.site/
    55 * Description: A lightweight plugin to enable a simple maintenance/coming soon page with one click.
    6  * Version:     1.0.1
     6 * Version:     1.1.0
    77 * Author:      Sakib MD Nazmush
    88 * Author URI:  https://sakibmdnazmush.vercel.app
     
    3131    if (slmm_is_enabled() && !current_user_can('manage_options') && !is_admin()) {
    3232        $admin_email = get_option('admin_email');
     33        $headline    = get_option('slmm_headline', __('We’ll Be Right Back!', 'sakibsnaz-light-maintenance-mode'));
     34        $message     = get_option('slmm_message', __('Our site is currently undergoing scheduled maintenance to improve your experience. Please check back soon.', 'sakibsnaz-light-maintenance-mode'));
     35
     36        // Fallback to defaults if options are empty strings
     37        if (empty($headline)) {
     38            $headline = __('We’ll Be Right Back!', 'sakibsnaz-light-maintenance-mode');
     39        }
     40        if (empty($message)) {
     41            $message = __('Our site is currently undergoing scheduled maintenance to improve your experience. Please check back soon.', 'sakibsnaz-light-maintenance-mode');
     42        }
    3343
    3444        // Use a 503 Service Unavailable header for SEO
     
    4353            <meta charset="<?php bloginfo('charset'); ?>">
    4454            <meta name="viewport" content="width=device-width, initial-scale=1">
    45             <title><?php esc_html_e('Site Under Maintenance', 'sakibsnaz-light-maintenance-mode'); ?></title>
     55            <title><?php echo esc_html($headline); ?></title>
    4656            <style>
    4757                body {
     
    102112            <div class="container">
    103113                <div class="icon">🚧</div>
    104                 <h1><?php esc_html_e('We’ll Be Right Back!', 'sakibsnaz-light-maintenance-mode'); ?></h1>
    105                 <p><?php esc_html_e('Our site is currently undergoing scheduled maintenance to improve your experience. Please check back soon.', 'sakibsnaz-light-maintenance-mode'); ?>
    106                 </p>
     114                <h1><?php echo esc_html($headline); ?></h1>
     115                <p><?php echo esc_html($message); ?></p>
    107116
    108117                <?php if ($admin_email): ?>
     
    147156        'sanitize_callback' => 'rest_sanitize_boolean',
    148157        'default' => false,
     158    ));
     159
     160    register_setting('slmm_settings_group', 'slmm_headline', array(
     161        'type' => 'string',
     162        'sanitize_callback' => 'sanitize_text_field',
     163        'default' => '',
     164    ));
     165
     166    register_setting('slmm_settings_group', 'slmm_message', array(
     167        'type' => 'string',
     168        'sanitize_callback' => 'sanitize_textarea_field',
     169        'default' => '',
    149170    ));
    150171}
     
    171192                    </td>
    172193                </tr>
     194                <tr>
     195                    <th scope="row"><?php esc_html_e('Custom Headline', 'sakibsnaz-light-maintenance-mode'); ?></th>
     196                    <td>
     197                        <input type="text" name="slmm_headline" value="<?php echo esc_attr(get_option('slmm_headline')); ?>" class="regular-text" placeholder="<?php esc_attr_e('We’ll Be Right Back!', 'sakibsnaz-light-maintenance-mode'); ?>" />
     198                        <p class="description">
     199                            <?php esc_html_e('The main heading displayed on the maintenance page.', 'sakibsnaz-light-maintenance-mode'); ?>
     200                        </p>
     201                    </td>
     202                </tr>
     203                <tr>
     204                    <th scope="row"><?php esc_html_e('Custom Message', 'sakibsnaz-light-maintenance-mode'); ?></th>
     205                    <td>
     206                        <textarea name="slmm_message" rows="5" cols="50" class="large-text" placeholder="<?php esc_attr_e('Our site is currently undergoing scheduled maintenance to improve your experience. Please check back soon.', 'sakibsnaz-light-maintenance-mode'); ?>"><?php echo esc_textarea(get_option('slmm_message')); ?></textarea>
     207                        <p class="description">
     208                            <?php esc_html_e('A detailed message explaining the maintenance to your visitors.', 'sakibsnaz-light-maintenance-mode'); ?>
     209                        </p>
     210                    </td>
     211                </tr>
    173212            </table>
    174213            <?php submit_button(); ?>
Note: See TracChangeset for help on using the changeset viewer.