Plugin Directory

Changeset 3380713


Ignore:
Timestamp:
10/19/2025 08:00:40 AM (6 months ago)
Author:
brainywpbd
Message:

Quick maintenance mood feature added and the asset updated

Location:
minifly
Files:
301 added
1 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • minifly/trunk/minifly.php

    r3375411 r3380713  
    55 * Plugin URI:        https://brainywp.com/minifly/
    66 * Description:       Minifly is your favorite, lightweight companion for better performance. Supercharge your site with tiny tools that make a big difference.
    7  * Version:           1.0.24
     7 * Version:           1.0.25
    88 * Requires at least: 5.2
    99 * Requires PHP:      7.2
     
    206206        'user/user-setup.php',
    207207        'admin/admin-settings.php',
    208         'ecommerce/ecommerce.php',
     208        'ecommerce/ecommerce-settings.php',
     209        'ecommerce/ecommerce-hooks.php',
    209210        // White label options
    210211        'admin/all-admin-hooks.php',
  • minifly/trunk/readme.txt

    r3375411 r3380713  
    44Requires at least: 5.2
    55Tested up to: 6.8
    6 Stable tag: 1.0.24
     6Stable tag: 1.0.25
    77Requires PHP: 7.2
    88License: GPLv2 or later
     
    4848* **Hide User Toolbar (Pro)** You can website toolbar to make your site more professional.
    4949* **Limit Revision Number** - Keep necessary revision while making database clean is now possible with Minifly. Just toggle on and you will set 5 revisions for post and page. [Minifly pro](https://brainywp.com/minifly/) unlocked you custom post revisions.
     50* **Maintenance Mood** - You can enable **one click maintenance mood** on your website with our latest quick maintenance mood toggle option.
    5051
    5152## WordPress white label solution features at Minifly
     
    9798
    9899== Changelog ==
     100
     101= 1.0.25 (19 October 2025) =
     102New: Quick maintenance mood
    99103
    100104= 1.0.20 (27 September 2025) =
  • minifly/trunk/templates/admin/admin-settings.php

    r3375411 r3380713  
    4848            $disable_plugin_update = isset($_POST['sapmfly_disable_plugin_update']) ? 'yes' : 'no';
    4949            update_option('sapmfly_disable_plugin_update', $disable_plugin_update);
    50 
    5150
    5251            $limit_revision_number = isset($_POST['sapmfly_limit_revision_number']) ? 'yes' : 'no';
  • minifly/trunk/templates/admin/all-admin-hooks.php

    r3375411 r3380713  
    483483    }
    484484});
    485 
  • minifly/trunk/templates/ecommerce/features/hide-all-product-price.php

    r3358243 r3380713  
    1010    <label class="sapmfly-switch-update">
    1111        <div class="hide-all-product-price-header toggle-header">
    12             <?php echo esc_html__('Hide all product price', 'minifly'); ?>&nbsp;&nbsp;&nbsp;
     12            <?php echo esc_html__('Hide all product price', 'minifly'); ?>
    1313            <input type="checkbox" class="sapmfly-setting-toggle" name="sapmfly_hide_product_price" <?php checked($hide_product_price, 'yes'); ?> />
    1414            <span class="sapmfly-slider"></span>
  • minifly/trunk/templates/user/all-hooks.php

    r3358243 r3380713  
    162162    add_filter('show_admin_bar', '__return_false');
    163163}
     164
     165// Maintenance mood related code goes here
     166add_action('template_redirect', function () {
     167    $maintenance_mood = get_option('sapmfly_maintenance_mood', 'no');
     168
     169    // Only show on frontend, not for admins or login page
     170    if ($maintenance_mood === 'yes' && !is_user_logged_in() && !is_admin()) {
     171   
     172        $file_path = SAPMFLY_TEMPLATES . 'design/maintenance-mood-design.php';
     173
     174        if (file_exists($file_path)) {
     175            status_header(503);
     176            include $file_path;
     177            exit;
     178        } else {
     179            wp_die('website is under maintenance!', 'Coming Soon', array('response' => 503));
     180        }
     181    }
     182});
     183
     184// Add admin bar notice when maintenance mode is active
     185add_action('admin_bar_menu', function ($wp_admin_bar) {
     186    if (!current_user_can('administrator')) {
     187        return;
     188    }
     189
     190    $args = [
     191        'id'    => 'sap_coming_soon_notice',
     192        'title' => '🛠️ Maintenance mood',
     193        'href'  => admin_url('options-general.php'),
     194        'meta'  => ['class' => 'sap-coming-soon-active'],
     195    ];
     196
     197    $wp_admin_bar->add_node($args);
     198}, 100);
  • minifly/trunk/templates/user/user-setup.php

    r3358243 r3380713  
    4040            update_option('sapmfly_hide_toolbar_user', $hide_toolbar_user);
    4141
     42            $maintenance_mood = isset($_POST['sapmfly_maintenance_mood']) ? 'yes' : 'no';
     43            update_option('sapmfly_maintenance_mood', $maintenance_mood);
     44
    4245            $global_toggle_value = isset($_POST['sapmfly_widgets_toggle']) ? 'yes' : 'no';
    4346            update_option('sapmfly_widgets_toggle', $global_toggle_value);
     
    5457    $dark_mood_for_users = get_option('sapmfly_dark_mood_for_users_button', 'no');
    5558    $hide_toolbar_user = get_option('sapmfly_hide_toolbar_user', 'no');
     59    $maintenance_mood = get_option('sapmfly_maintenance_mood', 'no');
    5660
    5761    // Save global save option
     
    154158                                    ?>
    155159
     160                                    <!-- Enable enable maintenance mood -->
     161                                    <?php
     162                                    $sapmfly_enable_maintenance = SAPMFLY_TEMPLATES . 'user/features/enable-maintenance-mood.php';
     163                                    if (file_exists($sapmfly_enable_maintenance)) {
     164                                        require_once $sapmfly_enable_maintenance;
     165                                    }
     166                                    ?>
     167
    156168                                </div>
    157169                                <br><br>
Note: See TracChangeset for help on using the changeset viewer.