Add array functions and clean shit up

This commit is contained in:
Takumi
2013-07-30 19:22:50 +10:00
parent f76bc15c56
commit e3f2e521cc
5 changed files with 69 additions and 55 deletions

View File

@@ -103,7 +103,7 @@ function sp_save_post( $post_id ) {
foreach ( $sportspress as $key => $value ):
delete_post_meta( $post_id, $key );
if ( is_array( $value ) ):
if ( sp_array_depth( $value ) >= 3 ):
if ( sp_get_array_depth( $value ) >= 3 ):
add_post_meta( $post_id, $key, $value, false );
else:
$values = new RecursiveIteratorIterator( new RecursiveArrayIterator( $value ) );