PHP Class BFI_Thumb_1_3, elementor

Exibir arquivo Open project: pojome/elementor

Public Methods

Method Description
thumb ( $url, $params = [], $single = true ) : string | array Uses WP's Image Editor Class to resize and filter images Inspired by: https://github.com/sy4mil/Aqua-Resizer/blob/master/aq_resizer.php

Protected Methods

Method Description
base_convert_arbitrary ( $number, $fromBase, $toBase ) : string Shortens a number into a base 36 string

Method Details

base_convert_arbitrary() protected static method

Shortens a number into a base 36 string
protected static base_convert_arbitrary ( $number, $fromBase, $toBase ) : string
$number string a string of numbers to convert
$fromBase starting base
$toBase base to convert the number to
return string base converted characters

thumb() public static method

Uses WP's Image Editor Class to resize and filter images Inspired by: https://github.com/sy4mil/Aqua-Resizer/blob/master/aq_resizer.php
public static thumb ( $url, $params = [], $single = true ) : string | array
$url string the local image URL to manipulate
$params array the options to perform on the image. Keys and values supported: 'width' int pixels 'height' int pixels 'opacity' int 0-100 'color' string hex-color #000000-#ffffff 'grayscale' bool 'crop' bool 'negate' bool 'crop_only' bool 'crop_x' bool string 'crop_y' bool string 'crop_width' bool string 'crop_height' bool string 'quality' int 1-100
$single boolean, if false then an array of data will be returned
return string | array