@wp-playground/client 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. package/README.md +2 -1
  2. package/index.cjs +351 -33
  3. package/index.d.ts +177 -121
  4. package/index.js +2551 -2137
  5. package/package.json +2 -2
package/README.md CHANGED
@@ -12,7 +12,8 @@ const client = await startPlaygroundWeb({
12
12
  });
13
13
 
14
14
  const response = await client.run({
15
- code: '<?php echo "Hi!"; ',
15
+ // wp-load.php is only required if you want to interact with WordPress.
16
+ code: '<?php require_once "/wordpress/wp-load.php"; $posts = get_posts(); echo "Post Title: " . $posts[0]->post_title;',
16
17
  });
17
18
  console.log(response.text);
18
19
  ```