| @@ 728-730 (lines=3) @@ | ||
| 725 | // Simple strings. |
|
| 726 | foreach( array( 'custom_id', 'custom_name', 'custom_singular_name' ) as $property ) { |
|
| 727 | ||
| 728 | if ( ! empty( $schema['properties'][$property] ) && isset( $request[$property] ) ) { |
|
| 729 | $prepared_item->$property = sanitize_text_field( $request[$property] ); |
|
| 730 | } |
|
| 731 | ||
| 732 | } |
|
| 733 | ||
| @@ 737-739 (lines=3) @@ | ||
| 734 | // Simple integers. |
|
| 735 | foreach( array( 'is_recurring', 'recurring_interval', 'recurring_limit', 'free_trial', 'trial_interval', 'dynamic_pricing', 'editable' ) as $property ) { |
|
| 736 | ||
| 737 | if ( ! empty( $schema['properties'][$property] ) && isset( $request[$property] ) ) { |
|
| 738 | $prepared_item->$property = intval( $request[$property] ); |
|
| 739 | } |
|
| 740 | ||
| 741 | } |
|
| 742 | ||