Code Duplication    Length = 5-5 lines in 2 locations

core/Container/Post_Meta_Container.php 1 location

@@ 115-119 (lines=5) @@
112
	public function is_valid_save( $post_id = 0 ) {
113
		if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
114
			return false;
115
		} else if ( ! isset( $_REQUEST[ $this->get_nonce_name() ] ) || ! wp_verify_nonce( $_REQUEST[ $this->get_nonce_name() ], $this->get_nonce_name() ) ) { // Input var okay.
116
			return false;
117
		} else if ( $post_id < 1 ) {
118
			return false;
119
		}
120
121
		return $this->is_valid_save_conditions( $post_id );
122
	}

core/Container/Term_Meta_Container.php 1 location

@@ 58-62 (lines=5) @@
55
	 * @return bool
56
	 **/
57
	public function is_valid_save( $term_id = null ) {
58
		if ( ! isset( $_REQUEST[ $this->get_nonce_name() ] ) || ! wp_verify_nonce( $_REQUEST[ $this->get_nonce_name() ], $this->get_nonce_name() ) ) { // Input var okay.
59
			return false;
60
		} else if ( $term_id < 1 ) {
61
			return false;
62
		}
63
64
		return true;
65
	}