add-wp-function

star 0

Add new WordPress function mappings to the wpts transpiler. Use when adding WordPress API functions like post management, taxonomy, user, media, or other WP functions.

AmitGurbani By AmitGurbani schedule Updated 2/23/2026

name: add-wp-function description: Add new WordPress function mappings to the wpts transpiler. Use when adding WordPress API functions like post management, taxonomy, user, media, or other WP functions. argument-hint: [function-category]

Add WordPress function mappings for $ARGUMENTS to the wpts transpiler.

Workflow

For each function:

  1. Map the function in packages/wpts/src/transpiler/wp-function-map.ts

    • Add camelCase → snake_case entry in the appropriate section
    • Group related functions together with a comment header
  2. Add type declaration in packages/wpts/src/runtime/wp-types.ts

  3. Add tests in packages/wpts/tests/unit/transpiler/expression-transpiler.test.ts

    • Add test cases verifying camelCase TS transpiles to snake_case PHP
    • Cover representative functions from the category
  4. Update README in packages/wpts/README.md

    • Add row to the WordPress Functions table

Verification

After all functions are added, run all three checks:

  • npx tsc --noEmit (type checking)
  • pnpm test (unit + integration tests)
  • pnpm build (compile + template copy)

All three must pass before the task is complete.

Install via CLI
npx skills add https://github.com/AmitGurbani/wordpress-plugins --skill add-wp-function
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator