pll_get_new_term_translation_link

Filter the new term translation link.

Description

apply_filters( 'pll_get_new_term_translation_link', (string) $link, (object) $language, (int) $term_id, (string) $taxonomy, (string) $post_type ); 

Parameters (5)

0. $link (string)
The new term translation link
1. $language (object)
The language of the new translation
2. $term_id (int)
The source term id
3. $taxonomy (string)
The taxonomy.
4. $post_type (string)
The post type.

Usage

To run the hook, copy the example below.
  1. $link = apply_filters( 'pll_get_new_term_translation_link', $link, $language, $term_id, $taxonomy, $post_type ); 
  2.  
  3. if ( !empty( $link ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the pll_get_new_term_translation_link callback 
  2. function filter_pll_get_new_term_translation_link( $link, $language, $term_id, $taxonomy, $post_type ) { 
  3. // make filter magic happen here... 
  4. return $link
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'pll_get_new_term_translation_link', 'filter_pll_get_new_term_translation_link', 10, 5 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'pll_get_new_term_translation_link', 'filter_pll_get_new_term_translation_link', 10, 5 ); 

Defined (1)

The filter is defined in the following location(s).

/admin/admin-links.php  
  1. return apply_filters( 'pll_get_new_term_translation_link', $link, $language, $term_id, $taxonomy, $post_type );