WordPress plugin? Bundle which files?

WordPress plugin? Bundle which files?

OllieJonesOllieJones Posts: 6Questions: 5Answers: 0
edited September 2021 in General

I'm building a WordPress plugin where I hope to use Datatables.net code on an administration page (to render some complex diagnostic data). I'm happy with Datatables's default styling. WordPress doesn't allow the use of CDNs in plugins to fetch css or Javascript, so I need to bundle the appropriate files in the plugin. I used the excellent bundler on the Download page to get the code I need.

Out of respect for my users I'm trying to make my plugin as lightweight as possible, so I'd like to "shake the tree" on Datatables and omit files I don't need.

I think I need datatables.min.js, datatables.min.css, and the .pngs in Datatables-1.11.3/images. I don't think I need anything else.

Do I have it right? Is there anything else I need to include?

(By the way, Datatables is great. But you already know that. Thanks!)

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    Ha, glad you like! Yep, that's the minimum you need for the base product - if you deploy any extensions you'll need those files too. It might be worth looking at TablePress, as that's a third-party wrapper for DataTables configuration.

    Colin

Sign In or Register to comment.