Changeset 1312071
- Timestamp:
- 12/18/2015 11:56:34 PM (10 years ago)
- Location:
- watchman
- Files:
-
- 26 added
- 5 edited
-
assets/screenshot-3.png (added)
-
tags/0.6 (added)
-
tags/0.6/.editorconfig (added)
-
tags/0.6/LICENSE (added)
-
tags/0.6/lib (added)
-
tags/0.6/lib/class-wm-autoload.php (added)
-
tags/0.6/readme.md (added)
-
tags/0.6/readme.txt (added)
-
tags/0.6/revision (added)
-
tags/0.6/revision/class-wm-revision.php (added)
-
tags/0.6/settings (added)
-
tags/0.6/settings/class-wm-settings.php (added)
-
tags/0.6/tests (added)
-
tags/0.6/tests/bootstrap.php (added)
-
tags/0.6/tests/tests (added)
-
tags/0.6/tests/tests/test-watchman.php (added)
-
tags/0.6/tests/wm-test-case.php (added)
-
tags/0.6/ui (added)
-
tags/0.6/ui/css (added)
-
tags/0.6/ui/css/watchman-icons.css (added)
-
tags/0.6/ui/fonts (added)
-
tags/0.6/ui/fonts/watchman.eot (added)
-
tags/0.6/ui/fonts/watchman.svg (added)
-
tags/0.6/ui/fonts/watchman.ttf (added)
-
tags/0.6/ui/fonts/watchman.woff (added)
-
tags/0.6/watchman.php (added)
-
trunk/readme.md (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/revision/class-wm-revision.php (modified) (3 diffs)
-
trunk/settings/class-wm-settings.php (modified) (2 diffs)
-
trunk/watchman.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
watchman/trunk/readme.md
r1311121 r1312071 59 59  60 60 61 ### Track Post Status in Revisions. Label of Post Status is shown. 62 63  64 61 65 ## Changelog ## 62 66 63 67 Please visit [Watchman's Roadmap page](http://blog.incognitech.in/watchman/roadmap/ "Visit Watchman's Features page") to get some details about future releases. 68 ### 0.6 December 18, 2015 ### 69 * Fixes #6 - Track Post Status 70 * Fixes #7 - Track Post Date 71 * Fixes #13 - Stops unneccessary revisions getting created 72 * Adds Settings link in Plugin Row Action 73 * Fixes few Translation Strings 74 64 75 ### 0.5 December 17, 2015 ### 65 76 * Post Author tracking added. -
watchman/trunk/readme.txt
r1311121 r1312071 50 50 1. Watchman Settings Page 51 51 2. Track Post Author in Revisions. User Display Name & User ID of the author is shown. 52 3. Track Post Status in Revisions. Label of Post Status is shown. 52 53 53 54 … … 70 71 71 72 Please visit [Watchman's Roadmap page](http://blog.incognitech.in/watchman/roadmap/ "Visit Watchman's Features page") to get some details about future releases. 73 74 = 0.6 December 18, 2015 = 75 * Fixes #6 - Track Post Status 76 * Fixes #7 - Track Post Date 77 * Fixes #13 - Stops unneccessary revisions getting created 78 * Adds Settings link in Plugin Row Action 79 * Fixes few Translation Strings 72 80 73 81 = 0.5 December 17, 2015 = -
watchman/trunk/revision/class-wm-revision.php
r1311121 r1312071 67 67 $revision_fields = array( 68 68 'post_author' => array( 69 'label' => __( 'Post Author' ),69 'label' => __( 'Post Author', WM_TEXT_DOMAIN ), 70 70 'meta_key' => '_wm_post_author', 71 71 'meta_value' => function( $post ) { … … 74 74 }, 75 75 ), 76 'post_status' => array( 77 'label' => __( 'Post Status', WM_TEXT_DOMAIN ), 78 'meta_key' => '_wm_post_status', 79 'meta_value' => function( $post ) { 80 $post_status = get_post_status_object( $post->post_status ); 81 return $post_status->label; 82 }, 83 ), 84 'post_date' => array( 85 'label' => __( 'Post Date', WM_TEXT_DOMAIN ), 86 'meta_key' => '_wm_post_date', 87 'meta_value' => function( $post ) { 88 $datef = 'M j, Y @ H:i'; 89 return date_i18n( $datef, strtotime( $post->post_date ) ); 90 }, 91 ), 76 92 ); 77 93 return $revision_fields; … … 103 119 function check_for_changes( $post_has_changed, $last_revision, $post ) { 104 120 105 foreach ( array_keys( $this->get_custom_revision_fields() ) as $field) {106 107 $post_value = normalize_whitespace( $post->$field);121 foreach ( $this->get_custom_revision_fields() as $field => $fieldmeta ) { 122 123 $post_value = normalize_whitespace( call_user_func( $fieldmeta['meta_value'], $post ) ); 108 124 $revision_value = normalize_whitespace( apply_filters( "_wp_post_revision_field_$field", $last_revision->$field, $field, $last_revision, 'from' ) ); 109 125 -
watchman/trunk/settings/class-wm-settings.php
r1311121 r1312071 28 28 29 29 add_filter( 'wp_revisions_to_keep', array( $this, 'filter_revisions_to_keep' ), 999, 2 ); 30 31 add_filter( 'plugin_action_links_' . WM_BASE_PATH, array( $this, 'plugin_actions' ), 10, 4 ); 32 } 33 34 function plugin_actions( $actions, $plugin_file, $plugin_data, $context ) { 35 36 $actions['settings'] = '<a href="' . admin_url( 'admin.php?page=' . self::$page_slug ) . '">' . __( 'Settings', WM_TEXT_DOMAIN ) . '</a>'; 37 38 return $actions; 30 39 } 31 40 … … 170 179 <div class="wrap"> 171 180 172 <h2 class="wm-heading"><i class="wm-icon icon-watchman"></i><?php _e( 'Watchman' ); ?></h2>181 <h2 class="wm-heading"><i class="wm-icon icon-watchman"></i><?php _e( 'Watchman', WM_TEXT_DOMAIN ); ?></h2> 173 182 174 183 <form action='options.php' method='post'> -
watchman/trunk/watchman.php
r1311121 r1312071 4 4 * Plugin URI: http://blog.incognitech.in/watchman 5 5 * Description: A WordPress plugin to track revisions of your posts, pages and custom posts 6 * Version: 0. 56 * Version: 0.6 7 7 * Author: desaiuditd 8 8 * Author URI: http://blog.incognitech.in … … 35 35 * @static 36 36 * @static var array $instance 37 * @return The one true Watchman37 * @return Watchman The one true Watchman 38 38 */ 39 39 public static function instance() { … … 86 86 // Defines WM_VERSION if it does not exits. 87 87 if ( ! defined( 'WM_VERSION' ) ) { 88 define( 'WM_VERSION', '0. 5' );88 define( 'WM_VERSION', '0.6' ); 89 89 } 90 90 … … 102 102 if ( ! defined( 'WM_URL' ) ) { 103 103 define( 'WM_URL', plugin_dir_url( __FILE__ ) ); 104 } 105 106 // Defines WM_BASE_PATH if it does not exits. 107 if ( ! defined( 'WM_BASE_PATH' ) ) { 108 define( 'WM_BASE_PATH', plugin_basename( __FILE__ ) ); 104 109 } 105 110 }
Note: See TracChangeset
for help on using the changeset viewer.