Plugin Directory

Changeset 3361616


Ignore:
Timestamp:
09/15/2025 08:49:38 AM (3 months ago)
Author:
daomapsieucap
Message:

Update to version 3.2.7 from GitHub

Location:
fiber-admin
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • fiber-admin/tags/3.2.7/changelog.txt

    r3326031 r3361616  
    11== Changelog ==
     2
     3= 3.2.7 =
     4*Release Date - 15 September 2025*
     5
     6* Changed: Improve Admin Login UI
    27
    38= 3.2.6 =
  • fiber-admin/tags/3.2.7/fiberadmin.php

    r3326031 r3361616  
    44 * Plugin URI:        https://wordpress.org/plugins/fiber-admin/
    55 * Description:       💈 Bring multiple customization features to make your own WordPress admin.
    6  * Version:           3.2.6
     6 * Version:           3.2.7
    77 * Requires at least: 5.2
    88 * Requires PHP:      7.4
     
    2626 */
    2727
    28 const FIBERADMIN_VERSION  = '3.2.6';
     28const FIBERADMIN_VERSION  = '3.2.7';
    2929const FIBERADMIN_DEV_MODE = false;
    3030const FIBERADMIN_FILENAME = __FILE__;
  • fiber-admin/tags/3.2.7/includes/login.php

    r2997423 r3361616  
    55}
    66
    7 /**
    8  * Login
    9  */
    107class Fiber_Admin_Login{
     8    private const MAX_LOGO_WIDTH = 320;
     9    private const CACHE_KEY = 'fiad_admin_login_cache'; // CSS cache key
     10    private const CACHE_EXPIRATION = 24 * HOUR_IN_SECONDS; // CSS cache expiration (24 hours)
     11   
     12    /**
     13     * Constructor - Initialize hooks
     14     */
    1115    public function __construct(){
    12         // Login Interface
    13         add_action('login_enqueue_scripts', [$this, 'fiad_login_css']);
    14     }
    15    
    16     public function fiad_login_css(){
    17         // Logo CSS
    18         $login_logo_css = '#login h1 a, .login h1 a { ';
    19        
    20         if($login_logo = fiad_get_general_option('login_logo')){
    21             $login_logo_css .= 'background-image: url(' . $login_logo . ');';
    22         }
    23        
    24         $login_logo_css .= 'max-width:100%;';
    25        
    26         $has_width = false;
    27         if($logo_width = fiad_get_general_option('login_logo_width')){
    28             $login_logo_css .= 'width:' . $logo_width . 'px;';
    29             $has_width      = true;
    30         }else{
    31             $login_logo_css .= 'width:auto!important;';
    32         }
    33        
    34         $has_height = false;
    35         if($logo_height = fiad_get_general_option('login_logo_height')){
    36             $has_height     = true;
    37             $login_logo_css .= 'height:' . $logo_height . 'px;';
    38         }
    39        
    40         // Add logo background size
    41         $logo_background_size = 'background-size:contain;background-position-y: center;';
    42         if($has_height && $has_width){
    43             $logo_background_size = sprintf('background-size:%s %s;', $logo_width . 'px', $logo_height . 'px');
    44         }
    45         $login_logo_css .= $logo_background_size;
    46        
    47         // Add bottom spacing
    48         $login_logo_css .= 'margin-bottom: 60px!important;';
    49        
    50         $login_logo_css .= '}';
    51        
    52         $bg_css = '';
    53        
    54         // Login Background Color CSS
    55         if($background_color = fiad_get_general_option('login_bg_color')){
    56             $bg_css = 'body.login{ background-color:' . $background_color . '!important;' . '}';
    57         }
    58        
    59         // Login Background Image CSS
    60         $background_image = fiad_get_general_option('login_bg_img');
    61         if($background_image && !$bg_css){
    62             $bg_css = 'body.login{';
    63             $bg_css .= 'background:url(' . $background_image . ') center / cover no-repeat !important;';
    64             $bg_css .= '}';
    65         }
    66        
    67         // Form CSS
    68         $form_css = '';
    69        
    70         if($form_bg_color = fiad_get_general_option('form_bg_color')){
    71             $form_css .= '#loginform{ background-color:' . $form_bg_color . '}';
    72         }
    73        
    74         // Form Border
     16        // enqueue styles
     17        add_action('login_enqueue_scripts', [$this, 'fiad_enqueue_login_styles']);
     18       
     19        // clear cache
     20        add_action('updated_option', [$this, 'fiad_maybe_clear_cache']);
     21        add_action('added_option', [$this, 'fiad_maybe_clear_cache']);
     22        add_action('deleted_option', [$this, 'fiad_maybe_clear_cache']);
     23    }
     24   
     25    /**
     26     * Enqueue login page styles
     27     */
     28    public function fiad_enqueue_login_styles(){
     29        $cached_css = get_transient(self::CACHE_KEY);
     30       
     31        if(false === $cached_css){
     32            $cached_css = $this->generate_login_css();
     33            set_transient(self::CACHE_KEY, $cached_css, self::CACHE_EXPIRATION);
     34        }
     35       
     36        if(!empty($cached_css)){
     37            wp_add_inline_style('login', $cached_css);
     38        }
     39    }
     40   
     41    /**
     42     * Generate login page CSS
     43     */
     44    private function generate_login_css(){
     45        $css_parts = [
     46            $this->get_general_css(),
     47            $this->get_logo_css(),
     48            $this->get_background_css(),
     49            $this->get_form_css(),
     50            $this->get_extra_css(),
     51        ];
     52       
     53        return implode("\n", array_filter($css_parts));
     54    }
     55   
     56    /**
     57     * Get general login page CSS
     58     */
     59    private function get_general_css(){
     60        return '
     61        body.login{display: flex;flex-direction: column;justify-content: center;min-height: 100vh;margin: 0;}
     62        body.login div#login{margin: auto;padding:0;}
     63        body.login .language-switcher {text-align: center;padding-bottom:0;}
     64        body.login div#login form#loginform{margin:0;}
     65        body.login div#login .privacy-policy-page-link{margin:40px 0 0 0;}
     66        ';
     67    }
     68   
     69    /**
     70     * Get logo CSS
     71     */
     72    private function get_logo_css(){
     73        $logo_url = fiad_get_general_option('login_logo');
     74        if(empty($logo_url)){
     75            return '';
     76        }
     77       
     78        $logo_width  = absint(fiad_get_general_option('login_logo_width'));
     79        $logo_height = absint(fiad_get_general_option('login_logo_height'));
     80       
     81        // start
     82        $css = 'body.login div#login h1 a, body.login h1 a {';
     83       
     84        // change logo
     85        $css .= sprintf('background-image: url(%s);', esc_url($logo_url));
     86        $css .= 'max-width: 100%;';
     87       
     88        // width
     89        $css .= $logo_width > 0 && $logo_width <= self::MAX_LOGO_WIDTH ? sprintf('width: %dpx;', $logo_width) : 'width: auto;';
     90       
     91        // height
     92        $css .= $logo_height > 0 ? sprintf('height: %dpx;', $logo_height) : '';
     93       
     94        // background sizes
     95        $css .= $logo_width > 0 && $logo_height > 0
     96            ? sprintf('background-size: %dpx %dpx;', $logo_width, $logo_height)
     97            : 'background-size: contain; background-position-y: center;';
     98       
     99        // consistent bottom spacing
     100        $css .= 'margin-bottom: 40px;';
     101       
     102        // end
     103        $css .= '}';
     104       
     105        return $css;
     106    }
     107   
     108    /**
     109     * Get background CSS
     110     */
     111    private function get_background_css(){
     112        $bg_color = fiad_get_general_option('login_bg_color');
     113        $bg_image = fiad_get_general_option('login_bg_img');
     114       
     115        // use background color first
     116        if($bg_color){
     117            return sprintf('body.login { background-color: %s; }', sanitize_hex_color($bg_color));
     118        }
     119       
     120        // fallback background image
     121        if($bg_image){
     122            return sprintf(
     123                'body.login { background: url(%s) center / cover no-repeat; }',
     124                esc_url($bg_image)
     125            );
     126        }
     127       
     128        return '';
     129    }
     130   
     131    /**
     132     * Get form CSS
     133     */
     134    private function get_form_css(){
     135        $css = '';
     136       
     137        // form background color
     138        $form_bg_color = fiad_get_general_option('form_bg_color');
     139        if($form_bg_color){
     140            $css .= sprintf('body.login div#login form#loginform { background-color: %s; }', sanitize_hex_color($form_bg_color));
     141        }
     142       
     143        // remove form border
    75144        if(fiad_get_general_option('form_disable_border')){
    76             $form_css .= '#loginform{ border: none !important; box-shadow: none !important;}';
    77         }
    78        
    79         // Button
    80         $form_btn_text_color = fiad_get_general_option('form_btn_text_color');
    81         $form_btn_color      = fiad_get_general_option('form_button_color');
    82        
    83         if($form_btn_text_color || $form_btn_color){
    84             $form_css .= '#loginform input[type=submit]{ ';
    85             if($form_btn_text_color){
    86                 $form_css .= 'color:' . $form_btn_text_color . '!important;';
    87                 $form_css .= 'text-shadow: none;';
    88                 $form_css .= 'border-color: none;';
    89                 $form_css .= 'box-shadow: none;';
    90             }
    91            
    92             if($form_btn_color){
    93                 $form_css .= 'background-color:' . $form_btn_color . '!important; border: 0;box-shadow:none';
    94             }
    95            
    96             $form_css .= '}';
    97         }
    98        
    99         // Link
    100         if($form_link_color = fiad_get_general_option('link_color')){
    101             $form_css .= '#login a{ color: ' . $form_link_color . ';}';
    102         }
    103        
    104         // Extra CSS
    105         $extra_css = '';
    106         if($form_extra_css = fiad_get_general_option('login_extra_css')){
    107             $extra_css = $form_extra_css;
    108         }
    109         ?>
    110         <style>
    111             <?php echo esc_html($login_logo_css); ?>
    112             <?php echo esc_html($bg_css); ?>
    113             <?php echo esc_html($form_css); ?>
    114             <?php echo esc_html($extra_css); ?>
    115         </style>
    116         <?php
    117     }
    118    
    119     public function fiad_admin_bar_logo(){
    120         $logo_url = fiad_get_general_option('admin_bar_logo');
    121         echo '<style>
    122             #wpadminbar #wp-admin-bar-wp-logo>.ab-item {
    123                 padding: 0 7px;
    124                 background-image: url(' . $logo_url . ') !important;
    125                 background-size: 70%;
    126                 background-position: center;
    127                 background-repeat: no-repeat;
    128                 opacity: 0.8;
    129             }
    130             #wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before {
    131                 content: " ";
    132                 top: 2px;
    133             }
    134           </style>';
     145            $css .= 'body.login div#login form#loginform { border: none; box-shadow: none; }';
     146        }
     147       
     148        // button styles
     149        $css .= $this->get_button_css();
     150       
     151        // link color
     152        $link_color = fiad_get_general_option('link_color');
     153        if($link_color){
     154            $css .= sprintf('body.login div#login a { color: %s; }', sanitize_hex_color($link_color));
     155        }
     156       
     157        return $css;
     158    }
     159   
     160    /**
     161     * Get button CSS
     162     */
     163    private function get_button_css(){
     164        $btn_text_color = fiad_get_general_option('form_btn_text_color');
     165        $btn_bg_color   = fiad_get_general_option('form_button_color');
     166       
     167        if(!$btn_text_color && !$btn_bg_color){
     168            return '';
     169        }
     170       
     171        $css = 'body.login div#login form#loginform input[type="submit"] {';
     172       
     173        if($btn_text_color){
     174            $css .= sprintf('color: %s;', sanitize_hex_color($btn_text_color));
     175            $css .= 'text-shadow: none; border-color: transparent; box-shadow: none;';
     176        }
     177       
     178        if($btn_bg_color){
     179            $css .= sprintf('background-color: %s;', sanitize_hex_color($btn_bg_color));
     180            $css .= 'border: 0; box-shadow: none;';
     181        }
     182       
     183        $css .= '}';
     184       
     185        return $css;
     186    }
     187   
     188    /**
     189     * Get extra CSS
     190     */
     191    private function get_extra_css(){
     192        $extra_css = fiad_get_general_option('login_extra_css');
     193       
     194        return $extra_css ? wp_strip_all_tags($extra_css) : '';
     195    }
     196   
     197    /**
     198     * Maybe clear cache when options are updated
     199     */
     200    public function fiad_maybe_clear_cache($option_name){
     201        if($option_name === 'fiber_admin'){
     202            $this->clear_css_cache();
     203        }
     204    }
     205   
     206    /**
     207     * Clear CSS cache transient
     208     */
     209    public function clear_css_cache(){
     210        return delete_transient(self::CACHE_KEY);
    135211    }
    136212}
  • fiber-admin/tags/3.2.7/readme.txt

    r3326031 r3361616  
    4949== Changelog ==
    5050
    51 = 3.2.6 =
    52 *Release Date - 11 July 2025*
     51= 3.2.7 =
     52*Release Date - 15 September 2025*
    5353
    54 * Changed: Update WordPress version to 6.8.1.
    55 * Changed: Use default WordPress admin setting UI instead of creating custom admin style.
    56 * Changed: Create 2 new options: Enable Text Protection and Enable Image Protection.
     54* Changed: Improve Admin Login UI
  • fiber-admin/trunk/changelog.txt

    r3326031 r3361616  
    11== Changelog ==
     2
     3= 3.2.7 =
     4*Release Date - 15 September 2025*
     5
     6* Changed: Improve Admin Login UI
    27
    38= 3.2.6 =
  • fiber-admin/trunk/fiberadmin.php

    r3326031 r3361616  
    44 * Plugin URI:        https://wordpress.org/plugins/fiber-admin/
    55 * Description:       💈 Bring multiple customization features to make your own WordPress admin.
    6  * Version:           3.2.6
     6 * Version:           3.2.7
    77 * Requires at least: 5.2
    88 * Requires PHP:      7.4
     
    2626 */
    2727
    28 const FIBERADMIN_VERSION  = '3.2.6';
     28const FIBERADMIN_VERSION  = '3.2.7';
    2929const FIBERADMIN_DEV_MODE = false;
    3030const FIBERADMIN_FILENAME = __FILE__;
  • fiber-admin/trunk/includes/login.php

    r2997423 r3361616  
    55}
    66
    7 /**
    8  * Login
    9  */
    107class Fiber_Admin_Login{
     8    private const MAX_LOGO_WIDTH = 320;
     9    private const CACHE_KEY = 'fiad_admin_login_cache'; // CSS cache key
     10    private const CACHE_EXPIRATION = 24 * HOUR_IN_SECONDS; // CSS cache expiration (24 hours)
     11   
     12    /**
     13     * Constructor - Initialize hooks
     14     */
    1115    public function __construct(){
    12         // Login Interface
    13         add_action('login_enqueue_scripts', [$this, 'fiad_login_css']);
    14     }
    15    
    16     public function fiad_login_css(){
    17         // Logo CSS
    18         $login_logo_css = '#login h1 a, .login h1 a { ';
    19        
    20         if($login_logo = fiad_get_general_option('login_logo')){
    21             $login_logo_css .= 'background-image: url(' . $login_logo . ');';
    22         }
    23        
    24         $login_logo_css .= 'max-width:100%;';
    25        
    26         $has_width = false;
    27         if($logo_width = fiad_get_general_option('login_logo_width')){
    28             $login_logo_css .= 'width:' . $logo_width . 'px;';
    29             $has_width      = true;
    30         }else{
    31             $login_logo_css .= 'width:auto!important;';
    32         }
    33        
    34         $has_height = false;
    35         if($logo_height = fiad_get_general_option('login_logo_height')){
    36             $has_height     = true;
    37             $login_logo_css .= 'height:' . $logo_height . 'px;';
    38         }
    39        
    40         // Add logo background size
    41         $logo_background_size = 'background-size:contain;background-position-y: center;';
    42         if($has_height && $has_width){
    43             $logo_background_size = sprintf('background-size:%s %s;', $logo_width . 'px', $logo_height . 'px');
    44         }
    45         $login_logo_css .= $logo_background_size;
    46        
    47         // Add bottom spacing
    48         $login_logo_css .= 'margin-bottom: 60px!important;';
    49        
    50         $login_logo_css .= '}';
    51        
    52         $bg_css = '';
    53        
    54         // Login Background Color CSS
    55         if($background_color = fiad_get_general_option('login_bg_color')){
    56             $bg_css = 'body.login{ background-color:' . $background_color . '!important;' . '}';
    57         }
    58        
    59         // Login Background Image CSS
    60         $background_image = fiad_get_general_option('login_bg_img');
    61         if($background_image && !$bg_css){
    62             $bg_css = 'body.login{';
    63             $bg_css .= 'background:url(' . $background_image . ') center / cover no-repeat !important;';
    64             $bg_css .= '}';
    65         }
    66        
    67         // Form CSS
    68         $form_css = '';
    69        
    70         if($form_bg_color = fiad_get_general_option('form_bg_color')){
    71             $form_css .= '#loginform{ background-color:' . $form_bg_color . '}';
    72         }
    73        
    74         // Form Border
     16        // enqueue styles
     17        add_action('login_enqueue_scripts', [$this, 'fiad_enqueue_login_styles']);
     18       
     19        // clear cache
     20        add_action('updated_option', [$this, 'fiad_maybe_clear_cache']);
     21        add_action('added_option', [$this, 'fiad_maybe_clear_cache']);
     22        add_action('deleted_option', [$this, 'fiad_maybe_clear_cache']);
     23    }
     24   
     25    /**
     26     * Enqueue login page styles
     27     */
     28    public function fiad_enqueue_login_styles(){
     29        $cached_css = get_transient(self::CACHE_KEY);
     30       
     31        if(false === $cached_css){
     32            $cached_css = $this->generate_login_css();
     33            set_transient(self::CACHE_KEY, $cached_css, self::CACHE_EXPIRATION);
     34        }
     35       
     36        if(!empty($cached_css)){
     37            wp_add_inline_style('login', $cached_css);
     38        }
     39    }
     40   
     41    /**
     42     * Generate login page CSS
     43     */
     44    private function generate_login_css(){
     45        $css_parts = [
     46            $this->get_general_css(),
     47            $this->get_logo_css(),
     48            $this->get_background_css(),
     49            $this->get_form_css(),
     50            $this->get_extra_css(),
     51        ];
     52       
     53        return implode("\n", array_filter($css_parts));
     54    }
     55   
     56    /**
     57     * Get general login page CSS
     58     */
     59    private function get_general_css(){
     60        return '
     61        body.login{display: flex;flex-direction: column;justify-content: center;min-height: 100vh;margin: 0;}
     62        body.login div#login{margin: auto;padding:0;}
     63        body.login .language-switcher {text-align: center;padding-bottom:0;}
     64        body.login div#login form#loginform{margin:0;}
     65        body.login div#login .privacy-policy-page-link{margin:40px 0 0 0;}
     66        ';
     67    }
     68   
     69    /**
     70     * Get logo CSS
     71     */
     72    private function get_logo_css(){
     73        $logo_url = fiad_get_general_option('login_logo');
     74        if(empty($logo_url)){
     75            return '';
     76        }
     77       
     78        $logo_width  = absint(fiad_get_general_option('login_logo_width'));
     79        $logo_height = absint(fiad_get_general_option('login_logo_height'));
     80       
     81        // start
     82        $css = 'body.login div#login h1 a, body.login h1 a {';
     83       
     84        // change logo
     85        $css .= sprintf('background-image: url(%s);', esc_url($logo_url));
     86        $css .= 'max-width: 100%;';
     87       
     88        // width
     89        $css .= $logo_width > 0 && $logo_width <= self::MAX_LOGO_WIDTH ? sprintf('width: %dpx;', $logo_width) : 'width: auto;';
     90       
     91        // height
     92        $css .= $logo_height > 0 ? sprintf('height: %dpx;', $logo_height) : '';
     93       
     94        // background sizes
     95        $css .= $logo_width > 0 && $logo_height > 0
     96            ? sprintf('background-size: %dpx %dpx;', $logo_width, $logo_height)
     97            : 'background-size: contain; background-position-y: center;';
     98       
     99        // consistent bottom spacing
     100        $css .= 'margin-bottom: 40px;';
     101       
     102        // end
     103        $css .= '}';
     104       
     105        return $css;
     106    }
     107   
     108    /**
     109     * Get background CSS
     110     */
     111    private function get_background_css(){
     112        $bg_color = fiad_get_general_option('login_bg_color');
     113        $bg_image = fiad_get_general_option('login_bg_img');
     114       
     115        // use background color first
     116        if($bg_color){
     117            return sprintf('body.login { background-color: %s; }', sanitize_hex_color($bg_color));
     118        }
     119       
     120        // fallback background image
     121        if($bg_image){
     122            return sprintf(
     123                'body.login { background: url(%s) center / cover no-repeat; }',
     124                esc_url($bg_image)
     125            );
     126        }
     127       
     128        return '';
     129    }
     130   
     131    /**
     132     * Get form CSS
     133     */
     134    private function get_form_css(){
     135        $css = '';
     136       
     137        // form background color
     138        $form_bg_color = fiad_get_general_option('form_bg_color');
     139        if($form_bg_color){
     140            $css .= sprintf('body.login div#login form#loginform { background-color: %s; }', sanitize_hex_color($form_bg_color));
     141        }
     142       
     143        // remove form border
    75144        if(fiad_get_general_option('form_disable_border')){
    76             $form_css .= '#loginform{ border: none !important; box-shadow: none !important;}';
    77         }
    78        
    79         // Button
    80         $form_btn_text_color = fiad_get_general_option('form_btn_text_color');
    81         $form_btn_color      = fiad_get_general_option('form_button_color');
    82        
    83         if($form_btn_text_color || $form_btn_color){
    84             $form_css .= '#loginform input[type=submit]{ ';
    85             if($form_btn_text_color){
    86                 $form_css .= 'color:' . $form_btn_text_color . '!important;';
    87                 $form_css .= 'text-shadow: none;';
    88                 $form_css .= 'border-color: none;';
    89                 $form_css .= 'box-shadow: none;';
    90             }
    91            
    92             if($form_btn_color){
    93                 $form_css .= 'background-color:' . $form_btn_color . '!important; border: 0;box-shadow:none';
    94             }
    95            
    96             $form_css .= '}';
    97         }
    98        
    99         // Link
    100         if($form_link_color = fiad_get_general_option('link_color')){
    101             $form_css .= '#login a{ color: ' . $form_link_color . ';}';
    102         }
    103        
    104         // Extra CSS
    105         $extra_css = '';
    106         if($form_extra_css = fiad_get_general_option('login_extra_css')){
    107             $extra_css = $form_extra_css;
    108         }
    109         ?>
    110         <style>
    111             <?php echo esc_html($login_logo_css); ?>
    112             <?php echo esc_html($bg_css); ?>
    113             <?php echo esc_html($form_css); ?>
    114             <?php echo esc_html($extra_css); ?>
    115         </style>
    116         <?php
    117     }
    118    
    119     public function fiad_admin_bar_logo(){
    120         $logo_url = fiad_get_general_option('admin_bar_logo');
    121         echo '<style>
    122             #wpadminbar #wp-admin-bar-wp-logo>.ab-item {
    123                 padding: 0 7px;
    124                 background-image: url(' . $logo_url . ') !important;
    125                 background-size: 70%;
    126                 background-position: center;
    127                 background-repeat: no-repeat;
    128                 opacity: 0.8;
    129             }
    130             #wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before {
    131                 content: " ";
    132                 top: 2px;
    133             }
    134           </style>';
     145            $css .= 'body.login div#login form#loginform { border: none; box-shadow: none; }';
     146        }
     147       
     148        // button styles
     149        $css .= $this->get_button_css();
     150       
     151        // link color
     152        $link_color = fiad_get_general_option('link_color');
     153        if($link_color){
     154            $css .= sprintf('body.login div#login a { color: %s; }', sanitize_hex_color($link_color));
     155        }
     156       
     157        return $css;
     158    }
     159   
     160    /**
     161     * Get button CSS
     162     */
     163    private function get_button_css(){
     164        $btn_text_color = fiad_get_general_option('form_btn_text_color');
     165        $btn_bg_color   = fiad_get_general_option('form_button_color');
     166       
     167        if(!$btn_text_color && !$btn_bg_color){
     168            return '';
     169        }
     170       
     171        $css = 'body.login div#login form#loginform input[type="submit"] {';
     172       
     173        if($btn_text_color){
     174            $css .= sprintf('color: %s;', sanitize_hex_color($btn_text_color));
     175            $css .= 'text-shadow: none; border-color: transparent; box-shadow: none;';
     176        }
     177       
     178        if($btn_bg_color){
     179            $css .= sprintf('background-color: %s;', sanitize_hex_color($btn_bg_color));
     180            $css .= 'border: 0; box-shadow: none;';
     181        }
     182       
     183        $css .= '}';
     184       
     185        return $css;
     186    }
     187   
     188    /**
     189     * Get extra CSS
     190     */
     191    private function get_extra_css(){
     192        $extra_css = fiad_get_general_option('login_extra_css');
     193       
     194        return $extra_css ? wp_strip_all_tags($extra_css) : '';
     195    }
     196   
     197    /**
     198     * Maybe clear cache when options are updated
     199     */
     200    public function fiad_maybe_clear_cache($option_name){
     201        if($option_name === 'fiber_admin'){
     202            $this->clear_css_cache();
     203        }
     204    }
     205   
     206    /**
     207     * Clear CSS cache transient
     208     */
     209    public function clear_css_cache(){
     210        return delete_transient(self::CACHE_KEY);
    135211    }
    136212}
  • fiber-admin/trunk/readme.txt

    r3326031 r3361616  
    4949== Changelog ==
    5050
    51 = 3.2.6 =
    52 *Release Date - 11 July 2025*
     51= 3.2.7 =
     52*Release Date - 15 September 2025*
    5353
    54 * Changed: Update WordPress version to 6.8.1.
    55 * Changed: Use default WordPress admin setting UI instead of creating custom admin style.
    56 * Changed: Create 2 new options: Enable Text Protection and Enable Image Protection.
     54* Changed: Improve Admin Login UI
Note: See TracChangeset for help on using the changeset viewer.