| @@ 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 |
|
| @@ 363-373 (lines=11) @@ | ||
| 360 | /** |
|
| 361 | * Revert the result of attach() |
|
| 362 | **/ |
|
| 363 | public function detach() { |
|
| 364 | parent::detach(); |
|
| 365 | ||
| 366 | remove_action( 'admin_init', array( $this, '_attach' ) ); |
|
| 367 | remove_action( 'save_post', array( $this, '_save' ) ); |
|
| 368 | ||
| 369 | // unregister field names |
|
| 370 | foreach ( $this->fields as $field ) { |
|
| 371 | $this->drop_unique_field_name( $field->get_name() ); |
|
| 372 | } |
|
| 373 | } |
|
| 374 | ||
| 375 | /** |
|
| 376 | * Output the container markup |
|