PluginProbe
Assistant – Every Day Productivity Apps / 1.5.5.1
Assistant – Every Day Productivity Apps v1.5.5.1
1.5.5.1 1.5.5 trunk 0.1.0 0.2.0 0.2.1 0.2.2 0.3.0 0.3.1 0.4 0.4.1 0.4.2 0.5.0 0.5.1 0.6.0 0.7.0 0.7.0.2 0.7.0.3 0.7.0.4 0.7.0.5 0.7.0.6 0.7.0.7 0.7.0.8 0.7.0.9 0.7.1 All 72 releases
← All changes | backend/src/Hooks/Actions/OnDeleteTerm.php +26 -26 1.5.5 → 1.5.5.1 View file →
@@ -1,26 +1,26 @@
1 -<?php
2 -
3 -namespace FL\Assistant\Hooks\Actions;
4 -
5 -use FL\Assistant\Data\Repository\NotationsRepository;
6 -
7 -/**
8 - * Class OnDeleteTerm
9 - * @package FL\Assistant\Hooks\Actions
10 - */
11 -class OnDeleteTerm {
12 -
13 - protected $notations;
14 -
15 - public function __construct( NotationsRepository $notations ) {
16 - $this->notations = $notations;
17 - }
18 -
19 - public function __invoke( $term_id ) {
20 - $results = $this->notations->get_labels_by_id( 'post', $term_id );
21 -
22 - foreach ( $results as $label ) {
23 - wp_delete_post( $label['id'] );
24 - }
25 - }
26 -}
1 +<?php
2 +
3 +namespace FL\Assistant\Hooks\Actions;
4 +
5 +use FL\Assistant\Data\Repository\NotationsRepository;
6 +
7 +/**
8 + * Class OnDeleteTerm
9 + * @package FL\Assistant\Hooks\Actions
10 + */
11 +class OnDeleteTerm {
12 +
13 + protected $notations;
14 +
15 + public function __construct( NotationsRepository $notations ) {
16 + $this->notations = $notations;
17 + }
18 +
19 + public function __invoke( $term_id ) {
20 + $results = $this->notations->get_labels_by_id( 'post', $term_id );
21 +
22 + foreach ( $results as $label ) {
23 + wp_delete_post( $label['id'] );
24 + }
25 + }
26 +}