=== JSON Post Import Export ===
Contributors: harryfear
Donate link: https://pph.me/harryfear
Tags: export, import, json, posts, migration
Requires at least: 4.8
Tested up to: 7.1
Requires PHP: 7.0
Stable tag: 1.0.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Export a single post or page as a JSON file, and import it again on the same or another site.

== Description ==

Adds an "Export as JSON" link to each row in the Posts and Pages lists. The download contains the post data, its post meta, its taxonomy terms and the URL of its featured image.

Tools > Import JSON takes one of those files and creates a new post from it. Tick "Update existing" to overwrite the post with the same ID and post type instead. Taxonomy terms (categories, tags and custom taxonomies) are matched by slug, then by name; a missing term is created if you are allowed to manage that taxonomy, otherwise it is skipped with a notice. Taxonomies not registered for the post type on this site are skipped. The featured image is downloaded into the Media Library. Each import is recorded in the post's `_json_importer_history` meta.

Exporting needs the `export` capability. Importing needs `manage_options`.

== Installation ==

1. Upload the `json-post-import-export` folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins menu in WordPress. Keep it active to receive updates.

== Changelog ==

= 1.0.5 =
* Update offers now appear even when the site cannot reach WordPress.org.

= 1.0.4 =
* Backslashes in imported titles, content, excerpts and meta values (including array meta) are now kept. Previously WordPress stripped them, so C:\dir\file became C:dirfile.
* Custom taxonomy terms now round-trip. Exports list each taxonomy's terms by slug and name, and the import restores them for every taxonomy registered for the post type, creating missing terms only if you can manage that taxonomy. Taxonomies unknown to the importing site are skipped with a notice.
* Files exported by 1.0.1 to 1.0.3 still import: categories and tags as before, and custom taxonomy terms are now restored from them too.
* The 1.0.2 import hardening is unchanged.

= 1.0.3 =
* Background auto-updates now work (WP-cron, WP-CLI and Easy Updates Manager), plus updater robustness fixes.

= 1.0.2 =
* Import form is now protected by a nonce and a capability check.
* Imported meta is no longer passed through maybe_unserialize(). Array meta from export files is decoded with objects disallowed, and a serialized object in a file is stored as a plain string, never instantiated. Files exported by 1.0.1 still import as before.
* Import error messages are escaped before output.
* Fixed the PHP 8.1+ "Implicit conversion from float to int" deprecation in export and import timestamps.
* Export no longer raises a PHP warning when the nonce or post ID is missing from the request.
* Tested with WordPress 7.1 and PHP 8.3.

= 1.0.1 =
* Initial release.
