Skip to content

Commit 0ce8e47

Browse files
authored
[Docs] Updated runPHPWithOptions example (#2986)
## Motivation for the change, related issues Made `runPHPWithOptions` example more meaningful by making visible changes. Related issue: #1162 ## Implementation details Updated PHP code to modify the site name using input body. ## Testing Instructions (or ideally a Blueprint) 1. Open https://wordpress.github.io/wordpress-playground/blueprints/steps/#RunPHPWithOptionsStep 2. Click the `Try it out!` button to create spin up WordPress with auto generated example blueprint. 3. The playground should run w/o any errors and site name should be same as input body (`Site Name Modified by runPHPWithOptions`)
1 parent 44a2064 commit 0ce8e47

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/playground/blueprints/src/lib/steps/run-php-with-options.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ import type { PHPRunOptions } from '@php-wasm/universal';
1010
* {
1111
* "step": "runPHPWithOptions",
1212
* "options": {
13-
* "code": "<?php echo $_SERVER['CONTENT_TYPE']; ?>",
14-
* "headers": {
15-
* "Content-type": "text/plain"
16-
* }
13+
* "code": "<?php require_once '/wordpress/wp-load.php'; update_option('blogname', file_get_contents('php://input'));?>",
14+
* "body": "Site Name Modified by runPHPWithOptions"
1715
* }
1816
* }
1917
* </code>

0 commit comments

Comments
 (0)