v 1.0.0
Merged from PR #129, this is a major refactoring of how the plugin processes posts for conversion, with several bigger simplifications. The build process is fixed and new features are added.
Big changes
- Fixed old build process
- Removed custom table -- no longer using
ncc_wp_posts
and the complex queuing system - Removed hooks during plugin installation and uninstallation (which previously populated the "conversion queue"). Plugin installation/activation and deactivation/deletion does no longer affect any data
- Simple queuing system -- removed the previous conversion queue mechanism. Now whenever a conversion is clicked and started, it picks up all the existing posts that can to be converted on the fly, without any longer needing for the
reset
CLI command to "queue" new posts. Thereset
command was completely removed - Now using postmeta to store original post_content before conversion. Revisions were also considered, but those can get deleted because of the max number of revisions WP param -- when multiple revisions are created, old ones get deleted. Postmeta is permanent
- Restore -- ability to restore posts via GUI, option to restore all posts, or just some specific post IDs. Removed the CLI command because GUI has more options
- Refactored content filtering to use WP filters -- just for now, the patchers classes are still kept all the same, but they now get added to the new filters and executed WP-style. Moved all filtering (new filters) into
NewspackContentConverter\Converter::register_filters()
where they're now hardcoded and simplified- New filters are:
ncc_filter_html_before_conversion
ncc_filter_blocks_after_conversion
- And a new action:
ncc_after_post_content_updated
- New filters are:
Smaller changes
- Added a function which detects the blank screen, that is if the converter app fails to load. If the app is not loaded and rendered correctly, after 15sec a popup alert notifies the user to try and temporarily disable plugins, then try running again. This is the most common "fix" to make the plugin work, because some plugins modify Gutenberg layout, and this plugin can't catch up with all those possible modifications
- Refactored names of variables, methods and endpoints for more clarity
- Downloadable list of converted and unconverted IDs from GUI
- Posts get converted in ID DESC order (requested by our Team member)
- "Flush backups" button in the new "Restore" screen optionally permanently cleans up all the postmeta/backups (there's also an explicit recommendation that DB should be fully backed up before running the conversion, and the README contains a warning that authors of this plugin are not responsible for data loss)
- Updated composer dependencies
- Updated PHPCS to newer