如何更改 WordPress 的 TwentyTen 自动嵌入 flickr 默认宽度(更新问题)?
当我将 Flickr 中的图像 URL 粘贴到 WordPress 帖子中时,它会自动将其嵌入到帖子中。不知何故,它被设置为默认宽度 500px。我如何/在哪里更改此设置?我只是找不到任何相关文档,arg!
注意:我使用的是二十主题。
编辑:
澄清一下,这不是样式表问题。
如果我将其粘贴到帖子中:
http://www.flickr.com/photos/davebryan/5755930575/
Wordpress 自动嵌入它并将其更改为:
<img width="500" height="331" alt="" src="http://farm6.static.flickr.com/5267/5755930575_eee9e7c727.jpg">
它在哪里获取宽度和高度?
When I paste in an images URL from Flickr into a wordpress post it auto embeds it into the post. Somehow it is getting set to a default width of 500px. How/where do I change this? I just can't find any documentation for it, arg!
Note: I am using the twentyten theme.
EDIT:
To clarify, this is not a stylesheet issue.
If I paste this into a post:
http://www.flickr.com/photos/davebryan/5755930575/
Wordpress auto embeds it and changes it to this:
<img width="500" height="331" alt="" src="http://farm6.static.flickr.com/5267/5755930575_eee9e7c727.jpg">
Where is it getting the width and height?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
它使用 http://oembed.com 通过文件 wp-includes/class-oembed.php
您可以在管理>中取消选中自动嵌入设置> Media SubPanel 并设置最大宽度和高度。
您还可以使用尺寸简码,即:
[embed width="123" height="456"]...[/embed]
It's auto-embedding http://codex.wordpress.org/Embeds using http://oembed.com via the file wp-includes/class-oembed.php
You can uncheck autoembedding in Administration > Settings > Media SubPanel and set maximum width and height.
You can also use a shortcode for size, i.e.:
[embed width="123" height="456"]...[/embed]
试试这个:
另请参阅此处:http://wordpress。 org/support/topic/twenty-ten-11-ignoring-image-width-resizing
Try this:
Also see here: http://wordpress.org/support/topic/twenty-ten-11-ignoring-image-width-resizing
除了markratledge的答案之外,二十十还在主题function.php文件中设置内容宽度。请参阅第 47 行,并进行相应更新。
In addition to markratledge's answer, Twenty Ten also sets the content width in the themes function.php file. See line 47, and update accordingly.
除了markratledge的回答之外,我注意到当你访问flickr 网站顶部共享区域中的链接,您可以按“更多共享方式”,它将显示选项“获取 HTML/BBCode”在那里您将看到移动到编辑器的自动嵌入代码。
要停用此功能,您可以按照 markratledge 的答案进行操作。
Beside markratledge's answer I've noticed that when you go to flickr link in the sharing area in the top of the website you can press "More ways to share" it will show you option "Grab the HTML/BBCode" there you will see the autoembedded code that moved to the editor.
In order to de-activate this feature you can follow markratledge's answer.