Plugin Directory

Changeset 2997423


Ignore:
Timestamp:
11/17/2023 05:16:35 AM (2 years ago)
Author:
daomapsieucap
Message:

Update to version 3.1.3 from GitHub

Location:
fiber-admin
Files:
12 edited
1 copied

Legend:

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

    r2965072 r2997423  
    11== Changelog ==
     2
     3= 3.1.3 =
     4*Release Date - 17 November 2023*
     5
     6* Fixed: Fix background image option is not working in While Label.
     7* Fixed: Fix bug duplicate array type in meta fields.
     8* Fixed: Fix bug prevent sanitize filename for unexpected file types.
    29
    310= 3.1.2 =
  • fiber-admin/tags/3.1.3/fiberadmin.php

    r2965072 r2997423  
    44 * Plugin URI:        https://wordpress.org/plugins/fiber-admin/
    55 * Description:       💈 Bring multiple customization features to make your own WordPress admin.
    6  * Version:           3.1.2
     6 * Version:           3.1.3
    77 * Requires at least: 5.2
    8  * Requires PHP:      7.0
     8 * Requires PHP:      7.4
    99 * Author:            Dao
    1010 * Author URI:        https://daochau.com/
  • fiber-admin/tags/3.1.3/includes/attachment.php

    r2962829 r2997423  
    3838   
    3939    public function fiad_cleanup_attachment_name($filename, $filename_raw){
    40         $file_extension = pathinfo($filename, PATHINFO_EXTENSION);
    41         $exclude_exts   = ['css', 'js']; // only apply for media attachment, not for code
    42        
    43         if($file_extension && !in_array($file_extension, $exclude_exts)){
    44             $sanitized_filename = basename($filename, "." . $file_extension);
    45             $sanitized_filename = strtolower($sanitized_filename);
     40        $file_extension       = pathinfo($filename, PATHINFO_EXTENSION);
     41        $supported_exts       = [];
     42        $ext_types            = wp_get_ext_types();
     43        $supported_file_types = ['image', 'audio', 'video', 'document', 'spreadsheet'];
     44        foreach($supported_file_types as $type){
     45            $supported_exts = array_merge($supported_exts, $ext_types[$type]);
     46        }
     47        if($file_extension && in_array($file_extension, $supported_exts)){
     48            $sanitized_filename = strtolower(basename($filename, "." . $file_extension));
    4649           
    4750            //handle urlencoded chars
  • fiber-admin/tags/3.1.3/includes/duplicate.php

    r2689928 r2997423  
    1111    public function __construct(){
    1212        // for non-hierarchy post types
    13         add_filter('post_row_actions', array($this, 'fiad_duplicate_link'), 10, 2);
     13        add_filter('post_row_actions', [$this, 'fiad_duplicate_link'], 10, 2);
    1414        // for hierarchy post types
    15         add_filter('page_row_actions', array($this, 'fiad_duplicate_link'), 10, 2);
     15        add_filter('page_row_actions', [$this, 'fiad_duplicate_link'], 10, 2);
    1616       
    1717        // duplicate
    18         add_action('admin_action_fiad_duplicate_post_as_draft', array($this, 'fiad_duplicate_post_as_draft'));
     18        add_action('admin_action_fiad_duplicate_post_as_draft', [$this, 'fiad_duplicate_post_as_draft']);
    1919       
    2020        // bulk actions
     
    2222        if($duplicate_post_types){
    2323            foreach($duplicate_post_types as $post_type){
    24                 add_filter('bulk_actions-edit-' . $post_type, array($this, 'fiad_bulk_duplicate'));
    25                 add_filter('handle_bulk_actions-edit-' . $post_type, array(
     24                add_filter('bulk_actions-edit-' . $post_type, [$this, 'fiad_bulk_duplicate']);
     25                add_filter('handle_bulk_actions-edit-' . $post_type, [
    2626                    $this,
    27                     'fiad_bulk_duplicate_handler'
    28                 ), 10, 3);
     27                    'fiad_bulk_duplicate_handler',
     28                ], 10, 3);
    2929            }
    3030        }
    3131       
    3232        // admin notices
    33         add_action('admin_notices', array($this, 'fiad_duplicate_admin_notice'));
     33        add_action('admin_notices', [$this, 'fiad_duplicate_admin_notice']);
    3434    }
    3535   
    3636    public function fiad_duplicate_link($actions, $post){
    37         $duplicate_post_types = fiad_get_duplicate_option('exclude_post_types');
    38        
    3937        if(!current_user_can('edit_posts')){
    4038            return $actions;
     
    4745       
    4846        // check duplicate settings
    49         $duplicate_enable = false;
     47        $duplicate_post_types = fiad_get_duplicate_option('exclude_post_types');
     48        $duplicate_enable     = false;
    5049        if(empty($duplicate_post_types)){
    5150            $duplicate_enable = true;
     
    5857            $url = wp_nonce_url(
    5958                add_query_arg(
    60                     array(
     59                    [
    6160                        'action' => 'fiad_duplicate_post_as_draft',
    6261                        'post'   => $post->ID,
    63                     ),
     62                    ],
    6463                    'admin.php'
    6564                ),
     
    8584        if($post){
    8685            // insert new post
    87             $args        = array(
     86            $args        = [
    8887                'comment_status' => $post->comment_status,
    8988                'ping_status'    => $post->ping_status,
     
    9796                'post_title'     => $post->post_title,
    9897                'post_type'      => $post->post_type,
    99                 'to_ping'        => $post->to_ping
    100             );
     98                'to_ping'        => $post->to_ping,
     99            ];
    101100            $new_post_id = wp_insert_post($args);
    102101           
     
    105104            if($taxonomies){
    106105                foreach($taxonomies as $taxonomy){
    107                     $post_terms = wp_get_object_terms($post_id, $taxonomy, array('fields' => 'slugs'));
     106                    $post_terms = wp_get_object_terms($post_id, $taxonomy, ['fields' => 'slugs']);
    108107                    wp_set_object_terms($new_post_id, $post_terms, $taxonomy);
    109108                }
     
    113112            $post_meta = get_post_meta($post_id);
    114113            if($post_meta){
    115                
    116114                foreach($post_meta as $meta_key => $meta_values){
    117                    
    118115                    if('_wp_old_slug' == $meta_key){ // exclude special meta key
    119116                        continue;
     
    121118                   
    122119                    foreach($meta_values as $meta_value){
    123                         add_post_meta($new_post_id, $meta_key, $meta_value);
     120                        add_post_meta($new_post_id, $meta_key, maybe_unserialize($meta_value));
    124121                    }
    125122                }
     
    153150            wp_safe_redirect(
    154151                add_query_arg(
    155                     array(
     152                    [
    156153                        'post_type' => ('post' !== get_post_type($post) ? get_post_type($post) : false),
    157                         'saved'     => 'fiad_post_duplication_created'
    158                     ),
     154                        'saved'     => 'fiad_post_duplication_created',
     155                    ],
    159156                    admin_url('edit.php')
    160157                )
     
    176173       
    177174        // let's remove query args first
    178         $redirect = remove_query_arg(array('fiad_duplicate'), $redirect);
     175        $redirect = remove_query_arg(['fiad_duplicate'], $redirect);
    179176       
    180177        // bulk duplicate
  • fiber-admin/tags/3.1.3/includes/login.php

    r2727158 r2997423  
    1111    public function __construct(){
    1212        // Login Interface
    13         add_action('login_enqueue_scripts', array($this, 'fiad_login_css'));
     13        add_action('login_enqueue_scripts', [$this, 'fiad_login_css']);
    1414    }
    1515   
     
    6161        if($background_image && !$bg_css){
    6262            $bg_css = 'body.login{';
    63             $bg_css .= 'background:url("' . $background_image . '") center / cover no-repeat !important;';
     63            $bg_css .= 'background:url(' . $background_image . ') center / cover no-repeat !important;';
    6464            $bg_css .= '}';
    6565        }
  • fiber-admin/tags/3.1.3/readme.txt

    r2965072 r2997423  
    33Tags: white label, admin tool, duplicate post, content protection
    44Requires at least: 4.7
    5 Tested up to: 6.3.1
    6 Requires PHP: 7.0
    7 Stable tag: 3.1.2
     5Tested up to: 6.4.1
     6Requires PHP: 7.4
     7Stable tag: 3.1.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747== Changelog ==
    4848
    49 = 3.1.2 =
    50 *Release Date - 11 September 2023*
     49= 3.1.3 =
     50*Release Date - 17 November 2023*
    5151
    52 * Fixed: Fix wrong CSM mode make draft preview blank page.
    53 * Fixed: Fix CSM meta boxes didn't work.
    54 * Fixed: Remove unused constant `PAGE_TYPE`.
     52* Fixed: Fix background image option is not working in While Label.
     53* Fixed: Fix bug duplicate array type in meta fields.
     54* Fixed: Fix bug prevent sanitize filename for unexpected file types.
  • fiber-admin/trunk/changelog.txt

    r2965072 r2997423  
    11== Changelog ==
     2
     3= 3.1.3 =
     4*Release Date - 17 November 2023*
     5
     6* Fixed: Fix background image option is not working in While Label.
     7* Fixed: Fix bug duplicate array type in meta fields.
     8* Fixed: Fix bug prevent sanitize filename for unexpected file types.
    29
    310= 3.1.2 =
  • fiber-admin/trunk/fiberadmin.php

    r2965072 r2997423  
    44 * Plugin URI:        https://wordpress.org/plugins/fiber-admin/
    55 * Description:       💈 Bring multiple customization features to make your own WordPress admin.
    6  * Version:           3.1.2
     6 * Version:           3.1.3
    77 * Requires at least: 5.2
    8  * Requires PHP:      7.0
     8 * Requires PHP:      7.4
    99 * Author:            Dao
    1010 * Author URI:        https://daochau.com/
  • fiber-admin/trunk/includes/attachment.php

    r2962829 r2997423  
    3838   
    3939    public function fiad_cleanup_attachment_name($filename, $filename_raw){
    40         $file_extension = pathinfo($filename, PATHINFO_EXTENSION);
    41         $exclude_exts   = ['css', 'js']; // only apply for media attachment, not for code
    42        
    43         if($file_extension && !in_array($file_extension, $exclude_exts)){
    44             $sanitized_filename = basename($filename, "." . $file_extension);
    45             $sanitized_filename = strtolower($sanitized_filename);
     40        $file_extension       = pathinfo($filename, PATHINFO_EXTENSION);
     41        $supported_exts       = [];
     42        $ext_types            = wp_get_ext_types();
     43        $supported_file_types = ['image', 'audio', 'video', 'document', 'spreadsheet'];
     44        foreach($supported_file_types as $type){
     45            $supported_exts = array_merge($supported_exts, $ext_types[$type]);
     46        }
     47        if($file_extension && in_array($file_extension, $supported_exts)){
     48            $sanitized_filename = strtolower(basename($filename, "." . $file_extension));
    4649           
    4750            //handle urlencoded chars
  • fiber-admin/trunk/includes/duplicate.php

    r2689928 r2997423  
    1111    public function __construct(){
    1212        // for non-hierarchy post types
    13         add_filter('post_row_actions', array($this, 'fiad_duplicate_link'), 10, 2);
     13        add_filter('post_row_actions', [$this, 'fiad_duplicate_link'], 10, 2);
    1414        // for hierarchy post types
    15         add_filter('page_row_actions', array($this, 'fiad_duplicate_link'), 10, 2);
     15        add_filter('page_row_actions', [$this, 'fiad_duplicate_link'], 10, 2);
    1616       
    1717        // duplicate
    18         add_action('admin_action_fiad_duplicate_post_as_draft', array($this, 'fiad_duplicate_post_as_draft'));
     18        add_action('admin_action_fiad_duplicate_post_as_draft', [$this, 'fiad_duplicate_post_as_draft']);
    1919       
    2020        // bulk actions
     
    2222        if($duplicate_post_types){
    2323            foreach($duplicate_post_types as $post_type){
    24                 add_filter('bulk_actions-edit-' . $post_type, array($this, 'fiad_bulk_duplicate'));
    25                 add_filter('handle_bulk_actions-edit-' . $post_type, array(
     24                add_filter('bulk_actions-edit-' . $post_type, [$this, 'fiad_bulk_duplicate']);
     25                add_filter('handle_bulk_actions-edit-' . $post_type, [
    2626                    $this,
    27                     'fiad_bulk_duplicate_handler'
    28                 ), 10, 3);
     27                    'fiad_bulk_duplicate_handler',
     28                ], 10, 3);
    2929            }
    3030        }
    3131       
    3232        // admin notices
    33         add_action('admin_notices', array($this, 'fiad_duplicate_admin_notice'));
     33        add_action('admin_notices', [$this, 'fiad_duplicate_admin_notice']);
    3434    }
    3535   
    3636    public function fiad_duplicate_link($actions, $post){
    37         $duplicate_post_types = fiad_get_duplicate_option('exclude_post_types');
    38        
    3937        if(!current_user_can('edit_posts')){
    4038            return $actions;
     
    4745       
    4846        // check duplicate settings
    49         $duplicate_enable = false;
     47        $duplicate_post_types = fiad_get_duplicate_option('exclude_post_types');
     48        $duplicate_enable     = false;
    5049        if(empty($duplicate_post_types)){
    5150            $duplicate_enable = true;
     
    5857            $url = wp_nonce_url(
    5958                add_query_arg(
    60                     array(
     59                    [
    6160                        'action' => 'fiad_duplicate_post_as_draft',
    6261                        'post'   => $post->ID,
    63                     ),
     62                    ],
    6463                    'admin.php'
    6564                ),
     
    8584        if($post){
    8685            // insert new post
    87             $args        = array(
     86            $args        = [
    8887                'comment_status' => $post->comment_status,
    8988                'ping_status'    => $post->ping_status,
     
    9796                'post_title'     => $post->post_title,
    9897                'post_type'      => $post->post_type,
    99                 'to_ping'        => $post->to_ping
    100             );
     98                'to_ping'        => $post->to_ping,
     99            ];
    101100            $new_post_id = wp_insert_post($args);
    102101           
     
    105104            if($taxonomies){
    106105                foreach($taxonomies as $taxonomy){
    107                     $post_terms = wp_get_object_terms($post_id, $taxonomy, array('fields' => 'slugs'));
     106                    $post_terms = wp_get_object_terms($post_id, $taxonomy, ['fields' => 'slugs']);
    108107                    wp_set_object_terms($new_post_id, $post_terms, $taxonomy);
    109108                }
     
    113112            $post_meta = get_post_meta($post_id);
    114113            if($post_meta){
    115                
    116114                foreach($post_meta as $meta_key => $meta_values){
    117                    
    118115                    if('_wp_old_slug' == $meta_key){ // exclude special meta key
    119116                        continue;
     
    121118                   
    122119                    foreach($meta_values as $meta_value){
    123                         add_post_meta($new_post_id, $meta_key, $meta_value);
     120                        add_post_meta($new_post_id, $meta_key, maybe_unserialize($meta_value));
    124121                    }
    125122                }
     
    153150            wp_safe_redirect(
    154151                add_query_arg(
    155                     array(
     152                    [
    156153                        'post_type' => ('post' !== get_post_type($post) ? get_post_type($post) : false),
    157                         'saved'     => 'fiad_post_duplication_created'
    158                     ),
     154                        'saved'     => 'fiad_post_duplication_created',
     155                    ],
    159156                    admin_url('edit.php')
    160157                )
     
    176173       
    177174        // let's remove query args first
    178         $redirect = remove_query_arg(array('fiad_duplicate'), $redirect);
     175        $redirect = remove_query_arg(['fiad_duplicate'], $redirect);
    179176       
    180177        // bulk duplicate
  • fiber-admin/trunk/includes/login.php

    r2727158 r2997423  
    1111    public function __construct(){
    1212        // Login Interface
    13         add_action('login_enqueue_scripts', array($this, 'fiad_login_css'));
     13        add_action('login_enqueue_scripts', [$this, 'fiad_login_css']);
    1414    }
    1515   
     
    6161        if($background_image && !$bg_css){
    6262            $bg_css = 'body.login{';
    63             $bg_css .= 'background:url("' . $background_image . '") center / cover no-repeat !important;';
     63            $bg_css .= 'background:url(' . $background_image . ') center / cover no-repeat !important;';
    6464            $bg_css .= '}';
    6565        }
  • fiber-admin/trunk/readme.txt

    r2965072 r2997423  
    33Tags: white label, admin tool, duplicate post, content protection
    44Requires at least: 4.7
    5 Tested up to: 6.3.1
    6 Requires PHP: 7.0
    7 Stable tag: 3.1.2
     5Tested up to: 6.4.1
     6Requires PHP: 7.4
     7Stable tag: 3.1.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747== Changelog ==
    4848
    49 = 3.1.2 =
    50 *Release Date - 11 September 2023*
     49= 3.1.3 =
     50*Release Date - 17 November 2023*
    5151
    52 * Fixed: Fix wrong CSM mode make draft preview blank page.
    53 * Fixed: Fix CSM meta boxes didn't work.
    54 * Fixed: Remove unused constant `PAGE_TYPE`.
     52* Fixed: Fix background image option is not working in While Label.
     53* Fixed: Fix bug duplicate array type in meta fields.
     54* Fixed: Fix bug prevent sanitize filename for unexpected file types.
Note: See TracChangeset for help on using the changeset viewer.