Code Duplication    Length = 8-8 lines in 2 locations

core/Container/Term_Meta_Container.php 2 locations

@@ 38-45 (lines=8) @@
35
	/**
36
	 * Hook to relevant taxonomies
37
	 */
38
	public function hook_to_taxonomies() {
39
		$taxonomies = $this->get_taxonomy_visibility();
40
41
		foreach ( $taxonomies as $taxonomy ) {
42
			add_action( 'edited_' . $taxonomy, array( $this, '_save' ), 10, 2 );
43
			add_action( 'created_' . $taxonomy, array( $this, '_save' ), 10, 2 );
44
		}
45
	}
46
47
	/**
48
	 * Checks whether the current save request is valid
@@ 148-155 (lines=8) @@
145
	/**
146
	 * Add term meta for each of the container taxonomies
147
	 */
148
	public function attach() {
149
		$taxonomies = $this->get_taxonomy_visibility();
150
151
		foreach ( $taxonomies as $taxonomy ) {
152
			add_action( $taxonomy . '_edit_form_fields', array( $this, 'render' ), 10, 2 );
153
			add_action( $taxonomy . '_add_form_fields', array( $this, 'render' ), 10, 2 );
154
		}
155
	}
156
157
	/**
158
	 * Output the container markup