WC_Regenerate_Images_Request::__construct()publicWC 1.0

Initiate new background process.

Метод класса: WC_Regenerate_Images_Request{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WC_Regenerate_Images_Request = new WC_Regenerate_Images_Request();
$WC_Regenerate_Images_Request->__construct();

Код WC_Regenerate_Images_Request::__construct() WC 8.9.0

public function __construct() {
	// Uses unique prefix per blog so each blog has separate queue.
	$this->prefix = 'wp_' . get_current_blog_id();
	$this->action = 'wc_regenerate_images';

	// Limit Imagick to only use 1 thread to avoid memory issues with OpenMP.
	if ( extension_loaded( 'imagick' ) && method_exists( Imagick::class, 'setResourceLimit' ) ) {
		if ( defined( 'Imagick::RESOURCETYPE_THREAD' ) ) {
			Imagick::setResourceLimit( Imagick::RESOURCETYPE_THREAD, 1 );
		} else {
			Imagick::setResourceLimit( 6, 1 );
		}
	}

	parent::__construct();
}