-
Hi,
I created my own field ( a chart ) on CodeStar Framework v1, I want to migrate my plugin to v2. On v1 I created the chart file and added it under the fields folder and it was working.
Now it seems like has changed (noticed a filter you added for the fields).Can you help me out?
Thanks
Posted 1 year ago # -
I've found and fixed my problem using this code bellow:
function sswp_csf(){ return array( 'accordion', 'background', 'backup', 'border', 'button_set', 'callback', 'checkbox', 'chart2', 'code_editor', 'color', 'color_group', 'content', 'date', 'datetime', 'dimensions', 'fieldset', 'gallery', 'group', 'heading', 'icon', 'image_select', 'link', 'link_color', 'map', 'media', 'notice', 'number', 'palette', 'radio', 'repeater', 'select', 'slider', 'sortable', 'sorter', 'spacing', 'spinner', 'subheading', 'submessage', 'switcher', 'tabbed', 'text', 'textarea', 'typography', 'upload', 'wp_editor', ); } add_filter( 'csf_fields', 'sswp_csf' );
CopyCopied!
which is added before loading the framework.But I am interested in your opinion on the best way to include new fields.
Thanks
Posted 1 year ago # -
Hi,
Sorry for delay, I am so busy nowadays.
You can include your new field as basically include 'new_field.php';
Take a look FAQ:
https://codestarframework.com/documentation/#/faq?id=how-to-add-a-new-field-
Regards, Codestar
Posted 1 year ago #