src/core/class-papi-core-data-handler.php
protected function get_post_data( $pattern = '/^papi\_.*/' ) {
		$data = [];
		$keys = preg_grep( $pattern, array_keys( $_POST ) );

		foreach ( $keys as $key ) {
			// Remove page type keys with suffix. This should not be saved.
			if (
				strpos( $key, papi_get_page_type_key() ) === 0
				&&
				strlen( papi_get_page_type_key() ) !== strlen( $key )
			) {
				continue;
			}

			// Fix for input fields that should be true on `on` value.
			if ( $_POST[$key] === 'on' ) {
				$data[$key] = true;
			} else {
				$value = $this->decode_property( $key, $_POST[$key] );
				$data[$key] = $this->prepare_post_data( $value );
				$data[$key] = $this->santize_data( $data[$key] );
			}
		}

		// Don't wont to save meta nonce field.
		if ( isset( $data['papi_meta_nonce'] ) ) {
			unset( $data['papi_meta_nonce'] );
		}

		return $data;
	}
protected function get_post_data( $pattern = '/^papi\_.*/' ) {
		$data = [];
		$keys = preg_grep( $pattern, array_keys( $_POST ) );

		foreach ( $keys as $key ) {
			// Remove page type keys with suffix. This should not be saved.
			if (
				strpos( $key, papi_get_page_type_key() ) === 0
				&&
				strlen( papi_get_page_type_key() ) !== strlen( $key )
			) {
				continue;
			}

			// Fix for input fields that should be true on `on` value.
			if ( $_POST[$key] === 'on' ) {
				$data[$key] = true;
			} else {
				$value = $this->decode_property( $key, $_POST[$key] );
				$data[$key] = $this->prepare_post_data( $value );
				$data[$key] = $this->santize_data( $data[$key] );
			}
		}

		// Don't wont to save meta nonce field.
		if ( isset( $data['papi_meta_nonce'] ) ) {
			unset( $data['papi_meta_nonce'] );
		}

		return $data;
	}
Get post data.

@param  string $pattern

@return array