# Prefer demo files

Twelve demos are declared in `prefer-dummy-data.php`, one for each demo on
<https://templatesell.net/demo/prefer/>. A demo shows up on **Appearance →
Import Demo Data** only once its files are in this folder, so the list can be
filled in one demo at a time and a half-finished demo is never offered to a
reader.

The import screen is the check: whatever is listed there is ready, and whatever
is missing from it is still waiting for files.

## Where the files go

```
dummy-data-files/
  assets/<slug>.jpg          preview image, about 600 × 450
  <slug>/<slug>.xml          content   (Tools → Export → All content)
  <slug>/<slug>.wie          widgets   (Widget Importer & Exporter)
  <slug>/<slug>.dat          settings  (Customizer Export/Import)
```

| Demo | slug | content |
|------|------|---------|
| Main Demo | `main` | own |
| Classic | `classic` | shares `main` |
| Masonry | `masonry` | own |
| Blog | `blog` | shares `main` |
| Right to Left | `rtl` | own |
| Main Plus | `plus-main` | own |
| Classic Plus | `plus-classic` | shares `plus-main` |
| Masonry Plus | `plus-masonry` | shares `plus-main` |
| Classic Slider Plus | `plus-slider` | shares `plus-main` |
| Food Plus | `plus-food` | own |
| Personal Plus | `plus-personal` | own |
| Minimal Portfolio Plus | `plus-portfolio` | own |

A demo that **shares** content needs only its `.wie`, `.dat` and preview image:
the posts are the same newspaper and only the arrangement changes, so one XML
serves several demos and the download stays small. Change the `content` key in
`prefer-dummy-data.php` if a demo turns out to need its own posts after all.

## Exporting from a demo site

1. **Content** — Tools → Export → All content → Download Export File. Rename it
   `<slug>.xml`.
2. **Widgets** — install *Widget Importer & Exporter*, then Tools → Widget
   Importer & Exporter → Export Widgets. Rename it `<slug>.wie`.
3. **Settings** — install *Customizer Export/Import*, then Appearance →
   Customize → Export/Import → Export. Rename it `<slug>.dat`.

## Demos that should not ship in the plugin

This plugin is public, so anything inside it is public. To offer a Pro demo
without publishing its data, give that demo a `remote` key instead of shipping
files:

```php
array(
    'slug'     => 'plus-food',
    'name'     => __( 'Food Plus', 'templatesell-demo-importer' ),
    'category' => __( 'Pro', 'templatesell-demo-importer' ),
    'preview'  => 'https://www.templatesell.net/prefer-plus-food/',
    'remote'   => 'https://www.templatesell.com/demo-files/prefer/plus-food/',
),
```

The importer then fetches `plus-food.xml`, `plus-food.wie`, `plus-food.dat` and
`plus-food.jpg` from that address at import time. The same trick keeps the
download small if the twelve demos ever add up to more than the plugin should
carry.
