PHP 8.2.31
Preview: Image.php Size: 903 B
/home/nshryvcy/blissfulnepal.com/wp-content/plugins/newsletter/classes/Newsletter/Composer/Image.php

<?php
namespace Newsletter\Composer;

defined('ABSPATH') || exit;

/**
 * Used only for IDE autocompletion!
 */
class Image {
    var $id;
    var $url;
    var $width;
    var $height;
    var $alt;
    var $link;
    var $align = 'center';

    /** Sets the width keeping the aspect ratio */
    public function set_width($width) {
        $width = (int) $width;
        if (empty($width)) {
            return;
        }
        if ($this->width < $width) {
            return;
        }
        $this->height = floor(($width / $this->width) * $this->height);
        $this->width = $width;
    }

    /** Sets the height  keeping the aspect ratio */
    public function set_height($height) {
        $height = (int) $height;
        if (empty($height)) {
            return;
        }
        $this->width = floor(($height / $this->height) * $this->width);
        $this->height = $height;
    }
}

Directory Contents

Dirs: 0 × Files: 6

Name Size Perms Modified Actions
479 B lrw-r--r-- 2026-06-03 14:57:28
Edit Download
370 B lrw-r--r-- 2026-06-03 14:57:28
Edit Download
332 B lrw-r--r-- 2026-06-03 14:57:28
Edit Download
903 B lrw-r--r-- 2026-06-03 14:57:28
Edit Download
698 B lrw-r--r-- 2026-06-03 14:57:28
Edit Download
281 B lrw-r--r-- 2026-06-03 14:57:28
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).