add_filter( 'manage_wl_recettes_posts_columns', 'set_custom_edit_wl_recettes_columns' );
function set_custom_edit_wl_recettes_columns($columns) {
    $new_columns = array();
    
    foreach($columns as $key=>$value) {
        if($key=='date') {
           $new_columns['featured_recipe'] = __('Produit vedette', 'webloft');
        }    
        $new_columns[$key]=$value;
    }
    
    return $new_columns;
}

add_filter( 'manage_edit-wl_recettes_sortable_columns', 'wl_recettes_sortable_columns' );
function wl_recettes_sortable_columns( $columns ) {
	$columns['featured_recipe'] = "featured_recipe";
	
	return $columns;
}

add_action( 'manage_wl_recettes_posts_custom_column' , 'custom_wl_recettes_column', 10, 2 );
function custom_wl_recettes_column( $column, $post_id ) {
    if ( 'featured_recipe' != $column )
        return;
        
    $check = get_post_meta($post_id, 'wl_recipe_featured', true);
    if ($check)
        echo '<strong style="font-size:18px;">✓</strong>';
}

add_action( 'pre_get_posts', 'my_wl_recettes_orderby' );
function my_wl_recettes_orderby( $query ) {
    if( ! is_admin() )
        return;
 
    $orderby = $query->get( 'orderby');
 
    if( 'featured_recipe' == $orderby ) {
        $query->set('meta_key', 'wl_recipe_featured');
        $query->set('orderby', 'meta_value_num');
    }
}