@@ 1301-1316 (lines=16) @@ | ||
1298 | do_action( "pods_meta_save_pre_post_{$post->post_type}", $data, $pod, $id, $groups, $post, $is_new_item ); |
|
1299 | } |
|
1300 | ||
1301 | if ( $is_new_item || false !== $nonced ) { |
|
1302 | pods_no_conflict_on( 'post' ); |
|
1303 | ||
1304 | if ( ! empty( $pod ) ) { |
|
1305 | // Fix for Pods doing it's own sanitizing |
|
1306 | $data = pods_unslash( (array) $data ); |
|
1307 | ||
1308 | $pod->save( $data, null, null, array( 'is_new_item' => $is_new_item ) ); |
|
1309 | } elseif ( ! empty( $id ) ) { |
|
1310 | foreach ( $data as $field => $value ) { |
|
1311 | update_post_meta( $id, $field, $value ); |
|
1312 | } |
|
1313 | } |
|
1314 | ||
1315 | pods_no_conflict_off( 'post' ); |
|
1316 | } |
|
1317 | ||
1318 | if ( false !== $nonced && ! empty( $groups ) ) { |
|
1319 | if ( $is_new_item ) { |
|
@@ 1854-1869 (lines=16) @@ | ||
1851 | do_action( 'pods_meta_save_pre_user', $data, $pod, $id, $groups, $is_new_item ); |
|
1852 | } |
|
1853 | ||
1854 | if ( $is_new_item || false !== $nonced ) { |
|
1855 | pods_no_conflict_on( 'user' ); |
|
1856 | ||
1857 | if ( ! empty( $pod ) ) { |
|
1858 | // Fix for Pods doing it's own sanitizing |
|
1859 | $data = pods_unslash( (array) $data ); |
|
1860 | ||
1861 | $pod->save( $data, null, null, array( 'is_new_item' => $is_new_item, 'podsmeta' => true ) ); |
|
1862 | } elseif ( ! empty( $id ) ) { |
|
1863 | foreach ( $data as $field => $value ) { |
|
1864 | update_user_meta( $id, $field, $value ); |
|
1865 | } |
|
1866 | } |
|
1867 | ||
1868 | pods_no_conflict_off( 'user' ); |
|
1869 | } |
|
1870 | ||
1871 | if ( false !== $nonced && ! empty( $groups ) ) { |
|
1872 | if ( $is_new_item ) { |