GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
Generic class for generating image tag. More...
Public Member Functions | |
__construct ( $atts=array()) | |
__toString () | |
Handle being treated as a string by returning the HTML. More... | |
html () | |
Return the HTML tag for the image. More... | |
set_image_size ( $string=NULL, $width=NULL, $height=NULL) | |
Get default widths and heights for image size. More... | |
validate_image_src () | |
Verify that the src URL matches image patterns. More... | |
Static Public Member Functions | |
static | get_image_extensions () |
Returns an array of file extensions recognized by GravityView as images. More... | |
Data Fields | |
$alt | |
$class = NULL | |
$getimagesize = false | |
$height | |
$size = NULL | |
$src | |
$style = NULL | |
$title | |
$validate_src = true | |
$width | |
Generic class for generating image tag.
Definition at line 5 of file class-gravityview-image.php.
__construct | ( | $atts = array() | ) |
Definition at line 52 of file class-gravityview-image.php.
References set_image_size().
__toString | ( | ) |
Handle being treated as a string by returning the HTML.
Definition at line 47 of file class-gravityview-image.php.
References html().
|
static |
Returns an array of file extensions recognized by GravityView as images.
gravityview_image_extensions
Extensions that GravityView recognizes as valid images to be shown in an img
tag array | $image_exts | Default: `['jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico', 'webp']` |
Definition at line 104 of file class-gravityview-image.php.
Referenced by GravityView_Plugin_Hooks_Gravity_Forms_Dropbox\filter_file_extension(), GravityView_Field_FileUpload\get_files_array(), and GravityView_Welcome\getting_started_screen().
html | ( | ) |
Return the HTML tag for the image.
gravityview_image_html
Filter the HTML image output string | $html | the generated image html |
GravityView_Image | $this | The current image object |
Definition at line 191 of file class-gravityview-image.php.
References validate_image_src().
Referenced by __toString().
set_image_size | ( | $string = NULL , |
|
$width = NULL , |
|||
$height = NULL |
|||
) |
Get default widths and heights for image size.
gravityview_image_sizes
Modify the image size presets used by GravityView_Image class array | $image_sizes | Array of image sizes with the key being the size slug, and the value being an array with width and height defined, in pixels |
Definition at line 120 of file class-gravityview-image.php.
References $height, and $width.
Referenced by __construct().
validate_image_src | ( | ) |
Verify that the src URL matches image patterns.
Yes, images can not have extensions, but this is a basic check. To disable this, set validate_src
to false when instantiating the object.
Definition at line 86 of file class-gravityview-image.php.
Referenced by html().
$alt |
Definition at line 7 of file class-gravityview-image.php.
$class = NULL |
Definition at line 17 of file class-gravityview-image.php.
$getimagesize = false |
Definition at line 35 of file class-gravityview-image.php.
$height |
Definition at line 11 of file class-gravityview-image.php.
Referenced by set_image_size().
$size = NULL |
Definition at line 29 of file class-gravityview-image.php.
$src |
Definition at line 8 of file class-gravityview-image.php.
$style = NULL |
Definition at line 23 of file class-gravityview-image.php.
$title |
Definition at line 9 of file class-gravityview-image.php.
$validate_src = true |
Definition at line 41 of file class-gravityview-image.php.
$width |
Definition at line 10 of file class-gravityview-image.php.
Referenced by set_image_size().