Filter Hook: wpcd_wordpress-app_create_popup
apply_filters( "wpcd_{$this->get_app_name()}_create_popup", $file_name )
Example Hook
add_filter( "wpcd_wordpress-app_create_popup", 'my_function', 10, 1 );
public function my_function( $file_name ) {
//your code here
}
Discussion
Use this hook to replace the file used to collect data when creating a new server in wp-admin. The normal popup file is includes/core/apps/wordpress-app/templates/create-popup.php. You can create your own version of this file and put it anywhere and then tell WPCD where it’s located using this filter. Keep in mind that if you do this, you’ll need to track changes to the original file and apply them to your custom file.
- $file_name is the full path to the current popup. Return a different path and filename to use your custom popup.
Pro tip: Look inside the current popup file to get a list of action hooks. In many cases you might be able to add additional fields to the screen without having to make a custom copy of the file.
Reference
Located in:
- Function: ajax_server
- File: /includes/core/apps/wordpress-app/class-wordpress-app.php
Availability
This hook is only available in WPCD versions 4.2.5 or later.
More Topics In Dev Notes
-
Filter Hook: wpcd_wordpress-app_initial_server_attributes -
Filter Hook: wpcd_wordpress-app_install_app_popup -
Filter Hook: wpcd_wordpress-app_initial_server_attributes_wc -
Filter Hook: wpcd_wordpress-app_install_wp_app_parms -
Filter Hook: wpcd_script_file_contents -
Action Hook: wpcd_command_wordpress-app_completed_after_cleanup -
Filter Hook: wpcd_wpapp_show_install_wp_button -
Custom Post Types Used By WPCD -
Filter Hook: wpcd_wpapp_show_install_wp_link -
Filter Hook: wpcd_settings_help_tab_text -
Filter Hook: wpcd_settings_welcome_text_initial -
Filter Hook: wpcd_settings_welcome_text -
Filter Hook: wpcd_settings_deploy_first_wp_site_text -
Action Hook: wpcd_server_wordpress-app_server_created -
Action Hook: wpcd_server_wordpress-app_prepare_server_command_done -
Action Hook: wpcd_command_wordpress-app_completed -
Action Hook: wpcd_command_wordpress-app_prepare_server_completed -
Site Update Plans: Pending Task Sequence Technical Note