| @@ -35,18 +35,8 @@ | ||
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | do_action( 'yaymail_register_elements', $this ); |
| 39 | - | |
| 40 | - $emails = yaymail_get_emails(); | |
| 41 | - | |
| 42 | - foreach ( $this->elements as $element ) { | |
| 43 | - foreach ( $emails as $email ) { | |
| 44 | - if ( $element->is_available_in_email( $email ) ) { | |
| 45 | - $email->register_element( $element ); | |
| 46 | - } | |
| 47 | - } | |
| 48 | - } | |
| 49 | 39 | } |
| 50 | 40 | |
| 51 | 41 | public function register_element( $element ) { |
| 52 | 42 | if ( ! ( $element instanceof BaseElement ) ) { |