protected function pre_save( $id ) {
		if ( empty( $id ) ) {
			return;
		}

		$data = $this->get_pre_data();

		foreach ( $data as $key => $value ) {
			if ( empty( $value ) ) {
				continue;
			}

			if ( is_array( $value ) ) {
				list( $keys, $value ) = $this->get_pre_deep_keys_value( $value );
				$key = sprintf( '%s_%s', $key, implode( '_', $keys ) );
			}

			update_metadata( $this->get_meta_type(), $id, $key, $value );
		}
	}
protected function pre_save( $id ) {
		if ( empty( $id ) ) {
			return;
		}

		$data = $this->get_pre_data();

		foreach ( $data as $key => $value ) {
			if ( empty( $value ) ) {
				continue;
			}

			if ( is_array( $value ) ) {
				list( $keys, $value ) = $this->get_pre_deep_keys_value( $value );
				$key = sprintf( '%s_%s', $key, implode( '_', $keys ) );
			}

			update_metadata( $this->get_meta_type(), $id, $key, $value );
		}
	}
protected function pre_save ( $ id ) { if ( empty ( $ id ) ) { return ; } $ data = $ this -> get_pre_data ( ) ; foreach ( $ data as $ key => $ value ) { if ( empty ( $ value ) ) { continue ; } if ( is_array ( $ value ) ) { list ( $ keys , $ value ) = $ this -> get_pre_deep_keys_value ( $ value ) ; $ key = sprintf ( '%s_%s' , $ key , implode ( '_' , $ keys ) ) ; } update_metadata ( $ this -> get_meta_type ( ) , $ id , $ key , $ value ) ; } }
Pre save page template and page type.

@param int $id
Pre save page template and page type .