We released Pressbooks 4.0.0 on GitHub earlier this week and finished deploying it across our hosted networks on Wednesday. Here’s what changed:
Building on Brad Payne’s original REST API for Pressbooks, we’ve introduced an improved and expanded REST API based on the WordPress Core REST API infrastructure. The Pressbooks REST API v2 supports authenticated CRUD (Create, Read, Update, Destroy) access to all Pressbooks content types (front and back matter, parts, and chapters) as well as read-only access to book structure and metadata. For more information, see our REST API documentation. We’re excited to see what the Pressbooks Open Source community will do with these new API capabilities! Share your projects with us: firstname.lastname@example.org.
Pressbooks’ core LaTeX renderer now produces high resolution output suitable for print! More improvements to come, and thanks for your patience as we’ve worked to improve this important feature.
Want to mark all chapters for export on the Organize screen? You can do that now! Trashed something that you want back? Just navigate to Text → Trash and you can restore it. Many more improvements to come!
The Pressbooks command line interface is now part of Pressbooks. Want to make your own book theme? Run
wp scaffold book-theme from the root of your Pressbooks install and take advantage of our intuitive SCSS-based theme structure. More commands to come — submit your ideas!
NOTICE: Upon upgrading to Pressbooks 4.0, you will need to install the Pressbooks Book and Pressbooks Publisher themes along with any of our other open source book themes that were bundled with earlier versions of Pressbooks. For more information, see the upgrading instructions.
NOTICE: Pressbooks 4.0 requires WordPress 4.8.0.
- Feature: REST API v2 (see #472, #763, #770, #771, #774, #778, #780, #781, #783, #785, #788, #798, #803, #804, #806, #807, #810, #812, #815, #816, #823, #832, and our API Docs
- Feature: LaTeX outputs are now at a sufficient resolution for print applications (see #819).
- Feature: You can now change statuses in bulk on the Organize page (see #249 and #822).
- Feature: Deleted content can now be restored from Text → Trash (see 9283c26).
- Enhancement: The Pressbooks CLI is now bundled in Pressbooks (see #464 and #826).
new \Pressbooks\Metadata()now returns book metadata as an implementation of JsonSerializeable (see #804 and #832).
- Enhancement: Expanded metadata is now hidden on the Book Information page unless needed (see #804 and #832).
- Enhancement: We now use the Human Made coding standards for PHP. Check your code before submitting a PR 👍.
Enhancement: We now use Laravel Mix to handle all plugin assets (see #769 and #795). Making a change in
/assets/src/? With Yarn installed in your development environment, run
yarn && yarn run buildto build assets for distribution.
Enhancement: SCSS files can now be checked against our coding standards using stylelint with the command
yarn run lint(see #743 and #817).
Enhancement: JS files have been updated to ES6 and can now be checked against our coding standards using eslint with the command
yarn run lint(see #829).
- Enhancement: Root and book themes are now distributed separately from the Pressbooks plugin — make sure you install the required themes when you upgrade! (See #756 and #799.)
- Enhancement: Part content has been migrated to the standard content editor instead of a custom field (see #486 and #764).
- Enhancement: The Search and Replace module has been heavily optimized, reducing memory usage by ~85% (see #759 and #793).
Enhancement: Additional post types can be added to the list of permitted post types for editing using the
pb_supported_post_typesfilter (props to @SteelWagstaff, see #758).
- Enhancement: We now use vanilla/htmlawed as our htmLawed provider (see #767).
Enhancement: Developers can now add new import types via the
pb_initialize_importfilter hooks (props @bdolor; see #802 and #811).
- Enhancement: Releases are now packaged automatically via Travis (see #730 and #821).
- Fix: DOCX and ODT files exported from Google Docs (which lack standard metadata) can now be imported without issue via the import module (see #837 and #838).
Fix: Images are now set to a
auto, normalrather than 300dpi for more reliably high-quality print PDF output (see #744 and #776).
- Fix: Text suggesting that we offer printing services has been removed from the Publish page (see #784).
- Fix: Export downloads from the webbook include the proper file extensions (props to @bdolor; see #808).
- Fix: Current privacy settings are now displayed properly when updating book privacy from the Organize page (see #711 and #801).
- Fix: The editor style is now enqueued with a version for cache busting (see #813 and #814).
- Fix: The Search and Replace module no longer searches items in the trash (see 6978734).
- Fix: Miscellaneous improvements to improve performance and reduce unnecessary error output.