| @@ 604-612 (lines=9) @@ | ||
| 601 | ) { |
|
| 602 | // set the start time for this reg step |
|
| 603 | if ( ! $this->transaction->set_reg_step_initiated( $reg_step->slug() ) ) { |
|
| 604 | if ( WP_DEBUG ) { |
|
| 605 | EE_Error::add_error( |
|
| 606 | sprintf( |
|
| 607 | __( 'The "%1$s" registration step was not initialized properly.', 'event_espresso' ), |
|
| 608 | $reg_step->name() |
|
| 609 | ), |
|
| 610 | __FILE__, __FUNCTION__, __LINE__ |
|
| 611 | ); |
|
| 612 | } |
|
| 613 | } |
|
| 614 | } |
|
| 615 | } |
|
| @@ 5946-5955 (lines=10) @@ | ||
| 5943 | */ |
|
| 5944 | public function get_IDs($model_objects, $filter_out_empty_ids = false) |
|
| 5945 | { |
|
| 5946 | if (! $this->has_primary_key_field()) { |
|
| 5947 | if (WP_DEBUG) { |
|
| 5948 | EE_Error::add_error( |
|
| 5949 | __('Trying to get IDs from a model than has no primary key', 'event_espresso'), |
|
| 5950 | __FILE__, |
|
| 5951 | __FUNCTION__, |
|
| 5952 | __LINE__ |
|
| 5953 | ); |
|
| 5954 | } |
|
| 5955 | } |
|
| 5956 | $IDs = array(); |
|
| 5957 | foreach ($model_objects as $model_object) { |
|
| 5958 | $id = $model_object->ID(); |
|
| @@ 5959-5974 (lines=16) @@ | ||
| 5956 | $IDs = array(); |
|
| 5957 | foreach ($model_objects as $model_object) { |
|
| 5958 | $id = $model_object->ID(); |
|
| 5959 | if (! $id) { |
|
| 5960 | if ($filter_out_empty_ids) { |
|
| 5961 | continue; |
|
| 5962 | } |
|
| 5963 | if (WP_DEBUG) { |
|
| 5964 | EE_Error::add_error( |
|
| 5965 | __( |
|
| 5966 | 'Called %1$s on a model object that has no ID and so probably hasn\'t been saved to the database', |
|
| 5967 | 'event_espresso' |
|
| 5968 | ), |
|
| 5969 | __FILE__, |
|
| 5970 | __FUNCTION__, |
|
| 5971 | __LINE__ |
|
| 5972 | ); |
|
| 5973 | } |
|
| 5974 | } |
|
| 5975 | $IDs[] = $id; |
|
| 5976 | } |
|
| 5977 | return $IDs; |
|