| Server IP : 81.19.159.101 / Your IP : 216.73.217.111 Web Server : Apache System : Linux www58.world4you.com 4.18.0-553.126.2.lve.el8.x86_64 #1 SMP Thu May 28 14:12:30 UTC 2026 x86_64 User : ftp8817043 ( 2681) PHP Version : 8.4.21 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/.sites/103/site8817043/web/wp-content/themes/enfold/wp-blocks/ |
Upload File : |
1. Blockregistrierung mit PHP:
siehe ..\enfold\config-gutenberg\class-avia-gutenberg.php handler_wp_register_scripts()
2. Erstelle den Block-Ordner für textblock in wp-blocks/custom-blocks/textblock:
- Erstelle die block.json-Datei ../src/textblock/
- Erstelle die index.js in ../src/textblock/
- Erstelle die style.css in ../src/textblock/
3. Abhängigkeiten installieren (kann länger dauern)
Öffne das Verzeichnis wp-blocks in deinem Terminal/Commandline.
Initialisiere ein npm-Projekt + WordPress-Skripte:
npm init -y
npm install @wordpress/scripts --save-dev
Füge diese Skripte zu package.json hinzu:
"scripts": {
"build": "wp-scripts build",
"start": "wp-scripts start",
}
Baue die JavaScript-Dateien:
npm run start für entwickeln
npm run build
---------
WP Folderstruktur für zentrale Verwaltung der Blöcke:
wp-blocks/
├── src/
│ ├── text-block/
│ │ ├── block.json
│ │ ├── index.js
│ │ ├── style.css
│ ├── image-block/
│ ├── block.json
│ ├── index.js
│ ├── style.css
├── build/
│ ├── text-block/
│ │ ├── index.js
├── package.json
└── node_modules/