Simple History - Version 1.3.9

Version Description

  • Fixed strict standards warning
  • Tested on WordPress 4.0
Download this release

Release Info

Developer eskapism
Plugin Icon 128x128 Simple History
Version 1.3.9
Comparing to
See all releases

Code changes from version 1.3.8 to 1.3.9

index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Simple History
4
  Plugin URI: http://eskapism.se/code-playground/simple-history/
5
  Description: Get a log/history/audit log/version history of the changes made by users in WordPress.
6
- Version: 1.3.8
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
@@ -27,7 +27,7 @@ License: GPL2
27
 
28
  load_plugin_textdomain('simple-history', false, "/simple-history/languages");
29
 
30
- define( "SIMPLE_HISTORY_VERSION", "1.3.8");
31
  define( "SIMPLE_HISTORY_NAME", "Simple History");
32
 
33
  // Find the plugin directory URL
3
  Plugin Name: Simple History
4
  Plugin URI: http://eskapism.se/code-playground/simple-history/
5
  Description: Get a log/history/audit log/version history of the changes made by users in WordPress.
6
+ Version: 1.3.9
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
27
 
28
  load_plugin_textdomain('simple-history', false, "/simple-history/languages");
29
 
30
+ define( "SIMPLE_HISTORY_VERSION", "1.3.9");
31
  define( "SIMPLE_HISTORY_NAME", "Simple History");
32
 
33
  // Find the plugin directory URL
log-tests.php CHANGED
@@ -1,4 +1,65 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  return;
3
  //*
4
 
@@ -116,4 +177,4 @@ add_action("init", function() {
116
 
117
 
118
 
119
- //*/
1
  <?php
2
+
3
+ add_action("init", function() {
4
+
5
+ register_post_type("texts", array(
6
+ "show_ui" => true
7
+ ));
8
+
9
+ register_post_type("products", array(
10
+ "labels" => array(
11
+ "name" => "Products",
12
+ "singular_name" => "Product"
13
+ ),
14
+ "public" => true
15
+ ));
16
+
17
+ // Example from the codex
18
+ $labels = array(
19
+ 'name' => _x( 'Books', 'post type general name', 'your-plugin-textdomain' ),
20
+ 'singular_name' => _x( 'Book', 'post type singular name', 'your-plugin-textdomain' ),
21
+ 'menu_name' => _x( 'Books', 'admin menu', 'your-plugin-textdomain' ),
22
+ 'name_admin_bar' => _x( 'Book', 'add new on admin bar', 'your-plugin-textdomain' ),
23
+ 'add_new' => _x( 'Add New', 'book', 'your-plugin-textdomain' ),
24
+ 'add_new_item' => __( 'Add New Book', 'your-plugin-textdomain' ),
25
+ 'new_item' => __( 'New Book', 'your-plugin-textdomain' ),
26
+ 'edit_item' => __( 'Edit Book', 'your-plugin-textdomain' ),
27
+ 'view_item' => __( 'View Book', 'your-plugin-textdomain' ),
28
+ 'all_items' => __( 'All Books', 'your-plugin-textdomain' ),
29
+ 'search_items' => __( 'Search Books', 'your-plugin-textdomain' ),
30
+ 'parent_item_colon' => __( 'Parent Books:', 'your-plugin-textdomain' ),
31
+ 'not_found' => __( 'No books found.', 'your-plugin-textdomain' ),
32
+ 'not_found_in_trash' => __( 'No books found in Trash.', 'your-plugin-textdomain' ),
33
+ );
34
+
35
+ $args = array(
36
+ 'labels' => $labels,
37
+ 'public' => true,
38
+ 'publicly_queryable' => true,
39
+ 'show_ui' => true,
40
+ 'show_in_menu' => true,
41
+ 'query_var' => true,
42
+ 'rewrite' => array( 'slug' => 'book' ),
43
+ 'capability_type' => 'post',
44
+ 'has_archive' => true,
45
+ 'hierarchical' => false,
46
+ 'menu_position' => null,
47
+ 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
48
+ );
49
+
50
+ register_post_type( 'book', $args );
51
+
52
+ });
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+ // Log testing beloe
63
  return;
64
  //*
65
 
177
 
178
 
179
 
180
+ //*/
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Simple History ===
2
  Contributors: eskapism, MarsApril, Offereins
3
  Donate link: http://eskapism.se/sida/donate/
4
- Tags: history, log, changes, changelog, audit, trail, pages, attachments, users, cms, dashboard, admin, syslog
5
  Requires at least: 3.8.0
6
- Tested up to: 3.9.1
7
- Stable tag: 1.3.8
8
 
9
  View changes made by users within WordPress. See who created a page, uploaded an attachment or approved an comment, and more.
10
 
@@ -175,6 +175,10 @@ to only use the secret RSS feed to keep track of the changes on you web site/Wor
175
 
176
  == Changelog ==
177
 
 
 
 
 
178
  = 1.3.8 =
179
  - Added filter for rss feed: `simple_history/rss_feed_show`. Fixes more things in this thread: http://wordpress.org/support/topic/more-rss-feed-items.
180
 
1
  === Simple History ===
2
  Contributors: eskapism, MarsApril, Offereins
3
  Donate link: http://eskapism.se/sida/donate/
4
+ Tags: history, log, changes, changelog, audit, trail, stream, pages, attachments, users, cms, dashboard, admin, syslog, activity
5
  Requires at least: 3.8.0
6
+ Tested up to: 4.0
7
+ Stable tag: 1.3.9
8
 
9
  View changes made by users within WordPress. See who created a page, uploaded an attachment or approved an comment, and more.
10
 
175
 
176
  == Changelog ==
177
 
178
+ = 1.3.9 =
179
+ - Fixed strict standards warning
180
+ - Tested on WordPress 4.0
181
+
182
  = 1.3.8 =
183
  - Added filter for rss feed: `simple_history/rss_feed_show`. Fixes more things in this thread: http://wordpress.org/support/topic/more-rss-feed-items.
184
 
simple-history-extender/class.simple-history-extend.php CHANGED
@@ -248,6 +248,20 @@ class Simple_History_Extend {
248
  simple_history_add( $args );
249
  }
250
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  /**
252
  * Extend Simple History shortcut for User type
253
  *
248
  simple_history_add( $args );
249
  }
250
 
251
+ static function extendStatic( $r ){
252
+ $args = array(
253
+ 'action' => isset( $r['action'] ) ? $r['action'] : __('updated'),
254
+ 'object_type' => isset( $r['type'] ) ? $r['type'] : null,
255
+ 'object_subtype' => isset( $r['subtype'] ) ? $r['subtype'] : null,
256
+ 'object_name' => isset( $r['name'] ) ? $r['name'] : null,
257
+ 'object_id' => isset( $r['id'] ) ? $r['id'] : null,
258
+ 'user_id' => isset( $r['user_id'] ) ? $r['user_id'] : null
259
+ );
260
+
261
+ // Do the magic
262
+ simple_history_add( $args );
263
+ }
264
+
265
  /**
266
  * Extend Simple History shortcut for User type
267
  *
simple-history-extender/simple-history-extender.php CHANGED
@@ -270,7 +270,7 @@ class SimpleHistoryExtender {
270
  || ( isset( $old[$module] ) && $old[$module]['active'] !== $retval[$module]['active'] )
271
  ){
272
 
273
- Simple_History_Extend::extend( array(
274
  'action' => $retval[$module]['active'] ? __('activated', 'sh-extender') : __('deactivated', 'sh-extender'),
275
  'type' => __('Simple History Extender Module', 'sh-extender'),
276
  'name' => $field['title'],
270
  || ( isset( $old[$module] ) && $old[$module]['active'] !== $retval[$module]['active'] )
271
  ){
272
 
273
+ Simple_History_Extend::extendStatic( array(
274
  'action' => $retval[$module]['active'] ? __('activated', 'sh-extender') : __('deactivated', 'sh-extender'),
275
  'type' => __('Simple History Extender Module', 'sh-extender'),
276
  'name' => $field['title'],