【发布时间】:2020-04-30 21:53:08
【问题描述】:
现在我正在使用 This For Elementor Control。 我尝试了将近 10 次,但它不起作用。 有人请帮助我。我不明白为什么它不起作用。其他控件工作正常。都设置好了。只有排版控件不起作用。
//slide control
$this->start_controls_section(
'hero_area_section',
[
'label' => __( 'Content', 'plugin-name' ),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'bg', [
'label' => __( 'Background', 'plugin-domain' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'label_block' => true,
]
);
$this->add_control(
'title', [
'label' => __( 'Title', 'plugin-domain' ),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'label_block' => true,
]
);
$this->add_control(
'cap', [
'label' => __( 'Caption', 'plugin-domain' ),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'label_block' => true,
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'title_typography',
'label' => __( 'Title Typography', 'my-plugin-domain' ),
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
'selector' => '{{WRAPPER}} h3',
]
);
$this->end_controls_section();```
And this is not working and showing this Erro:
**Fatal error: Uncaught Error: Class 'Group_Control_Typography' not found in C:\xampp\htdocs\kaye\wp-content\plugins\toolkit\widgets\hero_area.php:66 Stack trace: #0 C:\xampp\htdocs\kaye\wp-content\plugins\elementor\includes\base\controls-stack.php(1900): rrfCommercew_hero_area->_register_controls() #1 C:\xampp\htdocs\kaye\wp-content\plugins\elementor\includes\base\controls-stack.php(487): Elementor\Controls_Stack->init_controls() #2 C:\xampp\htdocs\kaye\wp-content\plugins\elementor\includes\base\widget-base.php(148): Elementor\Controls_Stack->get_stack() #3 C:\xampp\htdocs\kaye\wp-content\plugins\elementor\includes\base\controls-stack.php(280): Elementor\Widget_Base->get_stack() #4 C:\xampp\htdocs\kaye\wp-content\plugins\elementor\includes\base\controls-stack.php(1935): Elementor\Controls_Stack->get_controls() #5 C:\xampp\htdocs\kaye\wp-content\plugins\elementor\includes\base\controls-stack.php(1022): Elementor\Controls_Stack->sanitize_settings(Array) #6 C:\xampp\htdocs\kaye\wp-content\plugins\elementor\includes\base\eleme in C:\xampp\htdocs\kaye\wp-content\plugins\toolkit\widgets\hero_area.php on line 66**
【问题讨论】:
标签: php wordpress error-handling xampp