digitalkOmiX Plugin Page#2

Click here to read the first part of this article.

Self-closing Shortcode

Self-closing shortcode is hard to use because you have to manually insert image data, at least it’s URL, but if you don’t  state image size default values will be set, and probably the image will be distorted. As follows is a correct insertion of image:

[digkom rows='3' cols='3' image_url='http://andywar.net/wp-content/uploads/2014/10/TreOrsi.jpg' width='423' height='600' text_1='HEI! SOMEBODY TOUCHED MY DATABASE!<span 1,2>']

HEI! SOMEBODY TOUCHED MY DATABASE!

All other attributes and arguments (“<span>” or “<grid>”) work as in the enclosing shortcode, so it’s up to you to choose the hard or the easy way.

Further development

Shortcode is fun, but it’s not enough. I’ll try to craft a metabox that will handle all the variables in a more interactive way.

Installation

Download zip file, unzip and upload to yoursite.com/wp-content/plugins, activate it in the Plugins Administration page, that’s it.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *