Making WordPress.org


Ignore:
Timestamp:
12/17/2018 07:35:16 AM (6 years ago)
Author:
vedjain
Message:

WCPT: Remove js based humanize_time_diff to favour PHP based function.

Earlier I added JS based version of the function, but turns out I can use PHP version using a little workaround. PHP's implementation is favored because it is a method in core, so it will be maintained and translations are already available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/javascript/tracker/source/components/filterable-table/row.jsx

    r7976 r7984  
    3333                cellContent = <a href={ this.props.row[ columnName + 'Url' ] }>{ this.props.row[ columnName ] }</a>;
    3434            } else if ( this.props.customRender[ columnName ] ) {
    35                 cellContent = this.props.customRender[ columnName ]( this.props.row[ columnName ] );
     35                cellContent = this.props.customRender[ columnName ]( this.props.row, this.props.row[ columnName ] );
    3636            } else {
    3737                cellContent = this.props.row[ columnName ];
Note: See TracChangeset for help on using the changeset viewer.