classes/fields/oembed.php
public function admin_ajax_oembed_update_preview() {

		// Sanitize input.
		// @codingStandardsIgnoreLine
		$params = pods_unslash( (array) $_POST );

		if ( ! empty( $params['_nonce_pods_oembed'] ) && ! empty( $params['pods_field_oembed_value'] ) && wp_verify_nonce( $params['_nonce_pods_oembed'], 'pods_field_oembed_preview' ) ) {
			$value = $this->strip_html( $params['pods_field_oembed_value'] );

			$name    = '';
			$options = array();

			if ( ! empty( $params['pods_field_oembed_name'] ) ) {
				$name = $this->strip_html( $params['pods_field_oembed_name'] );
			}

			if ( ! empty( $params['pods_field_oembed_options'] ) ) {
				$options = $params['pods_field_oembed_options'];
			}

			// Load the field to get it's options.
			$options = pods_api()->load_field( (object) $options );

			// Field options are stored here, if not, just stay with the full options array.
			if ( ! empty( $options['options'] ) ) {
				$options = $options['options'];
			}

			// Run display function to run oEmbed.
			$value = $this->display( $value, $name, $options );

			if ( empty( $value ) ) {
				$value = __( 'Please choose a valid oEmbed URL.', 'pods' );
				wp_send_json_error( $value );
			} else {
				wp_send_json_success( $value );
			}
		}//end if
		wp_send_json_error( __( 'Unauthorized request', 'pods' ) );

		die();
		// Kill it!
	}
public function admin_ajax_oembed_update_preview() {

		// Sanitize input.
		// @codingStandardsIgnoreLine
		$params = pods_unslash( (array) $_POST );

		if ( ! empty( $params['_nonce_pods_oembed'] ) && ! empty( $params['pods_field_oembed_value'] ) && wp_verify_nonce( $params['_nonce_pods_oembed'], 'pods_field_oembed_preview' ) ) {
			$value = $this->strip_html( $params['pods_field_oembed_value'] );

			$name    = '';
			$options = array();

			if ( ! empty( $params['pods_field_oembed_name'] ) ) {
				$name = $this->strip_html( $params['pods_field_oembed_name'] );
			}

			if ( ! empty( $params['pods_field_oembed_options'] ) ) {
				$options = $params['pods_field_oembed_options'];
			}

			// Load the field to get it's options.
			$options = pods_api()->load_field( (object) $options );

			// Field options are stored here, if not, just stay with the full options array.
			if ( ! empty( $options['options'] ) ) {
				$options = $options['options'];
			}

			// Run display function to run oEmbed.
			$value = $this->display( $value, $name, $options );

			if ( empty( $value ) ) {
				$value = __( 'Please choose a valid oEmbed URL.', 'pods' );
				wp_send_json_error( $value );
			} else {
				wp_send_json_success( $value );
			}
		}//end if
		wp_send_json_error( __( 'Unauthorized request', 'pods' ) );

		die();
		// Kill it!
	}
public function admin_ajax_oembed_update_preview ( ) { // Sanitize input. // @codingStandardsIgnoreLine $ params = pods_unslash ( ( array ) $ _POST ) ; if ( ! empty ( $ params [ '_nonce_pods_oembed' ] ) && ! empty ( $ params [ 'pods_field_oembed_value' ] ) && wp_verify_nonce ( $ params [ '_nonce_pods_oembed' ] , 'pods_field_oembed_preview' ) ) { $ value = $ this -> strip_html ( $ params [ 'pods_field_oembed_value' ] ) ; $ name = '' ; $ options = array ( ) ; if ( ! empty ( $ params [ 'pods_field_oembed_name' ] ) ) { $ name = $ this -> strip_html ( $ params [ 'pods_field_oembed_name' ] ) ; } if ( ! empty ( $ params [ 'pods_field_oembed_options' ] ) ) { $ options = $ params [ 'pods_field_oembed_options' ] ; } // Load the field to get it's options. $ options = pods_api ( ) -> load_field ( ( object ) $ options ) ; // Field options are stored here, if not, just stay with the full options array. if ( ! empty ( $ options [ 'options' ] ) ) { $ options = $ options [ 'options' ] ; } // Run display function to run oEmbed. $ value = $ this -> display ( $ value , $ name , $ options ) ; if ( empty ( $ value ) ) { $ value = __ ( 'Please choose a valid oEmbed URL.' , 'pods' ) ; wp_send_json_error ( $ value ) ; } else { wp_send_json_success ( $ value ) ; } } //end if wp_send_json_error ( __ ( 'Unauthorized request' , 'pods' ) ) ; die ( ) ; // Kill it! }
Handle update preview AJAX.

@since 2.7.0
Handle update preview AJAX .