php elementor-元件插件 - 起动 - code.php

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php elementor-元件插件 - 起动 - code.php相关的知识,希望对你有一定的参考价值。

<?php

use Elementor\Plugin;
use Elementor\Widget_Base;

class Shapla_Hero_Slider extends Widget_Base {

	/**
	 * Retrieve the name.
	 *
	 * @return string The name.
	 */
	public function get_name() {
		return 'hero-slider';
	}

	/**
	 * Retrieve element title.
	 *
	 * @return string Element title.
	 */
	public function get_title() {
		return __( 'Hero Slider', 'text_domain' );
	}

	/**
	 * Retrieve element icon.
	 *
	 * @return string Element icon.
	 */
	public function get_icon() {
		return 'eicon-slideshow';
	}

	/**
	 * Retrieve widget categories.
	 *
	 * @return array Widget categories.
	 */
	public function get_categories() {
		return [ 'shapla-elements' ];
	}

	/**
	 * Retrieve script dependencies.
	 * Get the list of script dependencies the element requires.
	 *
	 * @return array Widget scripts dependencies.
	 */
	public function get_script_depends() {
		return [ 'shapla-elementor' ];
	}

	/**
	 * Register controls.
	 *
	 * Used to add new controls to any element type. For example, external
	 * developers use this method to register controls in a widget.
	 *
	 * Should be inherited and register new controls using `add_control()`,
	 * `add_responsive_control()` and `add_group_control()`, inside control
	 * wrappers like `start_controls_section()`, `start_controls_tabs()` and
	 * `start_controls_tab()`.
	 */
	protected function _register_controls() {

	}

	/**
	 * Render element.
	 * Generates the final HTML on the frontend.
	 */
	protected function render() {

	}

	/**
	 * Render element output in the editor.
	 * Used to generate the live preview, using a Backbone JavaScript template.
	 */
	protected function _content_template() {

	}
}

Plugin::instance()->widgets_manager->register_widget_type( new Shapla_Hero_Slider() );

以上是关于php elementor-元件插件 - 起动 - code.php的主要内容,如果未能解决你的问题,请参考以下文章

php WP迁移DB Pro迁移后清除Elementor缓存 - 必须使用插件(mu-plugins)

Elementor编辑器 2018年最流行的WordPress页面构建插件

WordPress:Elementor 插件正在按钮中添加 <br>

Chrome 插件: 起动本地应用 (Native messaging)

WordPress插件:Elementor Pro v2.10.2[已激活版]*(113p)

php 隐藏Elementor小部件