| @@ 70-80 (lines=11) @@ | ||
| 67 | /** |
|
| 68 | * Revert the result of attach() |
|
| 69 | **/ |
|
| 70 | public function detach() { |
|
| 71 | parent::detach(); |
|
| 72 | ||
| 73 | remove_action( 'admin_init', array( $this, '_attach' ) ); |
|
| 74 | remove_action( 'edit_comment', array( $this, '_save' ) ); |
|
| 75 | ||
| 76 | // unregister field names |
|
| 77 | foreach ( $this->fields as $field ) { |
|
| 78 | $this->drop_unique_field_name( $field->get_name() ); |
|
| 79 | } |
|
| 80 | } |
|
| 81 | ||
| 82 | /** |
|
| 83 | * Output the container markup |
|
| @@ 377-387 (lines=11) @@ | ||
| 374 | /** |
|
| 375 | * Revert the result of attach() |
|
| 376 | **/ |
|
| 377 | public function detach() { |
|
| 378 | parent::detach(); |
|
| 379 | ||
| 380 | remove_action( 'admin_init', array( $this, '_attach' ) ); |
|
| 381 | remove_action( 'save_post', array( $this, '_save' ) ); |
|
| 382 | ||
| 383 | // unregister field names |
|
| 384 | foreach ( $this->fields as $field ) { |
|
| 385 | $this->drop_unique_field_name( $field->get_name() ); |
|
| 386 | } |
|
| 387 | } |
|
| 388 | ||
| 389 | /** |
|
| 390 | * Output the container markup |
|