Simple CSV Exporter Wordpress Plugin - Rating, Reviews, Demo & Download

Simple CSV Exporter Wordpress Plugin - Rating, Reviews, Demo & Download
No ratings yet
Free
Follow for free plugins, new theme releases and theme news

Plugin Description

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 HAMWORKSWPSimple_CSV_ExporterData_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_created_data_builder_for_wp_posts_pre_get_posts', 
    function ( WP_Query $query ) {
        $query->set( 'order', 'ASC' );
    }
);

Data filter for metadata.

use HAMWORKSWPSimple_CSV_ExporterData_Builder;
add_filter( 'simple_csv_exporter_created_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;
    }
);

Screenshots

No screenshots provided


Reviews & Comments