Aller au contenu principal

RunPHPStep

Runs PHP code. When running WordPress functions, the code key must first load wp-load.php and start with "<?php require_once 'wordpress/wp-load.php'; ".

@hasRunnableExample
@example
<code>
{
"step": "runPHP",
"code": "<?php require_once 'wordpress/wp-load.php';
wp_insert_post(array('post_title' => 'wp-load.php required for WP
functionality', 'post_status' => 'publish')); ?>"
}
</code>

Index

Properties

Properties

code

code: string

The PHP code to run.

step

step: runPHP

The step identifier.