TABLE_CLASS
TABLE_CLASS ='posts-data-table'
Utility functions for Posts Table Pro.
array_diff_assoc(array $array1,array $array2): array
Similar to <code>array_diff_assoc</code>, but does a loose type comparison on array values (== not ===).
Supports multi-dimensional arrays, but doesn't support passing more than two arrays.
array | $array1 | The main array to compare against |
array | $array2 | The array to compare with |
All entries in $array1 which are not present in $array2 (including key check)
list_pluck_array(array $list,array|string $keys = array()): array
Similar to <code>wp_list_pluck</code> or <code>array_column</code> but plucks several keys from the source array.
array | $list | The array of arrays to extract the keys from |
array|string | $keys | The list of keys to pluck |
An array returned in the same order as $list, but where each item in the array contains just the specified $keys
is_unix_epoch_time(mixed $value): boolean
Is the value passed a valid UNIX epoch time (i.e. seconds elapsed since 1st January 1970)?
Not a perfect implementation as it will return false for valid timestamps representing dates between 31st October 1966 and 3rd March 1973, but this is needed to prevent valid dates held in numeric formats (e.g. 20171201) being wrongly interpreted as timestamps.
mixed | $value | The value to check |
True if $value is a valid epoch timestamp
strtotime(string $date): integer|boolean
Convert a date string to a timestamp. A wrapper around strtotime which accounts for dates already formatted as a timestamp.
string | $date | The date to convert to a timestamp. |
The timestamp (number of seconds since the Epoch) for this date, or false on failure.