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

Default Value for Height and Width #34

Open
Moccassins opened this issue Sep 15, 2023 · 0 comments
Open

Default Value for Height and Width #34

Moccassins opened this issue Sep 15, 2023 · 0 comments

Comments

@Moccassins
Copy link

Moccassins commented Sep 15, 2023

The Title says it all, how can I provide a different default value than "auto" for my Module? I tried it multiple times with different approaches and also asked several AI Tools for help without success. I can't even change the default description of the Width and Height setting. So how can I do that?

Thats one of my tries:

// Define the fields that the module will accept.
    public function get_fields()
    {
        return array(
            // Width attribute
            'width' => array(
                'label' => esc_html__('Breite', 'et_builder'),
                'type' => 'text',
                'option_category' => 'layout',
                'description' => esc_html__('Geben Sie die gewünschte Breite ein.', 'et_builder'),
                'default' => '200px',
                'toggle_slug' => 'size',
            ),
            // Height attribute
            'height' => array(
                'label' => esc_html__('Höhe', 'et_builder'),
                'type' => 'text',
                'option_category' => 'design',
                'description' => esc_html__('Geben Sie die gewünschte Höhe ein.', 'et_builder'),
                'default' => '300px',
                'toggle_slug' => 'size',
            ),
        );
    }
@Moccassins Moccassins changed the title Default Value for Hight and Width Default Value for Height and Width Sep 22, 2023
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