Skip to content

Commit 461359a

Browse files
committed
+ page read method
1 parent 39bec95 commit 461359a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

helpers/page-meta.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ public static function edit( &$data ){
1212
}
1313
}
1414

15+
public static function read( &$data ){
16+
if( !array_key_exists('meta', $data ) ) $data['meta'] = array();
17+
if( is_string( $data['meta'] ) ) $data['meta'] = json_decode($data['meta'], true);
18+
}
19+
1520
public static function fields( &$data ){
1621
$view = View::do_fetch( getPath('views/admin/page-meta-fields.php'), $data );
1722
echo $view; // return instead?

0 commit comments

Comments
 (0)