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