Plugin Directory

Changeset 624205


Ignore:
Timestamp:
11/12/2012 08:51:49 PM (13 years ago)
Author:
iluminatus
Message:

Fixing problems with sort_by_blog and sort_by_date

Location:
network-latest-posts/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • network-latest-posts/trunk/network-latest-posts-widget.php

    r620259 r624205  
    4949        'tag'              => NULL,          // Tag(s) to display
    5050        'paginate'         => FALSE,         // Paginate results
    51         'posts_per_page'   => NULL,          // Number of posts per page (paginate needs to be active)
     51        'posts_per_page'   => NULL,          // Number of posts per page (paginate must be activated)
    5252        'excerpt_length'   => NULL,          // Excerpt's length
    5353        'auto_excerpt'     => FALSE,         // Generate excerpt from content
     
    5555        'full_meta'        => FALSE,         // Display full metadata
    5656        'sort_by_date'     => FALSE,         // Display the latest posts first regardless of the blog they come from
    57         'sort_by_blog'     => FALSE,         // Sort by blog ID
    58         'sorting_order'    => NULL,          // Sort posts from Newest to Oldest or vice versa (newer / older), asc / desc for blog IDs
     57        'sort_by_blog'     => FALSE,         // Sort by Blog ID
     58        'sorting_order'    => NULL,          // Sort posts from Newest to Oldest or vice versa (newer / older), asc / desc for blog ID
    5959        'sorting_limit'    => NULL,          // Limit the number of sorted posts to display
    6060        'post_status'      => 'publish',     // Post status (publish, new, pending, draft, auto-draft, future, private, inherit, trash)
     
    6262        'wrapper_list_css' => 'nav nav-tabs nav-stacked', // Custom CSS classes for the list wrapper
    6363        'wrapper_block_css'=> 'content',     // Custom CSS classes for the block wrapper
    64         'instance'         => NULL,          // Instance identifier, used to uniquely differenciate each widget
    65         'random'           => FALSE,
    66         'post_ignore'      => NULL
     64        'random'           => FALSE,         // Pull random posts (true or false)
     65        'post_ignore'      => NULL           // Post ID(s) to ignore
    6766    );
    6867
  • network-latest-posts/trunk/network-latest-posts.php

    r622203 r624205  
    44Plugin URI: http://en.8elite.com/network-latest-posts
    55Description: Display the latest posts from the blogs in your network using it as a function, shortcode or widget.
    6 Version: 3.4.2
     6Version: 3.4.3
    77Author: L'Elite
    88Author URI: http://laelite.info/
     
    115115 * -- Anton Channing
    116116 * --- Spotted blog IDs were missing from element classes
     117 *
     118 * -- Julien Dizdar
     119 * --- Spotted a bug in sorting parameters
    117120 *
    118121 * That's it, let the fun begin!
     
    433436                setup_postdata($post);
    434437                // Sort by blog ID
    435                 if( $sort_by_blog ) {
     438                if( $sort_by_blog == 'true' ) {
    436439                    // Ignore Posts
    437440                    if( !in_array( $post->ID, $post_ignore ) ) {
     
    456459        }
    457460        // Sort by date (regardless blog IDs)
    458         if( $sort_by_date ) {
     461        if( $sort_by_date == 'true' ) {
    459462            // Sorting order (newer / older)
    460463            if( !empty($sorting_order) ) {
     
    498501        }
    499502        // Sort by blog ID
    500         if( $sort_by_blog ) {
     503        if( $sort_by_blog == 'true' ) {
    501504            // Sorting order (newer / older)
    502505            if( !empty($sorting_order) ) {
  • network-latest-posts/trunk/readme.txt

    r622203 r624205  
    55Requires at least: 3.0
    66Tested up to: 3.4.1
    7 Stable tag: 3.4.2
     7Stable tag: 3.4.3
    88
    99This plugin allows you to pull all the recent posts from the blogs in your WordPress network and display them in your main site (or internal sites)
     
    140140== Changelog ==
    141141
     142= 3.4.3 =
     143* Fixed bug while using sort_by_date and sort_by_blog, sorting capabilities were not working properly. Thanks to Julien Dizdar for reporting this bug.
     144
    142145= 3.4.2 =
    143146* Fixing typo in $thumbnail_custom variable
Note: See TracChangeset for help on using the changeset viewer.