该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

Get Image from Post

描述

** this plugin is no longer being update. Please feel free to adopt me! **

This is a simple plugin which allows users to return an image from the related post.

安装

To install the plugin, please upload the folder to your plugins folder and active the plugin.

常见问题

Installation Instructions

To install the plugin, please upload the folder to your plugins folder and active the plugin.

How do I display the results?

Insert the following code into your WordPress theme files:

General results

Without passing any parameters, the plugin will return ten results or fewer depending on how many posts you have.

horshipsrectors_get_image_from_post();

Altering the before and after values

By default the plugin wraps your code in list item (<li>) tags but you can specify how to format the results using the following code:

horshipsrectors_get_image_from_post(‘before=<p>&after=</p>’);

Adding a Link

If you’d like to link to the post (remember it’s not live yet) you can do so by calling:

horshipsrectors_get_image_from_post(‘link=true’);

Which image?

You can specify which image is returned using the code:

horshipsrectors_get_image_from_post(‘image=2’);

Strip Attributes

If you would like to strip the attributes such as width and height from the returned value:

horshipsrectors_get_image_from_post(‘strip=true’);

Echo vs. Return

Finally, if you’d like to copy the results into a variable you can return the results as follows:

horshipsrectors_get_image_from_post(‘show=false’);

评价

此插件暂无评价。

贡献者及开发者

“Get Image from Post” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

将“Get Image from Post”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

2.0.0

  • renamed function to be more compatible.
  • tested and optimized in WordPress 3.2
  • added test to determine in images existed

1.0.0

  • official release
  • added strip attribute

1.1.0

  • minor fixes for wordpress new admin