Plugin Directory

Changeset 2857421


Ignore:
Timestamp:
01/31/2023 02:54:35 AM (3 years ago)
Author:
daomapsieucap
Message:

Update to version 2.0.15 from GitHub

Location:
fiber-admin
Files:
12 edited
1 copied

Legend:

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

    r2834904 r2857421  
    11== Changelog ==
     2
     3= 2.0.15 =
     4*Release Date - 31 January 2023*
     5
     6* Fixed: Skip auto replace email address if the content has email in HTML attribute.
     7* Added: Add option to toggle admin toolbar.
    28
    39= 2.0.14 =
  • fiber-admin/tags/2.0.15/fiberadmin.php

    r2834904 r2857421  
    44 * Plugin URI:        https://wordpress.org/plugins/fiber-admin/
    55 * Description:       💈 Bring multiple customization features to make your own WordPress admin.
    6  * Version:           2.0.14
     6 * Version:           2.0.15
    77 * Requires at least: 5.2
    88 * Requires PHP:      7.0
  • fiber-admin/tags/2.0.15/includes/content.php

    r2630321 r2857421  
    4747   
    4848    public function fiad_auto_convert_email_address($content){
    49         // Skip if the content has mailto link or input type email
    50         if(strpos($content, 'mailto') !== false || strpos($content, 'type="email"') !== false){
     49        $enable_auto_convert = true;
     50       
     51        // Skip if the content has mailto link
     52        if(strpos($content, 'mailto') !== false){
     53            return $content;
     54        }
     55       
     56        // Skip if the content has email in HTML attribute
     57        $att_email_regex = '/<\w+.*?\K[\w-]+=["\']*\s*(?:\w+\s*)*[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\s*(?:[\'"]?(?:\w+\s*)*[\'"]?)?["\']*(?=.*?>)/mi';
     58        preg_match($att_email_regex, $content, $email_matches);
     59        if($email_matches){
     60            $enable_auto_convert = false;
     61        }
     62       
     63        // Skip replace email address
     64        if(!$enable_auto_convert){
    5165            return $content;
    5266        }
     
    5468        // Detect and create email link
    5569        $search  = array('/([a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})/');
    56         $replace = array('<a href="mailto:$1">$1</a>');
     70        $replace = array('<a href="mailto:$1" title="$1">$1</a>');
    5771       
    5872        return preg_replace($search, $replace, $content);
  • fiber-admin/tags/2.0.15/includes/default.php

    r2673225 r2857421  
    1010class Fiber_Admin_Default{
    1111    public function __construct(){
    12         //default value
     12        //white label
    1313        if(fiad_get_general_option('hide_wordpress_branding')){
    1414            // Replace "WordPress" in the page titles.
     
    3737            add_action('login_enqueue_scripts', array($this, 'fiad_remove_backtoblog'));
    3838           
    39             // Hide Admin Bar Frontend for all users
    40             add_filter('show_admin_bar', '__return_false');
     39            // Hide / Show Admin Bar Frontend for all users
     40            if(fiad_get_general_option('enable_admin_toolbar')){
     41                add_filter('show_admin_bar', '__return_true');
     42            }else{
     43                add_filter('show_admin_bar', '__return_false');
     44                add_action('wp_print_styles', array($this, 'fiad_deregister_styles'), 100);
     45            }
    4146           
    4247            // Remove WordPress admin bar logo
     
    161166               .wp-admin #wpadminbar #wp-admin-bar-site-name>.ab-item:before{
    162167                content:"";
    163                 background:transparent url("'.get_site_icon_url().'") no-repeat center/contain !important;
     168                background:transparent url("' . get_site_icon_url() . '") no-repeat center/contain !important;
    164169                width: 20px; height: 20px;
    165170               }
    166171              </style>';
    167172    }
     173   
     174    public function fiad_deregister_styles(){
     175        wp_deregister_style('dashicons');
     176    }
    168177}
    169178
  • fiber-admin/tags/2.0.15/includes/settings/white-label.php

    r2727158 r2857421  
    5151        );
    5252       
     53        add_settings_field(
     54            'enable_admin_toolbar', // id
     55            'Enable Admin Toolbar', // title
     56            array($this, 'fiad_enable_admin_toolbar'), // callback
     57            'fiber-admin-white-label', // page
     58            'fiad_branding_section' // section
     59        );
     60       
    5361        add_settings_section(
    5462            'fiad_white_label_section',
     
    116124                <input type="checkbox" name="fiber_admin[hide_wordpress_branding]" id="hide_wordpress_branding"
    117125                       value="yes" <?php checked(esc_attr(fiad_get_general_option('hide_wordpress_branding')), 'yes'); ?> />
     126                <span class="slider round"></span>
     127            </label>
     128        </fieldset>
     129        <?php
     130    }
     131   
     132    public function fiad_enable_admin_toolbar(){
     133        ?>
     134        <fieldset>
     135            <label for="enable_admin_toolbar" class="fiber-admin-toggle">
     136                <input type="checkbox" name="fiber_admin[enable_admin_toolbar]" id="enable_admin_toolbar"
     137                       value="yes" <?php checked(esc_attr(fiad_get_general_option('enable_admin_toolbar')), 'yes'); ?> />
    118138                <span class="slider round"></span>
    119139            </label>
  • fiber-admin/tags/2.0.15/readme.txt

    r2834904 r2857421  
    55Tested up to: 6.0.1
    66Requires PHP: 7.0
    7 Stable tag: 2.0.14
     7Stable tag: 2.0.15
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747== Changelog ==
    4848
    49 = 2.0.14 =
    50 *Release Date - 16 December 2022*
     49= 2.0.15 =
     50*Release Date - 31 January 2023*
    5151
    52 * Fixed: Fix error when other plugins include SVG library.
    53 * Fixed: Prevent to change the passed orderby in admin.
    54 * Fixed: Fix wrong param in `simplexml_load_file` function.
     52* Fixed: Skip auto replace email address if the content has email in HTML attribute.
     53* Added: Add option to toggle admin toolbar.
  • fiber-admin/trunk/changelog.txt

    r2834904 r2857421  
    11== Changelog ==
     2
     3= 2.0.15 =
     4*Release Date - 31 January 2023*
     5
     6* Fixed: Skip auto replace email address if the content has email in HTML attribute.
     7* Added: Add option to toggle admin toolbar.
    28
    39= 2.0.14 =
  • fiber-admin/trunk/fiberadmin.php

    r2834904 r2857421  
    44 * Plugin URI:        https://wordpress.org/plugins/fiber-admin/
    55 * Description:       💈 Bring multiple customization features to make your own WordPress admin.
    6  * Version:           2.0.14
     6 * Version:           2.0.15
    77 * Requires at least: 5.2
    88 * Requires PHP:      7.0
  • fiber-admin/trunk/includes/content.php

    r2630321 r2857421  
    4747   
    4848    public function fiad_auto_convert_email_address($content){
    49         // Skip if the content has mailto link or input type email
    50         if(strpos($content, 'mailto') !== false || strpos($content, 'type="email"') !== false){
     49        $enable_auto_convert = true;
     50       
     51        // Skip if the content has mailto link
     52        if(strpos($content, 'mailto') !== false){
     53            return $content;
     54        }
     55       
     56        // Skip if the content has email in HTML attribute
     57        $att_email_regex = '/<\w+.*?\K[\w-]+=["\']*\s*(?:\w+\s*)*[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\s*(?:[\'"]?(?:\w+\s*)*[\'"]?)?["\']*(?=.*?>)/mi';
     58        preg_match($att_email_regex, $content, $email_matches);
     59        if($email_matches){
     60            $enable_auto_convert = false;
     61        }
     62       
     63        // Skip replace email address
     64        if(!$enable_auto_convert){
    5165            return $content;
    5266        }
     
    5468        // Detect and create email link
    5569        $search  = array('/([a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})/');
    56         $replace = array('<a href="mailto:$1">$1</a>');
     70        $replace = array('<a href="mailto:$1" title="$1">$1</a>');
    5771       
    5872        return preg_replace($search, $replace, $content);
  • fiber-admin/trunk/includes/default.php

    r2673225 r2857421  
    1010class Fiber_Admin_Default{
    1111    public function __construct(){
    12         //default value
     12        //white label
    1313        if(fiad_get_general_option('hide_wordpress_branding')){
    1414            // Replace "WordPress" in the page titles.
     
    3737            add_action('login_enqueue_scripts', array($this, 'fiad_remove_backtoblog'));
    3838           
    39             // Hide Admin Bar Frontend for all users
    40             add_filter('show_admin_bar', '__return_false');
     39            // Hide / Show Admin Bar Frontend for all users
     40            if(fiad_get_general_option('enable_admin_toolbar')){
     41                add_filter('show_admin_bar', '__return_true');
     42            }else{
     43                add_filter('show_admin_bar', '__return_false');
     44                add_action('wp_print_styles', array($this, 'fiad_deregister_styles'), 100);
     45            }
    4146           
    4247            // Remove WordPress admin bar logo
     
    161166               .wp-admin #wpadminbar #wp-admin-bar-site-name>.ab-item:before{
    162167                content:"";
    163                 background:transparent url("'.get_site_icon_url().'") no-repeat center/contain !important;
     168                background:transparent url("' . get_site_icon_url() . '") no-repeat center/contain !important;
    164169                width: 20px; height: 20px;
    165170               }
    166171              </style>';
    167172    }
     173   
     174    public function fiad_deregister_styles(){
     175        wp_deregister_style('dashicons');
     176    }
    168177}
    169178
  • fiber-admin/trunk/includes/settings/white-label.php

    r2727158 r2857421  
    5151        );
    5252       
     53        add_settings_field(
     54            'enable_admin_toolbar', // id
     55            'Enable Admin Toolbar', // title
     56            array($this, 'fiad_enable_admin_toolbar'), // callback
     57            'fiber-admin-white-label', // page
     58            'fiad_branding_section' // section
     59        );
     60       
    5361        add_settings_section(
    5462            'fiad_white_label_section',
     
    116124                <input type="checkbox" name="fiber_admin[hide_wordpress_branding]" id="hide_wordpress_branding"
    117125                       value="yes" <?php checked(esc_attr(fiad_get_general_option('hide_wordpress_branding')), 'yes'); ?> />
     126                <span class="slider round"></span>
     127            </label>
     128        </fieldset>
     129        <?php
     130    }
     131   
     132    public function fiad_enable_admin_toolbar(){
     133        ?>
     134        <fieldset>
     135            <label for="enable_admin_toolbar" class="fiber-admin-toggle">
     136                <input type="checkbox" name="fiber_admin[enable_admin_toolbar]" id="enable_admin_toolbar"
     137                       value="yes" <?php checked(esc_attr(fiad_get_general_option('enable_admin_toolbar')), 'yes'); ?> />
    118138                <span class="slider round"></span>
    119139            </label>
  • fiber-admin/trunk/readme.txt

    r2834904 r2857421  
    55Tested up to: 6.0.1
    66Requires PHP: 7.0
    7 Stable tag: 2.0.14
     7Stable tag: 2.0.15
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747== Changelog ==
    4848
    49 = 2.0.14 =
    50 *Release Date - 16 December 2022*
     49= 2.0.15 =
     50*Release Date - 31 January 2023*
    5151
    52 * Fixed: Fix error when other plugins include SVG library.
    53 * Fixed: Prevent to change the passed orderby in admin.
    54 * Fixed: Fix wrong param in `simplexml_load_file` function.
     52* Fixed: Skip auto replace email address if the content has email in HTML attribute.
     53* Added: Add option to toggle admin toolbar.
Note: See TracChangeset for help on using the changeset viewer.