Noptin_Automation_Rules_Table::column_updated_at( Noptin_Automation_Rule $item )

Displays the rule’s modification date


Parameters Parameters

$item

(Noptin_Automation_Rule) (Required) item.


Top ↑

Return Return

(HTML)


Top ↑

Source Source

File: includes/automation-rules/class-noptin-automation-rules-table.php

	public function column_updated_at( $item ) {
		
		$updated   = strtotime( $item->updated_at );
		$time_diff = current_time( 'timestamp' ) - $updated;

		if ( $updated && $time_diff > 0 && $time_diff < DAY_IN_SECONDS ) {
			$relative = sprintf(
				/* translators: %s: Human-readable time difference. */
				__( '%s ago', 'newsletter-optin-box' ),
				human_time_diff( $updated, current_time( 'timestamp' ) )
			);
		} else {
			$relative = date_i18n( get_option( 'date_format' ), $updated );
		}

		$date = esc_attr( date_i18n( 'Y/m/d g:i:s a', $updated ) );
		return "<abbr title='$date'>$relative<abbr>";

	}

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation