Plugin yìí kò tíì ṣe àyẹ̀wò pẹ̀lú àwọn ìtújáde mẹ́ta pàtàkì tó kẹ́yìn ti WordPress. Ó lè jẹ́ pé a kò tọ́jú tàbí ṣe àtìlẹ́yìn fún un mọ́, ó sì lè ní àwọn ọ̀ràn ìbámu nígbà tí a bá lò ó pẹ̀lú àwọn ẹ̀yà WordPress tuntun.

Image Placeholder

Àpèjúwe

Using the Shortcode

Using the short code [image-placeholder] without any of the optional attributes will generate a 300px wide by 200px high image using HolderÌtumọ̀ Yorùbá: ’s ‘social’ theme which defaults to a solid blue background with white text showing the size of the image (‘300×200’).

Set the width and height

You can set the width and height (in pixels) of your placeholder image:

[image-placeholder width="500" height="100"]

Change the colors

You can change the background and text colors:

[image-placeholder colors="#000:#fff"]

This will create an image with a black background and white text.

Change the text

By default holder.js uses the size of the image for the text. You can change this:

[image-placeholder text="Foo bar"]

Remove the height and width styles

By default, holder.js will add inline styles to specify the height and width of the image. You can remove these:

[image-placeholder auto="true"]

Only return the URL

If you want to use the placeholder in your own <img> tag or as a background style, for example:

[image-placeholder url="true"]

Add a class

If you want to add a class to the <img> tag that it generated:

[image-placeholder class="my-class"]

Change the theme

Holder currently provides three built-in themes: gray, industrial, and social. You can use these in the short code like this:

[image-placeholder theme="industrial"]

You can also create your own theme. Each theme defines the foreground color, the background color, the font size and the font family. The easiest approach is to simply include a script tag:

<script>Holder.add_theme("my-theme", { background: "#000", foreground: "#fff", size: 14 })</script>

There are a lot of other options for customizing themes.

Credits

This plugin is merely a WordPress shortcode wrapper for the holder.js library built by Ivan Malopinsky.

Ìgbéwọlẹ̀

  1. Create a directory called image-placeholder in the /wp-content/plugins/ directory.
  2. Upload image-placeholder.php to the /wp-content/plugins/image-pladeholder directory.
  3. Upload holder.js to the /wp-content/plugins/image-pladeholder\js subdirectory.
  4. Activate the plugin through the ‘Plugins’ menu in WordPress.
  5. Use the [image-placeholder] shortcode in your pages or posts.

FAQ

What is this plugin good for?

I use it when IÌtumọ̀ Yorùbá: ’m developing a new site or page that I donÌtumọ̀ Yorùbá: ’t yet have actual images for.

Can you add a feature?

Maybe. Create a new issue on Github and IÌtumọ̀ Yorùbá: ’ll take a look at it.

You can also feel free to download the code and modify it yourself.

Àwọn àgbéyẹ̀wò

Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.

Àwọn Olùkópa & Olùgbéejáde

“Image Placeholder” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí plugin yìí.

Àwọn Olùkópa

Túmọ̀ “Image Placeholder” sí èdè rẹ.

Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

Ṣàwárí koodu, ṣàyẹ̀wò ibi ìpamọ́ SVN, tàbí ṣe àgbékalẹ̀ sí àkọsílẹ̀ ìdàgbàsókè nípasẹ̀ RSS.