| @@ 79-89 (lines=11) @@ | ||
| 76 | /** |
|
| 77 | * Revert the result of attach() |
|
| 78 | **/ |
|
| 79 | public function detach() { |
|
| 80 | parent::detach(); |
|
| 81 | ||
| 82 | remove_action( 'admin_init', array( $this, '_attach' ) ); |
|
| 83 | remove_action( 'edit_comment', array( $this, '_save' ) ); |
|
| 84 | ||
| 85 | // unregister field names |
|
| 86 | foreach ( $this->fields as $field ) { |
|
| 87 | $this->drop_unique_field_name( $field->get_name() ); |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||
| 91 | /** |
|
| 92 | * Output the container markup |
|
| @@ 371-381 (lines=11) @@ | ||
| 368 | /** |
|
| 369 | * Revert the result of attach() |
|
| 370 | **/ |
|
| 371 | public function detach() { |
|
| 372 | parent::detach(); |
|
| 373 | ||
| 374 | remove_action( 'admin_init', array( $this, '_attach' ) ); |
|
| 375 | remove_action( 'save_post', array( $this, '_save' ) ); |
|
| 376 | ||
| 377 | // unregister field names |
|
| 378 | foreach ( $this->fields as $field ) { |
|
| 379 | $this->drop_unique_field_name( $field->get_name() ); |
|
| 380 | } |
|
| 381 | } |
|
| 382 | ||
| 383 | /** |
|
| 384 | * Output the container markup |
|