Wednesday, July 6, 2022
HomeWordPress Developmentcustomized taxonomy - Trash Bin for Classes?

customized taxonomy – Trash Bin for Classes?


I’ve a cat_notice taxonomy, the place there are a number of classes and certainly one of them the slug is ‘trash’. On this case I created a hyperlink and I wanted that after I clicked on this hyperlink I’d take the present id of the time period and add it as a toddler of the time period ‘trash’.

add_filter( "cat_notice_row_actions", 'trash_row_actions', 10, 2 );
  operate trash_row_actions( $actions, $user_object ) {
     // Take away the Edit motion.
     unset( $actions['delete'] );
     $termID = $user_object->term_id;
     $termTrash = get_term_by('slug', 'lixeira', 'cat_notice');
     $idTerm = $termTrash->term_id;  
     wp_update_term( $termID, $user_object, array( 'dad or mum' => $termTrash ) );
     $actions['trash_lionx'] = '<a mode="colour: purple" href="">Excluir</a>';
    return $actions;
}

Please assist

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments