AM2 Image

This is documentation for Front End image functionality. Displays CSS class or complete block containing HTML image tags.

Usage

Parameters

dummy_width

(number) (required) Dummy image width in pixels.

dummy_height

(number) (required) Dummy image height in pixels.

image_id

(number) (required) Real image ID.

image_size

(string) (optional) Real image WordPress size.
    Default: medium

return

(string) (optional) Whether to return CSS class or HTML image tags.
    Default: class

  • class – CSS class “wider” or “taller”
  • html – HTML image tags for dummy image and real image

How to

  1. Put PHP function am2_image(); in functions.php file
  2. Put CSS code in your theme stylesheet style.css
  3. Put dummy-300×200.png image in your theme folder named images

PHP

CSS

Image

https://drive.google.com/open?id=0BxXwIKGva886Umcxd0p2MFl1aDA&authuser=0

Examples

HTML

Returns

 

 

CSS class

Returns

 

3 thoughts on “AM2 Image”

Leave a Reply