PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 2.2.6
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v2.2.6
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
← All changes | includes/API/Items.php +10 -2 2.2.52.2.6 View file →
@@ -377,19 +377,27 @@
377 377 }
378 378
379 379 /**
380 380 * Get Featured Item List
381 + * @param WP_REST_Request $request
381 382 * @return mixed
382 383 */
383 - public function featured_items(){
384 + public function featured_items(WP_REST_Request $request){
384 385 $defaults = Database::get_transient( 'featuredItems' );
385 386 if( $defaults ) {
386 387 return $defaults;
387 388 }
388 389
390 + $platform = $request->get_param( 'platform' );
391 + $funcArgs = [
392 + // 'page' => 1,
393 + // 'per_page' => 10,
394 + 'platform' => $platform,
395 + ];
389 396 $response = $this->http()->query(
390 397 'featuredItems',
391 - 'data{ id, name, slug, price, type, thumbnail }'
398 + 'data{ id, name, slug, price, type, thumbnail }',
399 + $funcArgs
392 400 )->post();
393 401
394 402 if( ! is_wp_error( $response ) ) {
395 403 Database::set_transient( 'featuredItems', $response );