buy
Domain

Pre_add_domain

To call filter for different type of domain you have to pass type of domain name

The pre_add_domain filter will trigger your function right before a Domain is added.

Parameters
Sample code
//FILTER to call specific function
add_filter('pre_add_domain', 'my_pre_add_domain', 10, 4);

function my_pre_add_domain($user, $domain, $document_root, $domain_data){
	
	if($domain_data['type'] == 'domain_type'){
		//code
		//Write your code here
	}
}

Post_add_domain

The post_add_domain filter will trigger your function after a Domain is added

To call filter for different type of domain you have to pass type of domain name

Parameters
Sample code
add_filter('post_add_domain', 'my_post_add_domain', 10, 3);

function my_post_add_domain($user, $domain, $domain_data){
	
	if($domain_data['type'] == 'doamin_type'){
		//code
		//Write your code here
	}
}

Pre_edit_domain

The pre_edit_domain filter will trigger your function right before Domain is edited.

To call filter for different type of domain you have to pass type of domain name

Parameters
Sample code
//FILTER to call specific function
add_filter('pre_edit_domain', 'my_pre_edit_domain', 10, 4);

function my_pre_edit_domain($user, $domain, $document_root, $domain_data){
	
	if($domain_data['type'] == 'domain_type'){
		//code
		//Write your code here
	}
}

Post_edit_domain

The post_edit_domain filter will trigger your function after a Domain is edited.

To call filter for different type of domain you have to pass type of domain name

Parameters
Sample code
//FILTER to call specific function
add_filter('post_edit_domain', 'my_post_edit_domain', 10, 3);

function my_post_edit_domain($user, $domain, $domain_data){
	
	if($domain_data['type'] == 'domain_type'){
		//code
		//Write your code here
	}
}

Pre_delete_domain

The pre_delete_domain filter will trigger your function just before Domain delete is triggered

Parameters
Sample code
//FILTER to call specific function
add_filter('pre_delete_domain', 'pre_delete_domain', 10, 2);

function pre_delete_domain($user, $domain){
   // $user will be username and $domains will contain domain name
}

Post_delete_domain

The post_delete_domain filter will trigger your function after a Domain is deleted successfully

Parameters
Sample code
FILTER to call specific function
add_filter('post_delete_domain', 'post_delete_domain', 10, 2);

function post_delete_domain($user, $domain){
   // $user will be username and $domains will contain domain name
}.

Force_HTTPS

The force_https filter will trigger your function after Enable/Disable Force HTTPS of Domain successfully

Parameters
Sample code
cluster_filter('force_https', 'my_force_https', 100, 3); 

function my_force_https($user, $domain, $do){ 
       // Code
       // Write your code here
}.
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list