codestar-framework icon indicating copy to clipboard operation
codestar-framework copied to clipboard

Expose list of fields

Open LC43 opened this issue 1 year ago • 0 comments

Hi,

in CFS_Setup, we could use the supported list of fields. Instead of having to copy the array list, we would like to get a function:

CFS::list_fields(): array;

something like:


    public static function list_fields() {

      // Include all framework fields
      return apply_filters( 'csf_fields', array(
        'accordion',
        'background',
        'backup',
        'border',
        'button_set',
        'callback',
        'checkbox',
        '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',
      ) );
    }

in /classes/setup.class.php:405 change to:


      $fields = self::list_fields();

LC43 avatar Apr 17 '24 08:04 LC43