Elementor 开发者文档

title: "Finder 结构" post_status: publish comment_status: open taxonomy: category: - elementor-developers-docs post_tag: - Finder - Src - Repos


Finder 结构

Finder 按类别组织,每个类别包含一组链接。

Finder 类

要编辑 Finder 的类别,我们首先需要创建一个继承 \Elementor\Core\Common\Modules\Finder\Base_Category 类(基础 Finder 类别类)的类:

class New_Finder_Category extends \Elementor\Core\Common\Modules\Finder\Base_Category {
}

Finder 方法

扩展类将包含以下方法:

class New_Finder_Category extends \Elementor\Core\Common\Modules\Finder\Base_Category {

    public function get_id(): string {}

    public function get_title(): string {}

    public function get_category_items(): array {}

    public function is_dynamic(): bool {}

}