Code Duplication    Length = 11-11 lines in 2 locations

core/Container/Post_Meta_Container.php 1 location

@@ 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

core/Container/Comment_Meta_Container.php 1 location

@@ 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