Skip to content

Commit

Permalink
Update to 1.2.7 : Add single table columns management
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahe committed Dec 18, 2014
1 parent e1c5aaa commit 2dff905
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bea_sender.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Author: BeApi
Domain Path: /languages/
Text Domain: bea_sender
Version: 1.2.6
Version: 1.2.7
*/

// Database declarations
Expand All @@ -24,7 +24,7 @@

define('BEA_SENDER_URL', plugin_dir_url ( __FILE__ ));
define('BEA_SENDER_DIR', plugin_dir_path( __FILE__ ));
define( 'BEA_SENDER_VER', '1.2.6' );
define( 'BEA_SENDER_VER', '1.2.7' );
define( 'BEA_SENDER_PPP', '10' );
define( 'BEA_SENDER_DEFAULT_COUNTER', 100 );
define( 'BEA_SENDER_OPTION_NAME', 'bea_s-main' );
Expand Down
10 changes: 6 additions & 4 deletions inc/utils/class.admin.table.single.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,23 @@ function no_items( ) {
* @author Nicolas Juen
*/
function column_default( $item, $column_name ) {
$value = '';
switch( $column_name ) {
case 'id' :
case 'email' :
case 'bounce_cat' :
case 'bounce_type' :
case 'bounce_no' :
return $item->$column_name;
$value = $item->$column_name;
break;
case 'current_status' :
return Bea_Sender_Client::getStatus( $item->current_status );
$value = Bea_Sender_Client::getStatus( $item->current_status );
break;
case 'campaign_status' :
return Bea_Sender_Client::getStatus( $item->campaign_current_status );
$value = Bea_Sender_Client::getStatus( $item->campaign_current_status );
break;
}
return apply_filters( 'manage_'.$this->screen->id.'_single_custom_column', $value, $item, $column_name );
}

/**
Expand Down Expand Up @@ -178,7 +180,7 @@ private static function get_status_filter( ) {
*/
function prepare_items( ) {
$this->_column_headers = array(
$this->get_columns( ),
apply_filters( "manage_{$this->screen->id}_single_columns", $this->get_columns( ) ),
array( ),
$this->get_sortable_columns( )
);
Expand Down

0 comments on commit 2dff905

Please sign in to comment.