Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose list of fields #188

Open
LC43 opened this issue Apr 17, 2024 · 0 comments
Open

Expose list of fields #188

LC43 opened this issue Apr 17, 2024 · 0 comments

Comments

@LC43
Copy link
Contributor

LC43 commented Apr 17, 2024

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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant