public/wordpress/wp-content/plugins/wp-courseware/includes/common/settings-api.php
/**
	 * Validate Payment Gateways Order Field.
	 *
	 * @since 4.3.0
	 *
	 * @param string      $key The field key.
	 * @param string|null $value The field value.
	 *
	 * @return string The properly sanitized and escaped value.
	 */
Validate Payment Gateways Order Field.

@param string      $key The field key.
@param string|null $value The field value.

@return string The properly sanitized and escaped value.
Validate Payment Gateways Order Field . @param string $key The field key . @param string|null $value The field value . @return string The properly sanitized and escaped value .
public function validate_payment_gateways_order_field( $key, $value ) {
		$order = array();
		$post_data = $this->get_post_data();
		if ( empty( $post_data ) || empty( $post_data['payment_gateways_order'] ) ) {
			return $this->get_setting( $key, array() );
		}
		if ( is_array( $value ) && sizeof( $value ) > 0 ) {
			$loop = 0;
			foreach ( $value as $gateway_id ) {
				$order[ esc_attr( $gateway_id ) ] = $loop;
				$loop ++;
			}
		}
		return ! empty( $order ) ? $order : $value;
	}
public function validate_payment_gateways_order_field ( $ key , $ value ) { $ order = array ( ) ; $ post_data = $ this -> get_post_data ( ) ; if ( empty ( $ post_data ) || empty ( $ post_data [ 'payment_gateways_order' ] ) ) { return $ this -> get_setting ( $ key , array ( ) ) ; } if ( is_array ( $ value ) && sizeof ( $ value ) > 0 ) { $ loop = 0 ; foreach ( $ value as $ gateway_id ) { $ order [ esc_attr ( $ gateway_id ) ] = $ loop ; $ loop ++ ; } } return ! empty ( $ order ) ? $ order : $ value ; }
Validate Payment Gateways Order Field.
Validate Payment Gateways Order Field .