[wordpress插件] Article Photos文章照片

wordpress 插件 文章 2020-02-21 12:10 571 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

This plugin adds a form to your post screen that allows you to upload an image to go with your blog post.

此插件在您的帖子屏幕上添加了一个表格,该表格允许您上传图片以及博客帖子。

You can then use the_article_image() function in your theme to show the image whereever you want on your theme, at whatever size (dynamically rescaled and cached using ImageMagick so no dodgy browser rescaling or sending huge photos out)

然后,您可以在主题中使用 the_article_image()函数,以任意大小显示主题上任意位置的图像(使用ImageMagick动态缩放和缓存,因此无需笨拙的浏览器重新缩放或发送大照片)

.

An example of it in use is on http://www.nouse.co.uk/, where the photo alongside each post is attached, and then shown on the front page, and on the single page itself in the theme

http://www.nouse.co.uk/上有一个使用的示例,其中附加了每个帖子旁边的照片,然后显示在首页上,以及主题本身的单页上

.

安装步骤

Make sure you’re using PHP 5 and the ImageMagick extension installed.

确保您使用的是PHP 5和ImageMagick扩展程序。

Once the plugin is active, you use the_article_image($size); function, which echoes an img tag for the image and caption associated with that article, at the

插件处于活动状态后,您可以使用 the_article_image($ size); 函数,该函数会在 img 标签上为与该文章相关的图像和标题提供回显。

width defined by the $size parameter.

$ size 参数定义的宽度。

If there is no image, nothing is returned.

如果没有图像,则不会返回任何内容。

Other functions include a get_the_article_img($size) variant, which returns, rather than echoes the img tag.

其他功能包括 get_the_article_img($ size)变体,该变体返回而不是回显 img 标记。

Also, the_article_photo_caption() and get_the_article_photo_caption() which get the caption associated with that article.

另外, the_article_photo_caption() get_the_article_photo_caption()会获得与该文章关联的标题。

get_the_article_photo($size) works like get_the_article_img($size) but just returns a URL, rather than an img tag, and the_article_photo

get_the_article_photo($ size)的工作方式类似于 get_the_article_img($ size),但仅返回URL,而不是 img 标记和 the_article_photo

($size) returns the URL to the image, or if no image exists, to a placeholder image in the template directory called img/box.png.

($ size)将URL返回到图像,如果没有图像,则返回到模板目录中名为 img / box.png 的占位符图像。

下载地址
https://downloads.wordpress.org/plugin/article-photo.1.0.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] This is a simple wordpress plugin I wrote for wordpress,这是我为wordpress编写的一个简单的wordpress插件,
[wordpress插件] Boleto Pag Seguro DiretoBoleto Pag Seguro Direto
[wordpress插件] Custom Admin Menu自定义管理菜单
[wordpress插件] Auto Scrolling Testimonials自动滚动推荐
[wordpress插件] Admin Bar Login管理员栏登录
随便看看
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8237
问题? 7459
如何快速搭建抽奖助手小程序(无需代码知识) 5136
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6093
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5703
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5286
如何解决渲染层网络错误Failed to load media? 16632
小程序找号找回 释放昵称? 2479
我的小程序广告主收入5301,实际进账4406,是怎么回事呀? 2557
删除部分微信用户个人数据的通知,怎么删除? 5607