๐Ÿš€ Hostinger Optimized
๐Ÿ–ฅ๏ธ Server: Apache
๐Ÿ’ป System: Linux webm015.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
๐Ÿ‘ค User: stakrfrcol (69043)
๐Ÿ˜ PHP: 8.3.31
๐Ÿšซ Disabled: _dyuweyrj4,_dyuweyrj4r,dl

๐Ÿ’ป Terminal

๐Ÿ“ /home/stakrfrcol/agency
$

๐Ÿ“„ NGG.php

๐Ÿ“ Path: ./wp-content/plugins/imagify/inc/3rd-party/nextgen-gallery/classes/Optimization/Process/NGG.php
๐Ÿ“Š Size: 2.84 KB
๐Ÿ”’ Perm: 0644
๐Ÿ“ MIME: text/x-php
<?php
namespace Imagify\ThirdParty\NGG\Optimization\Process;

use Imagify\Optimization\File;

defined( 'ABSPATH' ) || die( 'Cheatinโ€™ uh?' );

/**
 * Optimization class for NextGen Gallery.
 * This class constructor accepts:
 * - A NGG image ID (int).
 * - A \nggImage object.
 * - A \nggdb object.
 * - An anonym object containing a pid property (and everything else).
 * - A \Imagify\Media\MediaInterface object.
 *
 * @since  1.9
 * @see    Imagify\ThirdParty\NGG\Media\NGG
 * @author Grรฉgory Viguier
 */
class NGG extends \Imagify\Optimization\Process\AbstractProcess {

	/** ----------------------------------------------------------------------------------------- */
	/** MISSING THUMBNAILS ====================================================================== */
	/** ----------------------------------------------------------------------------------------- */

	/**
	 * Get the sizes for this media that have not get through optimization.
	 * Since this context doesn't handle this feature, this will always return an empty array, unless an error is triggered.
	 *
	 * @since  1.9
	 * @access public
	 * @author Grรฉgory Viguier
	 *
	 * @return array|WP_Error A WP_Error object on failure. An empty array on success: this context has no thumbnails.
	 *                        The tests are kept for consistency.
	 */
	public function get_missing_sizes() {
		// The media must have been optimized once and have a backup.
		if ( ! $this->is_valid() ) {
			return new \WP_Error( 'invalid_media', __( 'This media is not valid.', 'imagify' ) );
		}

		$media = $this->get_media();

		if ( ! $media->is_supported() ) {
			return new \WP_Error( 'media_not_supported', __( 'This media is not supported.', 'imagify' ) );
		}

		$data = $this->get_data();

		if ( ! $data->is_optimized() ) {
			return new \WP_Error( 'media_not_optimized', __( 'This media is not optimized yet.', 'imagify' ) );
		}

		if ( ! $media->has_backup() ) {
			return new \WP_Error( 'no_backup', __( 'This file has no backup file.', 'imagify' ) );
		}

		if ( ! $media->is_image() ) {
			return new \WP_Error( 'media_not_an_image', __( 'This media is not an image.', 'imagify' ) );
		}

		return [];
	}

	/**
	 * Optimize missing thumbnail sizes.
	 * Since this context doesn't handle this feature, this will always return a \WP_Error object.
	 *
	 * @since  1.9
	 * @access public
	 * @author Grรฉgory Viguier
	 *
	 * @return bool|WP_Error True if successfully launched. A \WP_Error instance on failure.
	 */
	public function optimize_missing_thumbnails() {
		if ( ! $this->is_valid() ) {
			return new \WP_Error( 'invalid_media', __( 'This media is not valid.', 'imagify' ) );
		}

		if ( ! $this->get_media()->is_supported() ) {
			return new \WP_Error( 'media_not_supported', __( 'This media is not supported.', 'imagify' ) );
		}

		return new \WP_Error( 'no_sizes', __( 'No thumbnails seem to be missing.', 'imagify' ) );
	}
}
โ† Back๐Ÿ“ฅ Rawโœ๏ธ Edit๐Ÿ”’ Chmod
โœจ File Manager Magic โœจ