HEX
Server: Apache
System: Linux efa57bbe-abb1-400d-2985-3b056fbc2701.secureserver.net 6.1.147-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 24 12:33:32 EDT 2025 x86_64
User: root (0)
PHP: 8.0.30.4
Disabled: NONE
Upload Files
File: //var/www/wp-content/mu-plugins/vendor/wpex/stock-photos/assets/js/models/stock-photos.js
/* global require */
var StockPhotosQuery = require( './stock-photos-query' );

var StockPhotos = wp.media.model.Attachments.extend({

	initialize: function( models, options ) {

		wp.media.model.Attachments.prototype.initialize.call( this, models, options );

		this.StockPhotosProps = new Backbone.Model();

		this.StockPhotosProps.set( 'importing', false );
		this.StockPhotosProps.set( 'previewing', false );

	},

	_requery: function( refresh ) {

		var props;

		if ( this.props.get('query') ) {

			props = this.props.toJSON();

			props.cache = ( true !== refresh );

			this.mirror( StockPhotosQuery.get( props ) );

		}

	}

});

module.exports = StockPhotos;