WPCloudDeploy Documentation

Filter Hook: wpcd_wordpress-app_install_wp_app_parms

/* This was a hook that we thought would be useful. But even though it remains in the code, it’s been superseded by custom fields. */

apply_filters( "wpcd_{$this->get_app_name()}_install_wp_app_parms", $additional, $args )

Example Hook

add_filter( "wpcd_wordpress-app_install_wp_app_parms", 'my_function', 10, 2 );
public function my_function( $additional, $args ) { 
     //your code here 
}

Discussion

Use this hook to set up additional data in the $additional array to be passed on to the bridge script that runs between the plugin and the server.

Typically, data from the Install WordPress popup form is in the $args array. From that array you will move any element you need passed into the server script into the $additional array.

The KEY for the $additional array elements should match the names of the environment variables set up in the bridge script used to install WordPress.  If you’re adding elements to this array, chances are you’ve customized that bridge script to use the additional data so you need to make sure the array keys match the variables set up in the bridge script.

  • $additional is the data element that needs to be returned from this filter.  You should not remove data from this array,  you should only add to it.
  • $args is an array of fields from the Install WordPress popup form.

This filter only fires when the WordPress installation is started from wp-admin.

Reference

Located in:

  • Function: install_wp_validate
  • File: /includes/core/apps/wordpress-app/class-wordpress-app.php

Availability

This hook is only available in WPCD versions 4.2.5 or later.

Share: