Elementor\Widget_Base::_register_skin_control PHP Метод

_register_skin_control() приватный Метод

    private function _register_skin_control()
    {
        $skins = $this->get_skins();
        if (!empty($skins)) {
            $skin_options = [];
            if ($this->_has_template_content) {
                $skin_options[''] = __('Default', 'elementor');
            }
            foreach ($skins as $skin_id => $skin) {
                $skin_options[$skin_id] = $skin->get_title();
            }
            // Get the first item for default value
            $default_value = array_keys($skin_options);
            $default_value = array_shift($default_value);
            if (1 >= sizeof($skin_options)) {
                $this->add_control('_skin', ['label' => __('Skin', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => $default_value]);
            } else {
                $this->add_control('_skin', ['label' => __('Skin', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => $default_value, 'options' => $skin_options]);
            }
        }
    }