Plugin Directory

Changeset 2699882


Ignore:
Timestamp:
03/26/2022 08:50:47 AM (4 years ago)
Author:
logtivity
Message:

release 1.13.0

Location:
logtivity
Files:
54 added
5 edited

Legend:

Unmodified
Added
Removed
  • logtivity/trunk/Logs/Core/Logtivity_Post.php

    r2642335 r2699882  
    3030        if ($old_status != 'publish' && $new_status == 'publish') {
    3131            $this->action = $this->getPostTypeLabel($post->ID) . ' Published';
     32            return;
    3233        }
    3334
    3435        if ($old_status == 'publish' && $new_status == 'draft') {
    3536            $this->action = $this->getPostTypeLabel($post->ID) . ' Unpublished';
     37            return;
    3638        }
     39
     40        if ($old_status != $new_status) {
     41            Logtivity_Logger::log()
     42                ->setAction(
     43                    $this->getPostTypeLabel($post->ID) . ' Status changed from '.$old_status.' to '.$new_status
     44                )
     45                ->setContext($post->post_title)
     46                ->addMeta('Post ID', $post->ID)
     47                ->addMeta('Post Type', $post->post_type)
     48                ->send();
     49        }
     50
    3751    }
    3852
  • logtivity/trunk/Logs/Core/Logtivity_Term.php

    r2698792 r2699882  
    66    {
    77        add_action( 'edited_terms', [$this, 'termUpdated'], 10, 2 );
     8        add_action( 'created_term', [$this, 'termCreated'], 10, 3 );
     9        add_action( 'delete_term', [$this, 'termDeleted'], 10, 5);
     10    }
     11
     12    public function termCreated($term_id, $tt_id, $taxonomy)
     13    {
     14        $term = get_term_by('id', $term_id, $taxonomy);
     15
     16        return Logtivity_Logger::log()
     17            ->setAction('Term Created')
     18            ->setContext($term->name)
     19            ->addMeta('Term ID', $term->term_id)
     20            ->addMeta('Slug', $term->slug)
     21            ->addMeta('Taxonomy', $term->taxonomy)
     22            ->addMeta('Edit Link', get_edit_term_link($term))
     23            ->send();
    824    }
    925
     
    2137            ->send();
    2238    }
     39
     40    public function termDeleted($term, $tt_id, $taxonomy, $deleted_term, $object_ids)
     41    {
     42        return Logtivity_Logger::log()
     43            ->setAction('Term Deleted')
     44            ->setContext($deleted_term->name)
     45            ->addMeta('Term ID', $deleted_term->term_id)
     46            ->addMeta('Slug', $deleted_term->slug)
     47            ->addMeta('Taxonomy', $deleted_term->taxonomy)
     48            ->send();
     49    }
    2350}
    2451
  • logtivity/trunk/logtivity.php

    r2698795 r2699882  
    55 * Plugin URI:  https://logtivity.io
    66 * Description: Dedicated Event Monitoring for WordPress using Logtivity.io.
    7  * Version:     1.12.0
     7 * Version:     1.13.0
    88 * Author:      Logtivity
    99 * Text Domain: logtivity
     
    1212class Logtivity
    1313{
    14     protected $version = '1.12.0';
     14    protected $version = '1.13.0';
    1515
    1616    /**
  • logtivity/trunk/readme.md

    r2698790 r2699882  
    55Requires at least: 4.7
    66Tested up to: 5.8
    7 Stable tag: 1.12.0
     7Stable tag: 1.13.0
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    279279== Changelog ==
    280280
     281= 1.13.0 =
     282
     283_Release Date – Saturday 26th March 2022_
     284
     285* Add logging of Term Created and Deleted.
     286
    281287= 1.12.0 =
    282288
  • logtivity/trunk/readme.txt

    r2698790 r2699882  
    55Requires at least: 4.7
    66Tested up to: 5.8
    7 Stable tag: 1.12.0
     7Stable tag: 1.13.0
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    279279== Changelog ==
    280280
     281= 1.13.0 =
     282
     283_Release Date – Saturday 26th March 2022_
     284
     285* Add logging of Term Created and Deleted.
     286
    281287= 1.12.0 =
    282288
Note: See TracChangeset for help on using the changeset viewer.