PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
← All changes | js/queue.js +22 -0 3.2.20 → 4.7.0 View file →
@@ -137,6 +137,28 @@
137 137 queue[offset] = item;
138 138 return true;
139 139 }
140 140
141 + /**
142 + * Checks if any queue object/element contains the ID
143 + *
144 + * @param {string} id The ID to search for.
145 + *
146 + * @return {boolean} Whether any queue object/element contains the ID.
147 + */
148 + this.contains_id = function (id) {
149 + return queue.slice(offset).some(function (ele) {
150 + return ele && typeof ele === 'object' && ele.optimization_id === id;
151 + });
152 + }
153 +
154 + /**
155 + * Returns a copy of all items currently in the queue.
156 + *
157 + * @returns {Array} - An array of all current items in the queue.
158 + */
159 + this.get_all_items = function () {
160 + return queue.slice(offset);
161 + }
162 +
141 163 }
142 164