GithubHelp home page GithubHelp logo

bccampus / excel-export Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 4.0 4.54 MB

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

Shell 18.23% PHP 81.77%

excel-export's People

Contributors

alex-418 avatar bdolor avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

excel-export's Issues

PHPExcel - DEPRECATED

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.).

Add nonce

When submitting the form for both the export users and export post buttons.

Update documentation and screenshot

  • 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

Privacy by Design

Let's take a look at the export feature from a FIPPA and GDPR perspective.

Add get_userdata() to export

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.

Options Screen

Add options Screen to allow users to choose what data to export to excel:

  • Pages
  • Post
  • Custom post types
  • Users

Users BP extended profile data won't export unless two specific fields/data exist

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:

$all_data_with_keys = array_combine( $alpha_keys, array_values( $all_data ) );

$data = ( false !== array_combine( $data, $bp ) ) ? array_combine( $data, $bp ) : [];

Get all user meta

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().

Sanitize Object Properties

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.