daomapsieucap / fiber-admin

💈 Bring multiple customization features to make your own WordPress admin.
https://wordpress.org/plugins/fiber-admin/
0 stars 1 forks source link

Carbon Fields for settings #24

Open daomapsieucap opened 1 year ago

daomapsieucap commented 1 year ago

I found this framework called Carbon Fields which is introduced in Delicious Brains' blog: https://deliciousbrains.com/create-wordpress-plugin-settings-page/#custom-fields and I think we can try to implement it in Fiber Admin (and our future plugins) because it has many fields types like a repeater or Gutenberg (#15).

It's great if we can give a try with this framework to have some experience and reuse it in the future.

zrvincent commented 1 year ago

update status: Testing demo create fields with Carbon Fields plugin on the Lab site. Test code on the functions file in bcnb child theme.(https://docs.carbonfields.net/plugin-quickstart.html#without-composer)

daomapsieucap commented 1 year ago

@phongkhuu115 Actually, I didn't plan to install the plugin Carbon Fields as the solution anh Khanh was doing because, with this way, we must install another plugin to create a repeater field (which means that our plugin will have the dependency with Carbon Fields plugin which doesn't seem correct).

We should use Carbon Fields as a framework for our plugins if it's possible. Please let me know if we can implement this way (to Fiber Admin or other plugins else).

zrvincent commented 1 year ago

@daomapsieucap @phongkhuu115 I just demo with the plugin so we can see how the code works. Based on that we reuse the code for Fiber Admin.