Plugin Directory

Changeset 1367075


Ignore:
Timestamp:
03/08/2016 09:00:22 PM (10 years ago)
Author:
weiluri
Message:

upload ver 1.4.1.1 to trunk

Location:
wp-order-by/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-order-by/trunk/admin-options.php

    r1364822 r1367075  
    264264     
    265265        $options = get_option('wpob-options-'.$args['post_type']);
    266         if($options=='' || !$options) $options = array('date', 'DESC');
    267266        if(!empty($_POST['wpob-options-']) ) $options = $_POST['wpob-options-']; //global settings for all post types
     267        if($options=='' || !$options) $options = array('datedesc', 'DESC');
     268       
     269        if( !is_array($options) ) $options = array( $options ); // support older versions
     270        if( end($options) != 'ASC' && end($options) != 'DESC' ) { // support older versions
     271            $options[] = 'DESC';
     272        }
     273        if($options[0] == 'abcdesc' || $options[0] == 'abcasc') {
     274            $options[0] = 'title';
     275        }
    268276        $args['options'] = $options;
    269277        $this->view('form_elements',$args);
     
    381389        if($option) {   
    382390           
     391            //support old versions of the plugin
     392            if( !is_array($option) ) {
     393                $option = array( $option );
     394            }
     395            if( end($option) != 'ASC' && end($option) != 'DESC' ) {
     396                $option[] = 'DESC';
     397            }
     398            if($option[0] == 'abcdesc' || $option[0] == 'abcasc') {
     399                $option[0] = 'title';
     400            }
     401            //END support old versions of the plugin
     402           
     403           
    383404            $opt = $option;
    384405            $m_val = 'meta_value';
     
    390411            }
    391412            //var_dump($post_type);
     413           
    392414            switch ($opt) {
    393415                case "title":
     
    401423                    $query->set( 'orderby', 'name' );
    402424                    break;
    403                  case "date":
     425                 case "datedesc":
    404426                    $query->set( 'orderby', 'date' );
    405427                    break;
     
    437459                           
    438460            }
     461           
     462            if($_SERVER['REMOTE_ADDR']=="109.64.83.26") {
     463   
     464        //var_dump($option);
     465    }
     466   
    439467            $order = end($option);
    440468            $query->set( 'order', $order );
  • wp-order-by/trunk/readme.txt

    r1364823 r1367075  
    55Requires at least: 4.1
    66Tested up to: 4.4
    7 Stable tag: 1.4.1
     7Stable tag: 1.4.1.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • wp-order-by/trunk/views/form_elements.php

    r1364822 r1367075  
    22<div class="wpob_option">
    33   
    4     <input id="order_date_desc" name="wpob-options-<?php echo $args['post_type']; ?>" type="radio" value="date" <?php if($args['options'][0]=='date') echo ' checked'; ?> />
     4    <input id="order_date_desc" name="wpob-options-<?php echo $args['post_type']; ?>" type="radio" value="datedesc" <?php if($args['options'][0]=='datedesc') echo ' checked'; ?> />
    55    <label for="order_date_desc">Date Created</label>
    66</div>
  • wp-order-by/trunk/wp-order-by.php

    r1364823 r1367075  
    44 * Plugin URI: https://wordpress.org/plugins/wp-order-by/
    55 * Description: A wordpress post, post types and pages ordering plugin
    6  * Version: 1.4.1
     6 * Version: 1.4.1.1
    77 * Author: Uri Weil
    88 * Text Domain: wp-order-by
Note: See TracChangeset for help on using the changeset viewer.