Plugin Directory

Changeset 2818689


Ignore:
Timestamp:
11/16/2022 02:56:59 AM (3 years ago)
Author:
dyggrid
Message:

changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dyggrid/tags/1.2.3/dyg-post-grid/includes/class-dygpg-postgrid.php

    r2818007 r2818689  
    144144    public function dyg_post_grid($shortcode_atts = [], $inner = false) {
    145145        $shortcode_atts = apply_filters('dygpg-shortcode-atts', $shortcode_atts);
    146        
     146
    147147        $this->atts               = $shortcode_atts;
    148148        $this->args               = $shortcode_atts;
    149149        $this->doing_full_wrapper = TRUE; // this will not be set during load more.  used to check if filter widgets etc are required
    150 
    151150        //dont continue if no shortcode is provided
    152151        if (empty($shortcode_atts['id'] ?? '') && empty($shortcode_atts['post-id'] ?? ''))
    153152            return "<div>Your dyggrid shortcode is missing 'id=put-id-here'</div>";
    154        
     153
    155154        $this->handle_id($shortcode_atts['id'] ?? '');
    156155
     
    382381            'project_category' => $this->args['projectcategory'],
    383382            'post_parent'      => $this->args['postparent'],
    384             'orderby'          => $this->args['orderby'],
    385             'order'            => $this->args['order'],
     383            'orderby'          => empty($this->args['orderby']) ? 'ID' : $this->args['orderby'], //empty sort order causes issues with paging
     384            'order'            => empty($this->args['order']) ? 'ASC' : $this->args['order'],
    386385            'meta_key'         => $this->args['meta-key'],
    387386            'posts_per_page'   => $this->args['pagesize'],
     
    614613            return $this->public_edit_id();
    615614
    616         if (isset($_POST['is_fb_preview']) || !is_user_logged_in() or !current_user_can('administrator'))
     615        if (isset($_POST['is_fb_preview']) || !is_user_logged_in() or!current_user_can('administrator'))
    617616            return '';
    618617
Note: See TracChangeset for help on using the changeset viewer.