Plugin Directory

Changeset 2787468


Ignore:
Timestamp:
09/20/2022 08:31:07 AM (3 years ago)
Author:
daomapsieucap
Message:

Update to version 2.0.12 from GitHub

Location:
fiber-admin
Files:
8 edited
1 copied

Legend:

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

    r2774044 r2787468  
    11== Changelog ==
     2
     3= 2.0.12 =
     4*Release Date - 20 September 2022*
     5
     6* Fixed: Fix issue CPO creating new post.
    27
    38= 2.0.11 =
  • fiber-admin/tags/2.0.12/fiberadmin.php

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

    r2760932 r2787468  
    1313        add_action('admin_enqueue_scripts', array($this, 'fiad_cpo_scripts'));
    1414       
     15        add_action('wp_insert_post', array($this, 'fiad_cpo_insert'), 10, 3);
    1516        add_action("wp_ajax_fiad_cpo_update", array($this, 'fiad_cpo_update'));
    1617        add_action("wp_ajax_nopriv_fiad_cpo_update", array($this, 'fiad_cpo_update'));
     
    105106    }
    106107   
     108    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 ++;
     130                }
     131            }
     132        }
     133    }
     134   
    107135    public function fiad_cpo_update_order($query){
    108136        if($query->is_main_query()){
     
    239267                'number'     => 1,
    240268                'orderby'    => 'term_order',
    241                 'order'      => 'ASC',
     269                'order'      => 'DESC',
    242270                'exclude'    => array($term_id)
    243271            );
  • fiber-admin/tags/2.0.12/readme.txt

    r2774044 r2787468  
    55Tested up to: 6.0.1
    66Requires PHP: 7.0
    7 Stable tag: 2.0.11
     7Stable tag: 2.0.12
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747== Changelog ==
    4848
    49 = 2.0.11 =
    50 *Release Date - 23 August 2022*
     49= 2.0.12 =
     50*Release Date - 20 September 2022*
    5151
    52 * Changed: Remove autocomplete caption image.
     52* Fixed: Fix issue CPO creating new post.
  • fiber-admin/trunk/changelog.txt

    r2774044 r2787468  
    11== Changelog ==
     2
     3= 2.0.12 =
     4*Release Date - 20 September 2022*
     5
     6* Fixed: Fix issue CPO creating new post.
    27
    38= 2.0.11 =
  • fiber-admin/trunk/fiberadmin.php

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

    r2760932 r2787468  
    1313        add_action('admin_enqueue_scripts', array($this, 'fiad_cpo_scripts'));
    1414       
     15        add_action('wp_insert_post', array($this, 'fiad_cpo_insert'), 10, 3);
    1516        add_action("wp_ajax_fiad_cpo_update", array($this, 'fiad_cpo_update'));
    1617        add_action("wp_ajax_nopriv_fiad_cpo_update", array($this, 'fiad_cpo_update'));
     
    105106    }
    106107   
     108    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 ++;
     130                }
     131            }
     132        }
     133    }
     134   
    107135    public function fiad_cpo_update_order($query){
    108136        if($query->is_main_query()){
     
    239267                'number'     => 1,
    240268                'orderby'    => 'term_order',
    241                 'order'      => 'ASC',
     269                'order'      => 'DESC',
    242270                'exclude'    => array($term_id)
    243271            );
  • fiber-admin/trunk/readme.txt

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