Code Duplication    Length = 8-10 lines in 2 locations

core/Container/Nav_Menu_Item_Container.php 1 location

@@ 74-81 (lines=8) @@
71
	 * Perform save operation after successful is_valid_save() check.
72
	 * The call is propagated to all fields in the container.
73
	 */
74
	public function save( $data = null ) {
75
		foreach ( $this->fields as $field ) {
76
			$field->set_value_from_input( stripslashes_deep( $_POST ) );
77
			$field->save();
78
		}
79
80
		do_action( 'carbon_fields_nav_menu_item_container_saved', $this );
81
	}
82
83
	/**
84
	 * Get environment array for page request (in admin)

core/Container/Term_Meta_Container.php 1 location

@@ 67-76 (lines=10) @@
64
	 *
65
	 * @param int $term_id ID of the term against which save() is ran
66
	 */
67
	public function save( $term_id = null ) {
68
		$this->set_term_id( $term_id );
69
70
		foreach ( $this->fields as $field ) {
71
			$field->set_value_from_input( stripslashes_deep( $_POST ) );
72
			$field->save();
73
		}
74
75
		do_action( 'carbon_fields_term_meta_container_saved', $term_id, $this );
76
	}
77
78
	/**
79
	 * Get environment array for page request (in admin)