Plugin Directory

Changeset 1588659


Ignore:
Timestamp:
02/04/2017 05:00:53 AM (9 years ago)
Author:
layotte
Message:

Tagging 1.3.0

Location:
pigeon-pack
Files:
68 added
4 edited

Legend:

Unmodified
Added
Removed
  • pigeon-pack/trunk/campaign-post-type.php

    r1514471 r1588659  
    136136
    137137
     138if ( !function_exists( 'pigeonpack_campaign_sortable_columns_posts_clauses' ) ) {
     139   
     140    function pigeonpack_campaign_sortable_columns_posts_clauses_request( $pieces, $query ) {
     141       global $wpdb;
     142       
     143       /**
     144        * We only want our code to run in the main WP query
     145        * AND if an orderby query variable is designated.
     146        */
     147       if ( $query->is_main_query() && ( $orderby = $query->get( 'orderby' ) ) ) {
     148   
     149          // Get the order query variable - ASC or DESC
     150          $order = strtoupper( $query->get( 'order' ) );
     151   
     152          // Make sure the order setting qualifies. If not, set default as ASC
     153          if ( ! in_array( $order, array( 'ASC', 'DESC' ) ) )
     154             $order = 'ASC';
     155   
     156          switch( $orderby ) {
     157       
     158             case 'campaign_type':
     159                $pieces['join'] .= " LEFT JOIN $wpdb->postmeta pigeonpack ON pigeonpack.post_id = {$wpdb->posts}.ID AND pigeonpack.meta_key = '_pigeonpack_campaign_type'";
     160                $pieces['orderby'] = " pigeonpack.meta_value $order, " . $pieces[ 'orderby' ];
     161             break;
     162           
     163          }
     164       
     165       }
     166   
     167       return $pieces;
     168   
     169    }
     170    add_filter( 'posts_clauses_request', 'pigeonpack_campaign_sortable_columns_posts_clauses_request', 1, 2 );
     171
     172}
     173
    138174if ( !function_exists( 'pigeonpack_human_readable_campaign_type' ) ) {
    139175       
  • pigeon-pack/trunk/functions.php

    r1514471 r1588659  
    454454            'offset'    => 0,
    455455        );
    456                    
     456       
    457457        extract( wp_parse_args( $args, $defaults ) );
    458458   
     
    501501     * @param object $query Current user query
    502502     */
    503     function pigeonpack_pre_user_query( &$query ) {
     503    function pigeonpack_pre_user_query( $query ) {
    504504       
    505505        global $wpdb;
     
    906906        if ( empty( $recipients_arr ) )
    907907            $recipients_arr = get_post_meta( $campaign->ID, '_pigeonpack_recipients', true );
    908        
     908           
    909909        $headers[] = 'From: ' . $from_name . ' <' . $from_email . '>';
    910910        $headers = apply_filters( 'pre_subscriber_loop_pigeonpack_headers', $headers );
  • pigeon-pack/trunk/pigeonpack.php

    r1514471 r1588659  
    1212Description: Free and easy email marketing, newsletters, and campaigns; built into your WordPress dashboard!
    1313Author: layotte
    14 Version: 1.2.0
     14Version: 1.3.0
    1515Author URI: http://pigeonpack.com/
    1616Tags: email, marketing, email marketing, newsletters, email newsletters, campaigns, email campaigns, widget, form, mailing lists
     
    2727
    2828//Define global variables...
    29 define( 'PIGEON_PACK_VERSION' , '1.2.0' );
     29define( 'PIGEON_PACK_VERSION' , '1.3.0' );
    3030define( 'PIGEON_PACK_DB_VERSION', '1.0.0' );
    3131define( 'PIGEON_PACK_API_URL', 'http://pigeonpack.com/api' );
  • pigeon-pack/trunk/readme.txt

    r1514472 r1588659  
    33Tags: email, campaign, newsletter, email marketing, widget, email newsletter, email widget, newsletter widget, widget
    44Requires at least: 3.4
    5 Tested up to: 4.7
    6 Stable tag: 1.2.0
     5Tested up to: 4.8
     6Stable tag: 1.3.0
    77
    88Free and easy email marketing, newsletters, and campaigns; built into your WordPress dashboard!
     
    6464
    6565== Changelog ==
     66
     67= 1.3.0 =
     68* Fixing column sort for campaign type column
     69* Modifying pre_user_query function
    6670
    6771= 1.2.0 =
Note: See TracChangeset for help on using the changeset viewer.