⚡ NEW: Changeset/ - HD Photos!

Changeset 1312071


Ignore:
Timestamp:
12/18/2015 11:56:34 PM (10 years ago)
Author:
desaiuditd
Message:

Update to commit a7f5ce0 from git@…:desaiuditd/watchman.git

Location:
watchman
Files:
26 added
5 edited

Legend:

Unmodified
Added
Removed
  • watchman/trunk/readme.md

    r1311121 r1312071  
    5959![Track Post Author in Revisions. User Display Name & User ID of the author is shown.](assets/screenshot-2.png)
    6060
     61### Track Post Status in Revisions. Label of Post Status is shown.
     62
     63![Track Post Status in Revisions. Label of Post Status is shown.](assets/screenshot-3.png)
     64
    6165## Changelog ##
    6266
    6367Please 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
    6475### 0.5 December 17, 2015 ###
    6576* Post Author tracking added.
  • watchman/trunk/readme.txt

    r1311121 r1312071  
    50501. Watchman Settings Page
    51512. Track Post Author in Revisions. User Display Name & User ID of the author is shown.
     523. Track Post Status in Revisions. Label of Post Status is shown.
    5253
    5354
     
    7071
    7172Please 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
    7280
    7381= 0.5 December 17, 2015 =
  • watchman/trunk/revision/class-wm-revision.php

    r1311121 r1312071  
    6767            $revision_fields = array(
    6868                'post_author' => array(
    69                     'label' => __( 'Post Author' ),
     69                    'label' => __( 'Post Author', WM_TEXT_DOMAIN ),
    7070                    'meta_key' => '_wm_post_author',
    7171                    'meta_value' => function( $post ) {
     
    7474                    },
    7575                ),
     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                ),
    7692            );
    7793            return $revision_fields;
     
    103119        function check_for_changes( $post_has_changed, $last_revision, $post ) {
    104120
    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 ) );
    108124                $revision_value = normalize_whitespace( apply_filters( "_wp_post_revision_field_$field", $last_revision->$field, $field, $last_revision, 'from' ) );
    109125
  • watchman/trunk/settings/class-wm-settings.php

    r1311121 r1312071  
    2828
    2929            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;
    3039        }
    3140
     
    170179            <div class="wrap">
    171180
    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>
    173182
    174183                <form action='options.php' method='post'>
  • watchman/trunk/watchman.php

    r1311121 r1312071  
    44 * Plugin URI: http://blog.incognitech.in/watchman
    55 * Description: A WordPress plugin to track revisions of your posts, pages and custom posts
    6  * Version: 0.5
     6 * Version: 0.6
    77 * Author: desaiuditd
    88 * Author URI: http://blog.incognitech.in
     
    3535         * @static
    3636         * @static var array $instance
    37          * @return The one true Watchman
     37         * @return Watchman The one true Watchman
    3838         */
    3939        public static function instance() {
     
    8686            // Defines WM_VERSION if it does not exits.
    8787            if ( ! defined( 'WM_VERSION' ) ) {
    88                 define( 'WM_VERSION', '0.5' );
     88                define( 'WM_VERSION', '0.6' );
    8989            }
    9090
     
    102102            if ( ! defined( 'WM_URL' ) ) {
    103103                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__ ) );
    104109            }
    105110        }
Note: See TracChangeset for help on using the changeset viewer.