WP Smart Image – Parameters

14 de Julio de 2009 — Darío Ferrer

Below a list of WP Smart Image’s parameters you can be used and combine to suit your project:

Image parameters
Parameter Value Behavior
 
$size
  • 'mini'
  • 'med'
  • 'big'
  • 'full'

Affects the size of the image:

  • 'mini': Thumbnail size.
  • 'med': Medium size.
  • 'big': Large size.
  • 'full': Full size.

Example:

 
$type
  • 'link'
  • 'single'
  • 'url'
  • 'direct'

Affects the presentation of the image:

  • 'link': Image linked to post.
  • 'single': Image without link.
  • 'url': Only image URL.
  • 'direct': Image linked to its full version.

Example:

 
$wh
  • 'css'
  • 'html'

Adds width and height attributes to the image. Supposing the image has 100px X 100px:

  • 'css': style="width: 100px; height: 100px;"
  • 'html': width="100" height="100"

Example:

 
$class Any value Adds to the image the attribute "class"

Example:

 
$cid Any value Adds to the image the attribute "ID"

Example:

Link parameters
Parameter Value Behavior
 
$aclass Any value Adds to the link the attribute "class"

Example:

 
$aid Any value Adds to the link the attribute "ID"

Example:

 
$rel Any value Adds to the link the attribute "rel" al enlace

Example:

 
$target
  • 'blank'
  • 'parent'
  • 'self'
  • 'top'
  • 'js'
  • Frame name. Replaced by parameter $targetname (see below).

Adds to the link the attribute "target":

  • 'self': The linked url will be opened in same window (Default value).
  • 'blank': The linked url will be opened on a new window.
  • 'parent': The linked url will be opened on parent frame.
  • 'top': The linked url will be opened using full window size.
  • 'js': The linked url will be opened in a new window through javascript. Very useful for DTD Strict websites.

Example:

 
$targetname
  • 'Frame name'

Adds to the link the attribute "target" with custom frame name. It overrides "$target" parameter if both "$target" and "$targetname" are present:

  • Frame name: The linked url will be opened in the frame named as you have been set here.

Example:

 
Function parameters
Parameter Value Behavior
 
$mode
  • 'return'

If set, prepares the function to be passed through PHP parameters.

Example:

  • Bitacoras.com
  • Meneame
  • Twitter
  • del.icio.us
  • Facebook
  • Digg
  • Technorati
  • BarraPunto

Secciones

Anteriores

comentarios recientes

@Andrés en Dictador Micheletti: Haré lo que sea para convencer a Obama: Darío…! y yo queme mataba de la risa viendo cómo los Testigos de...

@Daniel en Dos tips sobre Adobe Reader: Detener AcroRd32Info.exe e impedir actualizaciones automáticas: muchas gracias man!!! genial la info que...

@Sebastian en ¿Joomla Vs. Wordpress? (1ª parte): Hola, excelente artículo, actualmente me encuentro definiendo que CMS usar y ando evaluando entre...

@Alyen en The Post Thumbnail Vs. WP Smart Image II: Gracias Darío, espero tu respuesta. Otra cosa tengo la traduccion desde hace tiempo, te aviso...

@Andrés en Cómo extraer miniaturas de imágenes en Wordpress (2da revisión – Código mejorado): Hola Darío: Ya solucioné mi problema. -...

@Andrés en Cómo extraer miniaturas de imágenes en Wordpress (2da revisión – Código mejorado): Hola a todos: He seguido todos los pasos...

@uri en 240 plugins JQuery: buenas Darío, buena recopilación… estoy buscando un plugin para wordpress que al pinchar a una imagen me la...

@ramon en ¿Joomla Vs. Wordpress? (1ª parte): felicidades por el articulo y por esa capacidad de analisis. Voy a contar mi experiencia y voy a...

Darío Ferrer — Blog personal

Sitio desarrollado con Wordpress, software libre para un mundo libre.

66 consultas a la BD en 0,620 segundos. Blog alojado en DreamHost