Skip to content

Commit

Permalink
Fix component filter warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ville Siltala committed Sep 9, 2016
1 parent 8c04f6b commit 913b5cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions classes/data.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,16 @@ public static function component_handle( &$data, $fields = false ) {
$data[ $key ] = apply_filters( "dustpress/data/component=" . $item["acf_fc_layout"], $item );
}
else {
$data->{$key} = apply_filters( "dustpress/data/component=" . $item["acf_fc_layout"], $item );
$data->{$key} = apply_filters( "dustpress/data/component=" . $item["acf_fc_layout"], $item );
}
}

if ( is_array( $data ) ) {
self::component_handle( $data[ $key ], true );
}
else if ( get_class($data) == "stdClass" || get_class($data) == "WP_Post" ) {
self::component_handle( $data->{$key}, true );
}
else if ( is_object( $data ) ) {
self::component_handle( $data->{$key}, true );
}
}
else {
if ( is_array( $data ) ) {
Expand All @@ -46,9 +43,6 @@ public static function component_handle( &$data, $fields = false ) {
else if ( get_class($data) == "stdClass" || get_class($data) == "WP_Post" ) {
self::component_handle( $data->{$key}, true );
}
else if ( is_object( $data ) ) {
self::component_handle( $data->{$key}, true );
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion dustpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Author: Miika Arponen & Ville Siltala / Geniem Oy
Author URI: http://www.geniem.com
License: GPLv3
Version: 1.1.20
Version: 1.1.21
*/

final class DustPress {
Expand Down

0 comments on commit 913b5cf

Please sign in to comment.