Updatesichere WordPress-Funktionen
Ergänzt WordPress über Plugins, Child-Themes und dokumentierte Hooks, damit normale Aktualisierungen eigene Anpassungen nicht überschreiben. Folgt vorhandenen Konventionen für Ressourcen, Daten und Übersetzungen.
wordpress-development
Entdecke, wie der Skill hilftWann ist der Skill hilfreich?
Nutze diesen Skill für eigene Blöcke, Inhaltstypen, Integrationen oder Theme-Anpassungen in WordPress.
Wobei hilft er dir?
- Legt dauerhafte Website-Funktionen in Plugins und visuelle Anpassungen in der passenden Theme-Schicht ab.
- Registriert Skripte, Stile und REST-Routen über WordPress-APIs.
- Begrenzt Abfragen und hält sichtbare Texte übersetzbar.
Das könntest du fragen
Ergänze einen Veranstaltungstyp und einen wiederverwendbaren Veranstaltungslisten-Block auf unserer WordPress-Seite. Speichere Veranstaltungen in einem Plugin, damit sie einen Theme-Wechsel überstehen, lade Block-Ressourcen nur bei Bedarf und paginiere die Liste. Prüfe Bearbeitung, Übersetzung und öffentliche Ansicht.
Ausführliche Dokumentation
Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.
Weniger anzeigen
WordPress Development
Never edit what updates overwrite
- Never modify WordPress core (wp-admin, wp-includes) or third-party plugins and themes in place; updates erase the change.
- Customize a third-party theme through a child theme; customize plugins through their hooks or a small custom plugin or mu-plugin.
- Site functionality (post types, integrations) belongs in a plugin, not the theme, so it survives a theme switch.
Hooks over template edits
- Prefer actions and filters to copying templates. Find the hook in the source before overriding a file.
- Hook at the right time: init for post types and taxonomies, wp_enqueue_scripts / admin_enqueue_scripts for assets, rest_api_init for routes, plugins_loaded for plugin bootstrap.
- Filters always return a value. Set priority and accepted args deliberately.
- Override templates only through the child theme or a plugin's documented override path, and keep them minimal.
Assets
- wp_register_script / wp_enqueue_script and wp_enqueue_style with dependencies, a version (plugin version or filemtime) and a footer or defer strategy. Never hardcode script or link tags.
- Enqueue only where needed. Pass data to JS with wp_add_inline_script or wp_localize_script.
- Blocks: block.json plus register_block_type, built with the repo's @wordpress/scripts setup.
Standards
- Follow the WordPress Coding Standards; run PHPCS with the repo's phpcs.xml (WordPress ruleset) when present.
- Prefix every global function, class, constant, option, hook, script handle and meta key with the project prefix, or use a namespace. Reuse the existing prefix.
- Respect the minimum PHP and WordPress versions in the plugin or theme header.
Internationalization
- Wrap user-facing strings in _(), e(), esc_html(), _x() or _n() with the project's text domain.
- Use sprintf/printf placeholders, never concatenated sentence fragments.
Data
- Options: prefixed names; autoload off for large or rarely used options.
- Transients for expensive results, with an expiry; always handle a missing transient.
- register_post_meta for meta used by REST or blocks.
- Custom tables only when needed: dbDelta on activation, with a schema version option.
Custom post types and REST
- register_post_type and register_taxonomy on init with labels, supports, show_in_rest and rewrite slug. Flush rewrite rules only on activation, never per request.
- register_rest_route with a versioned namespace, an args schema with validate and sanitize callbacks, and a real permission_callback.
Query performance
- WP_Query with bounded posts_per_page (never -1 on large sites), fields => ids when only IDs are needed, no_found_rows when not paginating.
- Avoid unindexed meta_query in hot paths; cache results in the object cache or transients.
- Never use query_posts; call wp_reset_postdata after custom loops. No queries inside loops.
WP-CLI
- Use WP-CLI for local inspection and tasks (wp option get, wp post list, wp cron event list). Never run destructive commands like search-replace or db reset outside a local environment.
Before you finish
- No core or third-party code edited; child theme or plugin used.
- Assets enqueued properly and only where needed.
- Everything prefixed; strings translatable with the right text domain.
- Queries bounded, expensive results cached.
- PHPCS with the WordPress ruleset passes on changed files if configured.
Enthaltene Dateien 1
SKILL.md
Über dieses Skill-Paket
wordpress-development
wordpress-development: Entwickelt zuverlässige Backend-Funktionen, APIs und Datenbankänderungen mit Tests für deine Geschäftsregeln.
Weniger anzeigen
wordpress-development
wordpress-development: Entwickelt zuverlässige Backend-Funktionen, APIs und Datenbankänderungen mit Tests für deine Geschäftsregeln.
Enthält den vollständigen Skill und seine Begleitdateien (1 Dateien). Der genaue, ursprünglich verfasste Anwendungsbereich bleibt unten erhalten.
Ursprüngliche Skill-Beschreibung (Quellsprache)
Use when building or changing a WordPress theme, child theme, plugin, Gutenberg block, shortcode, hook, action, filter, enqueue script or style, custom post type, taxonomy, REST API route, WP_Query, options, transients, WP-CLI or PHPCS WordPress coding standards.
Installiere den Skill, prüfe seine Quelle und Vertrauenseinstellungen und aktiviere ihn für das passende Projekt oder den Agenten.
Voraussetzungen
- Orqestria auf deinem Computer installiert.
