| @@ 71-81 (lines=11) @@ | ||
| 68 | /** |
|
| 69 | * Revert the result of attach() |
|
| 70 | **/ |
|
| 71 | public function detach() { |
|
| 72 | parent::detach(); |
|
| 73 | ||
| 74 | remove_action( 'admin_init', array( $this, '_attach' ) ); |
|
| 75 | remove_action( 'edit_comment', array( $this, '_save' ) ); |
|
| 76 | ||
| 77 | // unregister field names |
|
| 78 | foreach ( $this->fields as $field ) { |
|
| 79 | $this->drop_unique_field_name( $field->get_name() ); |
|
| 80 | } |
|
| 81 | } |
|
| 82 | ||
| 83 | /** |
|
| 84 | * Output the container markup |
|
| @@ 366-376 (lines=11) @@ | ||
| 363 | /** |
|
| 364 | * Revert the result of attach() |
|
| 365 | **/ |
|
| 366 | public function detach() { |
|
| 367 | parent::detach(); |
|
| 368 | ||
| 369 | remove_action( 'admin_init', array( $this, '_attach' ) ); |
|
| 370 | remove_action( 'save_post', array( $this, '_save' ) ); |
|
| 371 | ||
| 372 | // unregister field names |
|
| 373 | foreach ( $this->fields as $field ) { |
|
| 374 | $this->drop_unique_field_name( $field->get_name() ); |
|
| 375 | } |
|
| 376 | } |
|
| 377 | ||
| 378 | /** |
|
| 379 | * Output the container markup |
|