GRAYBYTE WORDPRESS FILE MANAGER5602

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/chahida.co.in/wp-content/plugins/wp-optimize/includes/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/chahida.co.in/wp-content/plugins/wp-optimize/includes//class-wpo-image-utils.php
<?php

if (!defined('ABSPATH')) die('Access denied.');

if (!class_exists('WPO_Image_Utils')) :

class WPO_Image_Utils {

	/**
	 * Get image paths to resized attachment images.
	 *
	 * @param int $attachment_id
	 * @return array
	 */
	public static function get_attachment_files($attachment_id) {
		$attachment_images = array();
		$upload_dir = wp_get_upload_dir();

		// get sizes info from attachment meta data.
		$meta = wp_get_attachment_metadata($attachment_id);
		if (!is_array($meta) || !array_key_exists('sizes', $meta)) return $attachment_images;

		$image_sizes = array_keys($meta['sizes']);

		// build list of resized images.
		foreach ($image_sizes as $size) {
			$image = image_get_intermediate_size($attachment_id, $size);

			if (is_array($image)) {
				$file = trailingslashit($upload_dir['basedir']) . $image['path'];
				if (is_file($file) && !in_array($file, $attachment_images)) {
					$attachment_images[$size] = $file;
				}
			}
		}

		return $attachment_images;
	}

	/**
	 * Returns an array of allowed extensions
	 *
	 * @return array
	 */
	public static function get_allowed_extensions() {
		return array('gif', 'jpeg', 'jpg', 'png');
	}

	/**
	 * Returns given file extension
	 *
	 * @param string $file
	 *
	 * @return mixed
	 */
	public static function get_extension($file) {
		$file_type = wp_check_filetype($file);
		return $file_type['ext'];
	}

	/**
	 * Tests if given extension is present in allowed extensions array
	 *
	 * @param string $ext                Extension to check
	 * @param array $allowed_extensions Array of allowed extensions
	 *
	 * @return bool
	 */
	public static function is_supported_extension($ext, $allowed_extensions) {
		return in_array($ext, $allowed_extensions);
	}
}

endif;

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
blockui
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
list-tables
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
tables
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:24
giriqfky / giriqfky
0644
backward-compatibility-functions.php
3.233 KB
December 18 2020 22:52:22
giriqfky / giriqfky
0644
class-re-smush-it-task.php
5.475 KB
February 17 2025 16:50:28
giriqfky / giriqfky
0644
class-updraft-abstract-logger.php
3.428 KB
September 24 2019 18:25:36
giriqfky / giriqfky
0644
class-updraft-email-logger.php
4.11 KB
November 30 2021 19:57:30
giriqfky / giriqfky
0644
class-updraft-file-logger.php
4.26 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-updraft-log-levels.php
0.89 KB
February 20 2018 16:52:16
giriqfky / giriqfky
0644
class-updraft-logger-interface.php
2.784 KB
November 30 2021 19:57:30
giriqfky / giriqfky
0644
class-updraft-logger.php
4.844 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-updraft-php-logger.php
2.808 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-updraft-ring-logger.php
4.051 KB
February 10 2025 16:14:44
giriqfky / giriqfky
0644
class-updraft-smush-manager-commands.php
26.522 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-updraft-smush-manager.php
57.373 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-updraft-smush-task.php
13.243 KB
February 17 2025 16:50:28
giriqfky / giriqfky
0644
class-updraftcentral-wp-optimize-commands.php
1.165 KB
June 03 2022 22:20:18
giriqfky / giriqfky
0644
class-wp-optimization.php
12.773 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-wp-optimize-404-detector-cron.php
1.033 KB
December 09 2024 17:24:26
giriqfky / giriqfky
0644
class-wp-optimize-404-detector.php
10.995 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-wp-optimize-admin.php
31.859 KB
March 03 2025 22:03:20
giriqfky / giriqfky
0644
class-wp-optimize-browser-cache.php
9.208 KB
February 10 2025 16:14:44
giriqfky / giriqfky
0644
class-wp-optimize-commands.php
36.47 KB
February 17 2025 16:50:28
giriqfky / giriqfky
0644
class-wp-optimize-database-information.php
16.731 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-wp-optimize-delay-js.php
10.952 KB
March 06 2025 16:33:06
giriqfky / giriqfky
0644
class-wp-optimize-gzip-compression.php
10.777 KB
February 10 2025 16:14:44
giriqfky / giriqfky
0644
class-wp-optimize-heartbeat.php
3.949 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-wp-optimize-htaccess.php
8.801 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-wp-optimize-http-error-codes-trait.php
8.833 KB
March 03 2025 22:03:20
giriqfky / giriqfky
0644
class-wp-optimize-install-or-update-notice.php
3.266 KB
April 16 2024 00:42:52
giriqfky / giriqfky
0644
class-wp-optimize-notices.php
18.152 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-wp-optimize-options.php
16.045 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-wp-optimize-performance.php
3.472 KB
December 09 2024 17:24:26
giriqfky / giriqfky
0644
class-wp-optimize-preloader.php
18.108 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-wp-optimize-server-information.php
4.825 KB
February 17 2025 16:50:28
giriqfky / giriqfky
0644
class-wp-optimize-system-status-report.php
10.927 KB
February 10 2025 16:14:44
giriqfky / giriqfky
0644
class-wp-optimize-table-management.php
3.674 KB
February 10 2025 16:14:44
giriqfky / giriqfky
0644
class-wp-optimize-transients-cache.php
3.354 KB
January 30 2020 16:28:26
giriqfky / giriqfky
0644
class-wp-optimize-updates.php
11.009 KB
February 17 2025 16:50:28
giriqfky / giriqfky
0644
class-wp-optimize-utils.php
6.789 KB
February 17 2025 16:50:28
giriqfky / giriqfky
0644
class-wp-optimizer.php
20.442 KB
February 10 2025 16:14:44
giriqfky / giriqfky
0644
class-wpo-activation.php
2.684 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-wpo-ajax.php
12.127 KB
March 03 2025 22:03:20
giriqfky / giriqfky
0644
class-wpo-deactivation.php
0.521 KB
March 06 2024 21:29:48
giriqfky / giriqfky
0644
class-wpo-image-utils.php
1.698 KB
July 06 2023 16:18:20
giriqfky / giriqfky
0644
class-wpo-page-optimizer.php
1.59 KB
June 02 2025 17:15:44
giriqfky / giriqfky
0644
class-wpo-uninstall.php
2.592 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
updraftcentral.php
1.664 KB
December 18 2020 22:52:22
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF