Bump 2.0.6 - did these only get committed to SVN and not git?

This commit is contained in:
ekes 2021-01-20 14:49:00 +01:00
parent c57a3a776a
commit 3ff30b8fb7
5 changed files with 46 additions and 21 deletions

View file

@ -339,12 +339,12 @@ class Squat_Radar_Formatter {
static public function field_summary_html($value, $original, $field, $context) {
if ( $field[0] == 'summary' ) {
// Summary is only populated if there is an explict summary.
if ( empty( trim($value) ) ) {
$value = trim($value);
if ( empty( $value ) ) {
array_shift($field);
if (is_array($field)) {
$field_tree = array_reverse($field);
$sibling_fields = self::getValue($context['event'], $field_tree);
$value = print_r($context['event'], true);
if (! empty( $sibling_fields['value'] ) ) {
$value = wp_trim_words( $sibling_fields['value'], 30 );
}
@ -366,7 +366,10 @@ class Squat_Radar_Formatter {
* image:file:url
*/
static public function field_image_html($value, $original, $field, $context) {
if ($field[0] == 'url' && $field[1] == 'file' && $field[2] == 'image') {
if ( isset($field[0]) && $field[0] == 'url' &&
isset($field[1]) && $field[1] == 'file' &&
isset($field[2]) && $field[2] == 'image'
) {
return '<img src="'. esc_url_raw($original) .'" class="squat-radar-image" \>';
}