fastlinemedia / customizer-export-import

Adds a settings export/import section to the WordPress customizer.
43 stars 13 forks source link

Snippet For Theme Developer #2

Closed agusmu closed 9 years ago

agusmu commented 9 years ago

Hi, it is not an issue, but a question because I can't find any answer.

So, on WPTavern article, I saw this image,

Export Import Install Message

Theme authors can also add support for the plugin in order to avoid having to spin up their own export/import functionality, as Busa is doing with his current theme. The Export/Import panel in the customizer will prompt the user to install the plugin if he hasn’t already. “Additionally, theme authors could potentially offer any number of presets for their themes that users could import by leveraging this plugin,” Busa said.

Is there any code snippet that we can use to use this?

fastlinemedia commented 9 years ago

Thanks for asking! Are you familiar with creating and using custom controls? If so, I can send over some code for that. Let me know.

Justin

On Dec 27, 2014, at 6:27 PM, agusmu notifications@github.com wrote:

Hi, it is not an issue, but a question because I can't find any answer.

So, on WPTavern article, I saw this image,

https://camo.githubusercontent.com/ff83c94a7e96103772143efbc4dca7cbc7ac5797/687474703a2f2f69312e77702e636f6d2f777074617665726e2e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031342f31322f6578706f72742d696d706f72742d6d6573736167652e6a7067 Theme authors can also add support for the plugin in order to avoid having to spin up their own export/import functionality, as Busa is doing with his current theme. The Export/Import panel in the customizer will prompt the user to install the plugin if he hasn’t already. “Additionally, theme authors could potentially offer any number of presets for their themes that users could import by leveraging this plugin,” Busa said.

Is there any code snippet that we can use to use this?

— Reply to this email directly or view it on GitHub https://github.com/fastlinemedia/customizer-export-import/issues/2.

agusmu commented 9 years ago

Yes, I am.

fastlinemedia commented 9 years ago

Here's a gist of a custom control class that you can use. Let me know if you have any questions.

https://gist.github.com/fastlinemedia/18b2b85686ee8aa37540

agusmu commented 9 years ago

Thanks a lot, I will give it a try...