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