Skip to content

Commit 913b5cf

Browse files
author
Ville Siltala
committed
Fix component filter warnings.
1 parent 8c04f6b commit 913b5cf

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

classes/data.php

+2-8
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,16 @@ public static function component_handle( &$data, $fields = false ) {
2525
$data[ $key ] = apply_filters( "dustpress/data/component=" . $item["acf_fc_layout"], $item );
2626
}
2727
else {
28-
$data->{$key} = apply_filters( "dustpress/data/component=" . $item["acf_fc_layout"], $item );
28+
$data->{$key} = apply_filters( "dustpress/data/component=" . $item["acf_fc_layout"], $item );
2929
}
3030
}
31-
31+
3232
if ( is_array( $data ) ) {
3333
self::component_handle( $data[ $key ], true );
3434
}
3535
else if ( get_class($data) == "stdClass" || get_class($data) == "WP_Post" ) {
3636
self::component_handle( $data->{$key}, true );
3737
}
38-
else if ( is_object( $data ) ) {
39-
self::component_handle( $data->{$key}, true );
40-
}
4138
}
4239
else {
4340
if ( is_array( $data ) ) {
@@ -46,9 +43,6 @@ public static function component_handle( &$data, $fields = false ) {
4643
else if ( get_class($data) == "stdClass" || get_class($data) == "WP_Post" ) {
4744
self::component_handle( $data->{$key}, true );
4845
}
49-
else if ( is_object( $data ) ) {
50-
self::component_handle( $data->{$key}, true );
51-
}
5246
}
5347
}
5448
}

dustpress.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Author: Miika Arponen & Ville Siltala / Geniem Oy
77
Author URI: http://www.geniem.com
88
License: GPLv3
9-
Version: 1.1.20
9+
Version: 1.1.21
1010
*/
1111

1212
final class DustPress {

0 commit comments

Comments
 (0)