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_after_save_nav_menu_item', $this );
81
	}
82
83
	/**
84
	 * Get environment array for page request (in admin)

core/Container/Term_Meta_Container.php 1 location

@@ 85-94 (lines=10) @@
82
	 *
83
	 * @param int $term_id ID of the term against which save() is ran
84
	 **/
85
	public function save( $term_id = null ) {
86
		$this->set_term_id( $term_id );
87
88
		foreach ( $this->fields as $field ) {
89
			$field->set_value_from_input( stripslashes_deep( $_POST ) );
90
			$field->save();
91
		}
92
93
		do_action( 'carbon_after_save_term_meta', $term_id );
94
	}
95
96
	/**
97
	 * Get environment array for page request (in admin)