TomodomoCo / total-slider

A WordPress plugin for creating, editing and removing ‘slides’ with text and images (for a homepage, for example).
GNU General Public License v2.0
7 stars 2 forks source link

Custom post types-based data structure #47

Closed chrisvanpatten closed 9 years ago

chrisvanpatten commented 12 years ago

EDIT: I've changed the title of this issue and expanded more in a comment below. It's also been retargeted toward a 2.0 milestone.

I'm not sure what type of re-architecture would be necessary to make this happen, but it would be fantastic if Total Slider slides and groups could be imported and exported, and via the standard WordPress import/export tool as well.

This is likely something for 1.3+.

PeterUpfold commented 12 years ago

In keeping with the principles of data portability and data freedom, this is something I would love to have.

chrisvanpatten commented 11 years ago

Just want to add to this, and expand the issue.

Currently, we save all slide groups and options in the options table. This is fine, but prone to breaking.

My suggestion is that we migrate the Total Slider data model to use custom post types.

This would involve registering a new post type (total-slider). Individual posts within the post type would be equivalent to our current "slide groups", and all data related to the slides themselves—images, links, theme, order, etc.—would be stored as post_meta.

By utilizing custom post types, we also gain support for import/export via the WordPress exporter. This way, users can easily migrate Total Slider data between multiple installations. We would also need to handle migration of data from the old options-based data format.

Additionally, I believe this would lead to less code duplication on our part, because a lot of elements would be handled automatically for us, particularly in relation to admin views (post index tables, etc.).

I'm sure I'm forgetting some essential part that can't be easily migrated to this system. I'd love thoughts, etc.

I've also retargeted this toward a 2.0 release, because I think this would be a major feature that would constitute 2.0!

chrisvanpatten commented 9 years ago

Marketing this as complete. Not necessarily the structure I would have gone with :stuck_out_tongue_winking_eye: but a dramatic improvement over the old method, and definitely a major milestone in the project.

Major props @PeterUpfold!