@@ -36,8 +36,8 @@ function get_columns( $columns = false ) {
3636 $ columns = apply_filters ( 'acm_list_table_columns ' , !is_array ( $ columns ) || empty ( $ columns ) ? $ default : $ columns );
3737 // Fail-safe for misconfiguration
3838 $ required_before = array (
39- 'cb ' => ' <input type="checkbox" /> ' ,
40- 'id ' => __ ( ' ID ' , ' ad-code-manager ' ) ,
39+ 'id ' => __ ( ' ID ' , ' ad-code-manager ' ) ,
40+ 'cb ' => ' <input type="checkbox" /> ' ,
4141 );
4242 $ required_after = array (
4343 'priority ' => __ ( 'Priority ' , 'ad-code-manager ' ),
@@ -162,6 +162,7 @@ function column_default( $item, $column_name ) {
162162 case 'operator ' :
163163 return ( ! empty ( $ item ['operator ' ] ) ) ? $ item ['operator ' ] : $ ad_code_manager ->logical_operator ;
164164 default :
165+ // @todo need to make the first column (whatever it is filtered) to show row actions
165166 // Handle custom columns, if any
166167 if ( isset ( $ item ['url_vars ' ][$ column_name ] ) )
167168 return esc_html ( $ item ['url_vars ' ][$ column_name ] );
@@ -190,7 +191,6 @@ function column_cb( $item ) {
190191 */
191192 function column_id ( $ item ) {
192193 global $ ad_code_manager ;
193-
194194 $ output = '<div id="inline_ ' . $ item ['post_id ' ] . '" style="display:none;"> ' ;
195195 $ output .= '<div class="id"> ' . $ item ['post_id ' ] . '</div> ' ;
196196 // Build the fields for the conditionals
@@ -283,6 +283,7 @@ function column_conditionals( $item ) {
283283 function row_actions_output ( $ item ) {
284284
285285 $ output = '' ;
286+ $ row_actions ['preview-ad-code ' ] = '<a class="acm-ajax-preview" id="acm-preview- ' . $ item [ 'post_id ' ] . '" href="#"> ' . __ ( 'Preview Ad Code ' , 'ad-code-manager ' ) . '</a> ' ;
286287 $ row_actions ['edit ' ] = '<a class="acm-ajax-edit" id="acm-edit- ' . $ item [ 'post_id ' ] . '" href="#"> ' . __ ( 'Edit Ad Code ' , 'ad-code-manager ' ) . '</a> ' ;
287288
288289 $ args = array (
@@ -293,8 +294,8 @@ function row_actions_output( $item ) {
293294 );
294295 $ delete_link = add_query_arg ( $ args , admin_url ( 'admin-ajax.php ' ) );
295296 $ row_actions ['delete ' ] = '<a class="acm-ajax-delete" id="acm-delete- ' . $ item [ 'post_id ' ] . '" href=" ' . esc_url ( $ delete_link ) . '"> ' . __ ( 'Delete ' , 'ad-code-manager ' ) . '</a> ' ;
296- $ output .= $ this ->row_actions ( $ row_actions );
297297
298+ $ output .= $ this ->row_actions ( $ row_actions );
298299 return $ output ;
299300 }
300301
0 commit comments