Export /Import tools to include widget contents

  1. Tim Nicholson

    I'd like to see the built-in export and import (wxr) format to support widgets and their contents. Widgets have become very important to the setup of any WordPress site and its a shame that these can't easily be moved from one site to another.

    I think this is very useful to anyone, but also in my case I'm a theme designer and want to be able to include widgets in my page samples wxr file for easy theme setup.

    Posted: 3 years ago #
  2. juanvillegas

    I agree, though its a hard one as the way plugin's data is stored varies from plugin to plugin. I guess it would be possible if the plugin uses only the Settings API.

    Posted: 3 years ago #
  3. Tim Nicholson

    That's a good point about third-party widgets potentially saving data in different ways. It would be fine to just support the normal Settings API as you suggest. I believe there is a common location that a specific widget instance's data is stored as well... like the wp_cache. As long as all the core WordPress widgets were supported, that would be fine.

    Then if a 3rd-party widget stores its data in the same way as the core widgets do, then they should work as well.

    For example, I wrote my own recent comments and recent posts widgets and modeled them directly off the core widgets. So they would probably export and import just fine.

    Posted: 3 years ago #
  4. juanvillegas

    yep, and now that I think of it, if a plugin uses a custom table, the export code could provide an action to hook to so the plugin can add its own data to the exported xml file.

    Posted: 3 years ago #
  5. Tim Nicholson

    I guess this post didn't get many votes. For users, I stumbled across a plugin that will export and import widgets. Widget Settings Importer/Exporter. That may be useful to you.

    As a theme author, my intent was to be able to include widgets in a samples.xml file that would build a page or pages as laid out by me for demoing how the theme can look. So I'd need the functionality built into core.

    Posted: 2 years ago #

RSS feed for this topic


You must log in to post.

  • Rating

    2 Votes
  • Status

    This idea is under consideration