This plugin is outdated and might not be supported anymore
Simple CSV Exporter

Simple CSV Exporter

Details
View on WordPress

Simple CSV Exporter. Exported CSV can be imported with Really Simple CSV Importer.

When you select a post type, the posts will be exported.

Github Repo: https://github.com/hamworks/simple-csv-exporter

Customize the data to be exported

Customize for column.

use HAMWORKS\WP\Simple_CSV_Exporter\Data_Builder;
add_action( 'simple_csv_exporter_created_data_builder', 
    function ( Data_Builder $data ) {
        // Remove column.
        $data->append_drop_column( 'page_template' );
        // Add custom field column.
        $data->append_meta_key( 'my_meta_key' );
    }
);

Customize posts for export.

add_action( 'simple_csv_exporter_data_builder_for_wp_posts_pre_get_posts', 
    function ( WP_Query $query ) {
        $query->set( 'order', 'ASC' );
    }
);

Data filter for metadata.

add_filter( 'simple_csv_exporter_data_builder_for_wp_posts_get_post_meta_fields',
    function ( array $fields ) {
        foreach (
            array(
                'your_flag',
            ) as $key
        ) {
            if ( isset( $fields[ $key ] ) ) {
                $fields[ $key ] = ! empty( $fields[ $key ] ) ? 'TRUE' : 'FALSE';
            }
        }
        return $fields;
    }
);

Data filter for post.

add_filter(
    'simple_csv_exporter_data_builder_for_wp_posts_row_data',
    function ( $row_data, $post ) {
        $row_data['permalink'] = get_permalink( $post );
        unset( $row_data['comment_status'] );
        return $row_data;
    },
    10,
    2
);

Details

Plugin code:
simple-csv-exporter
Plugin version:
2.2.0
Author:
Outdated:
Yes
WP version:
5.8 or higher
PHP version:
8.0 or higher
Test up to WP version:
6.7.1
Total installations:
300
Last updated:
2024-11-28
Rating:
Times rated:
1
csv
export