Plugin Directory

Changeset 2790038


Ignore:
Timestamp:
09/26/2022 03:14:43 AM (3 years ago)
Author:
daomapsieucap
Message:

Update to version 2.0.13 from GitHub

Location:
fiber-admin
Files:
8 edited
1 copied

Legend:

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

    r2787468 r2790038  
    11== Changelog ==
     2
     3= 2.0.13 =
     4*Release Date - 26 September 2022*
     5
     6* Fixed: Check before re-order CPO.
    27
    38= 2.0.12 =
  • fiber-admin/tags/2.0.13/fiberadmin.php

    r2787468 r2790038  
    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.12
     6 * Version:           2.0.13
    77 * Requires at least: 5.2
    88 * Requires PHP:      7.0
  • fiber-admin/tags/2.0.13/includes/cpo.php

    r2787468 r2790038  
    107107   
    108108    public function fiad_cpo_insert($post_id, $post, $update){
    109         if(!$update){
    110             global $wpdb;
    111             $order_start = 0;
    112            
    113             $wpdb->update($wpdb->posts, array('menu_order' => $order_start), array('ID' => intval($post_id)));
    114            
    115             $update_posts_args  = array(
    116                 'post_type'        => $post->post_type,
    117                 'posts_per_page'   => - 1,
    118                 'post_status'      => 'publish',
    119                 'orderby'          => 'menu_order',
    120                 'order'            => 'ASC',
    121                 'post__not_in'     => array($post_id),
    122                 'suppress_filters' => false,
    123                 'fields'           => 'ids'
    124             );
    125             $update_posts_query = new WP_Query($update_posts_args);
    126             if($update_posts_query->have_posts()){
    127                 foreach($update_posts_query->posts as $index => $id){
    128                     $wpdb->update($wpdb->posts, array('menu_order' => intval($index + 1)), array('ID' => intval($id)));
    129                     $order_start ++;
     109        $post_types = fiad_get_cpo_option('post_types');
     110        if(!$update && $post_types){
     111            $current_post_type = $post->post_type;
     112            if(in_array($current_post_type, $post_types)){
     113                global $wpdb;
     114                $order_start = 0;
     115               
     116                $wpdb->update($wpdb->posts, array('menu_order' => $order_start), array('ID' => intval($post_id)));
     117               
     118                $update_posts_args  = array(
     119                    'post_type'        => $post->post_type,
     120                    'posts_per_page'   => - 1,
     121                    'post_status'      => 'publish',
     122                    'orderby'          => 'menu_order',
     123                    'order'            => 'ASC',
     124                    'post__not_in'     => array($post_id),
     125                    'suppress_filters' => false,
     126                    'fields'           => 'ids'
     127                );
     128                $update_posts_query = new WP_Query($update_posts_args);
     129                if($update_posts_query->have_posts()){
     130                    foreach($update_posts_query->posts as $index => $id){
     131                        $wpdb->update($wpdb->posts, array('menu_order' => intval($index + 1)), array('ID' => intval($id)));
     132                        $order_start ++;
     133                    }
    130134                }
    131135            }
  • fiber-admin/tags/2.0.13/readme.txt

    r2787468 r2790038  
    55Tested up to: 6.0.1
    66Requires PHP: 7.0
    7 Stable tag: 2.0.12
     7Stable tag: 2.0.13
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747== Changelog ==
    4848
    49 = 2.0.12 =
    50 *Release Date - 20 September 2022*
     49= 2.0.13 =
     50*Release Date - 26 September 2022*
    5151
    52 * Fixed: Fix issue CPO creating new post.
     52* Fixed: Check before re-order CPO.
  • fiber-admin/trunk/changelog.txt

    r2787468 r2790038  
    11== Changelog ==
     2
     3= 2.0.13 =
     4*Release Date - 26 September 2022*
     5
     6* Fixed: Check before re-order CPO.
    27
    38= 2.0.12 =
  • fiber-admin/trunk/fiberadmin.php

    r2787468 r2790038  
    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.12
     6 * Version:           2.0.13
    77 * Requires at least: 5.2
    88 * Requires PHP:      7.0
  • fiber-admin/trunk/includes/cpo.php

    r2787468 r2790038  
    107107   
    108108    public function fiad_cpo_insert($post_id, $post, $update){
    109         if(!$update){
    110             global $wpdb;
    111             $order_start = 0;
    112            
    113             $wpdb->update($wpdb->posts, array('menu_order' => $order_start), array('ID' => intval($post_id)));
    114            
    115             $update_posts_args  = array(
    116                 'post_type'        => $post->post_type,
    117                 'posts_per_page'   => - 1,
    118                 'post_status'      => 'publish',
    119                 'orderby'          => 'menu_order',
    120                 'order'            => 'ASC',
    121                 'post__not_in'     => array($post_id),
    122                 'suppress_filters' => false,
    123                 'fields'           => 'ids'
    124             );
    125             $update_posts_query = new WP_Query($update_posts_args);
    126             if($update_posts_query->have_posts()){
    127                 foreach($update_posts_query->posts as $index => $id){
    128                     $wpdb->update($wpdb->posts, array('menu_order' => intval($index + 1)), array('ID' => intval($id)));
    129                     $order_start ++;
     109        $post_types = fiad_get_cpo_option('post_types');
     110        if(!$update && $post_types){
     111            $current_post_type = $post->post_type;
     112            if(in_array($current_post_type, $post_types)){
     113                global $wpdb;
     114                $order_start = 0;
     115               
     116                $wpdb->update($wpdb->posts, array('menu_order' => $order_start), array('ID' => intval($post_id)));
     117               
     118                $update_posts_args  = array(
     119                    'post_type'        => $post->post_type,
     120                    'posts_per_page'   => - 1,
     121                    'post_status'      => 'publish',
     122                    'orderby'          => 'menu_order',
     123                    'order'            => 'ASC',
     124                    'post__not_in'     => array($post_id),
     125                    'suppress_filters' => false,
     126                    'fields'           => 'ids'
     127                );
     128                $update_posts_query = new WP_Query($update_posts_args);
     129                if($update_posts_query->have_posts()){
     130                    foreach($update_posts_query->posts as $index => $id){
     131                        $wpdb->update($wpdb->posts, array('menu_order' => intval($index + 1)), array('ID' => intval($id)));
     132                        $order_start ++;
     133                    }
    130134                }
    131135            }
  • fiber-admin/trunk/readme.txt

    r2787468 r2790038  
    55Tested up to: 6.0.1
    66Requires PHP: 7.0
    7 Stable tag: 2.0.12
     7Stable tag: 2.0.13
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747== Changelog ==
    4848
    49 = 2.0.12 =
    50 *Release Date - 20 September 2022*
     49= 2.0.13 =
     50*Release Date - 26 September 2022*
    5151
    52 * Fixed: Fix issue CPO creating new post.
     52* Fixed: Check before re-order CPO.
Note: See TracChangeset for help on using the changeset viewer.