Method |
Description |
|
__construct ( SiteConfig $siteConfig, string $wpCliVersion ) |
|
|
activateVersionPress ( ) |
Activates VersionPress as a plugin (does not start tracking the site; use initializeVersionPress()
for that). |
|
addMenuItem ( integer | string $menu, string $type, array $item ) : integer |
Adds menu item using WP-CLI. Returns ID of created menu item. |
|
approveComment ( $id ) |
|
|
copyVersionPressFiles ( ) |
Copies VP files to the test site and possibly removes all old files from there. It does so using
a Gulp script which specifies which paths to include and which ones to ignore. |
|
createComment ( array $comment ) : integer |
Creates new comment using WP-CLI. Returns ID of created comment. |
|
createCommentMeta ( $id, $name, $value ) |
Creates new commentmeta using WP-CLI for given comment. |
|
createMenu ( string $name ) : integer |
Creates new menu using WP-CLI. Returns ID of created menu. |
|
createOption ( string $name, mixed $value ) |
Creates new option using WP-CLI. |
|
createPost ( array $post ) : integer |
Creates new post using WP-CLI. Returns ID of created post. |
|
createUser ( array $user ) : integer |
Creates new user using WP-CLI. Returns ID of created user. |
|
deleteComment ( $id ) |
Deletes the comment using WP-CLI. |
|
deleteCommentMeta ( $id, $name ) |
Deletes commentmeta using WP-CLI for given comment. |
|
deleteMenu ( integer | string $menu ) |
Deletes menu item using WP-CLI. |
|
deleteOption ( string $name ) |
Deletes option with given name using WP-CLI. |
|
deletePost ( $id ) |
Deletes the post using WP-CLI. |
|
deleteUser ( $id ) |
Deletes the user using WP-CLI. |
|
deleteWidgets ( string[] | string $widgets ) |
Deletes widget(s) |
|
disableDebugger ( ) |
|
|
editComment ( $id, $changes ) |
Changes the comment using WP-CLI. |
|
editMenu ( $id, $name ) |
Changes the menu using WP-CLI. |
|
editMenuItem ( integer $id, array $changes ) : integer |
Updates menu item using WP-CLI. |
|
editOption ( string $name, mixed $value ) |
Changes option with given name using WP-CLI. |
|
editPost ( $id, $changes ) |
Changes the post using WP-CLI. |
|
editUser ( $id, $changes ) |
Changes the user using WP-CLI. |
|
editUserMeta ( $id, $name, $value ) |
Changes the user using WP-CLI. |
|
getAbspath ( ) |
|
|
getComments ( ) |
|
|
getCurrentTheme ( ) : string |
Returns stylesheet of current theme. |
|
getPluginsDir ( ) |
|
|
getSidebars ( ) : array |
Returns list of sidebar IDs defined by current template (without wp_inactive_widgets). |
|
getUploadsDir ( ) |
|
|
getVpdbDir ( ) |
|
|
getWebRoot ( ) |
|
|
getWidgets ( string $sidebar ) : array |
Returns list of widgets in given sidebar. |
|
getWpCli ( ) : string |
Checks whether a WP-CLI binary is available, possibly downloads it and returns the path to it. |
|
importMedia ( $files ) |
|
|
initializeVersionPress ( ) |
Activates VersionPress plugin and runs the Initializer. For just activation, use activateVersionPress(). |
|
installWordPress ( ) |
Installs WordPress. Assumes that files have been prepared on the file system, database is clean
and wp-config.php has been created. |
|
isSiteSetUp ( ) : boolean |
Returns true if the site is installed and working |
|
isVersionPressInitialized ( ) : boolean |
Returns true if VersionPress is active and tracking the site |
|
populateSite ( $entityCounts ) |
Populates the site with random entities. Their counts are specified by parameter $entityCounts:
array(
'posts' => 100,
'comments => 500,
'options' => 50,
'users' => 10,
'terms' => 20
) |
|
removeMenuItem ( integer $id ) |
Removes menu item using WP-CLI. |
|
runWpCliCommand ( string $command, string $subcommand, array $args = [], boolean $debug = false ) : string |
Executes a WP-CLI command
http://wp-Cli.org/commands/ |
|
setUpSite ( array $entityCounts = [] ) |
Does a full setup of a WP site including removing the old site,
downloading files from wp.org, setting up a fresh database, executing
the install script etc. |
|
spamComment ( $id ) |
|
|
switchTheme ( string $theme ) |
|
|
trashComment ( $id ) |
|
|
unapproveComment ( $id ) |
|
|
uninstallVersionPress ( ) |
|
|
unspamComment ( $id ) |
|
|
untrashComment ( $id ) |
|
|