PluginProbe
Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity / 1.12.0
Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity v1.12.0
3.3.9 3.3.8 trunk 1.0 1.1.0 1.10.0 1.11.0 1.11.1 1.12.0 1.13.0 1.14.0 1.15.0 1.16.0 1.17.0 1.17.1 1.18.0 1.19.0 1.2.0 1.20.0 1.20.1 1.3.0 1.3.1 1.4.0 1.5.0 1.6.0 All 67 releases
logtivity / Logs / Core / Logtivity_Term.php

Logtivity_Term.php in Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity 1.12.0, at Logs/Core/Logtivity_Term.php

25 lines 554 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class Logtivity_Term
4 {
5 public function __construct()
6 {
7 add_action( 'edited_terms', [$this, 'termUpdated'], 10, 2 );
8 }
9
10 public function termUpdated($term_id, $taxonomy)
11 {
12 $term = get_term_by('id', $term_id, $taxonomy);
13
14 return Logtivity_Logger::log()
15 ->setAction('Term Updated')
16 ->setContext($term->name)
17 ->addMeta('Term ID', $term->term_id)
18 ->addMeta('Slug', $term->slug)
19 ->addMeta('Taxonomy', $term->taxonomy)
20 ->addMeta('Edit Link', get_edit_term_link($term))
21 ->send();
22 }
23 }
24
25 $Logtivity_Term = new Logtivity_Term;