Skip to content

Commit 7ff399b

Browse files
Best Practices (#289)
1 parent 0b7e80d commit 7ff399b

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

src/.vuepress/sidebars/getting-started.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = [
2424
sidebarDepth: -1,
2525
children: [
2626
'requirements',
27+
'best-practices',
2728
'first-addon',
2829
]
2930
},
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Best Practices
2+
3+
<Badge type="tip" vertical="top" text="Elementor Core" /> <Badge type="warning" vertical="top" text="Basic" />
4+
5+
This Best Practices guide is a living document for Elementor addon developers, meant to be revised as Elementor makes changes, introduces new features, and provides additional recommendations. We recommend following these best practices.
6+
7+
## Supported PHP Versions
8+
9+
Ensure your addon is compatible with the most used PHP version (v7.4) and the latest PHP versions and (v8.0 and above).
10+
11+
## Compatibility Tag
12+
13+
Elementor has its own [header comments](https://developers.elementor.com/docs/addons/plugin-header/) where you can note the Elementor version that the addon was tested against. This is an optional header, but we recommend using it.
14+
15+
## Compatibility Checks
16+
17+
[Check which Elementor and PHP versions](https://developers.elementor.com/docs/addons/compatibility/) a website uses to make sure your addon supports it. Otherwise, notify the user that the website doesn’t meet the addon’s requirements.
18+
19+
## Scripts & Style Registration
20+
21+
Elementor has its own way to [register scripts and styles](https://developers.elementor.com/docs/scripts-styles/). Using the recommended methods ensures your addon is optimized for performance.
22+
23+
## Internationalization
24+
25+
Use WordPress functions to [internationalize](https://developer.wordpress.org/apis/internationalization/internationalization-functions/) your strings.
26+
27+
## Remove Deprecated Code
28+
29+
Already have an addon? Run it through the [Elementor Deprecated Code Detector](https://github.com/matipojo/elementor-deprecated-code-detector) to see if your addon contains any [deprecated code](https://developers.elementor.com/docs/deprecations). If so, we highly recommend removing it.
30+
31+
## Adopt Latest Performance Features
32+
33+
Implement [Element Caching](https://developers.elementor.com/elementor-3-22-developers-update/) to store element output in the cache for more performant websites.
34+
35+
## Elementor Pro Developer License
36+
37+
Test with Elementor Pro by requesting a [Developer License](https://elementor.com/pages/addon-developers-corner/).
38+
39+
## Security
40+
41+
Participate in Patchstack’s free [mVDP Program](https://elemn.to/patchstack-for-plugins) to maintain the security hygiene of your product with a clear vulnerability reporting structure.

0 commit comments

Comments
 (0)