插件

如何创建一个elementor插件(addon)

https://developers.elementor.com/docs/getting-started/first-addon/

代码在上面网址,或点这里: https://codecopy.cn/post/8fbnzh

---------

渲染方式:

https://developers.elementor.com/docs/widgets/widget-rendering/

Elementor has two rendering methods, both rely on the returned values from the control,

but each method renders differently as one uses PHP and the other uses JS.

  • render() – Written as a PHP template that generates the frontend output.

  • content_template() – Written as a JS template that generates the preview output in the editor.

  render函数是前台用,用 php

  content_template 是后台用。用js