bccampus / excel-export Goto Github PK
View Code? Open in Web Editor NEWWordPress Plugin that exports all of your posts, pages, custom post types, and user data to Excel file format (.XLSX)
License: GNU General Public License v2.0
WordPress Plugin that exports all of your posts, pages, custom post types, and user data to Excel file format (.XLSX)
License: GNU General Public License v2.0
Migrate to its direct successor PhpSpreadsheet. This will break compatibility to dramatically improve the code base quality (namespaces, PSR compliance, use of latest PHP language features, etc.).
When submitting the form for both the export users and export post buttons.
Stay DRY in creating an export function that gets the export data requested in the options screen.
Options page added in admin. Located in Settings->Excel Export.
Now supports exporting any post type. It will find all available post types on your website for export. (labels aren't quite right yet, but the data is there)
Exports all user data, and is now unserialized for readability. (BuddyPress user data is almost there, working on it)
Update the screenshot
Create the column labels based on the data, map them to correct columns, and add the document properties.
Let's take a look at the export feature from a FIPPA and GDPR perspective.
Currently only the get_user_meta()
values and labels are exported. Export the get_userdata()
Fields and Values as well. May require Typecasting the WP_User object to convert into an associative array, and then combine that array with the one that's currently used for export.
Add options Screen to allow users to choose what data to export to excel:
Exporting users extended buddy press field data will fail on a site that doesn't have this filter and associated data which is in the EYPD theme functions file.
The following lines use array_combine
which return FALSE without the above fields/data:
excel-export/inc/users/namespace.php
Line 86 in 5e8a49a
excel-export/inc/users/namespace.php
Line 198 in 5e8a49a
Export of user data not working as expected after recent changes, there are duplicate values and extra columns.
Currently providing a $key argument on get_user_meta()
to extract specific data. Leaving the $key
argument blank retrieves all meta data for the given user. We can then use array_map()
on the results of get_user_meta()
in order to take only the first index of each result, and then Filter out empty values by using array_filter()
on the results of the array_map()
.
Currently using Complex (curly) syntax manually to allow for the use of complex expressions when object properties include an unexpected character. Example: $presenter = $post->{'Presenter(s)'};
A better approach to automate this might be sanitizing the object properties.
Check for Buddy Press, and if it exists, use bp_get_profile_field_data()
or similar to get the extended profile data for the user (fields and values), and add this to the export array.
Currently exports the raw values, for example the value of wp_capabilities is exported as a:2:{s:13:"administrator";b:1;s:13:"bbp_keymaster";b:1;}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.