对于单个帖子和页面,我想添加一些rel
中包含的所有图像的属性,并在编辑屏幕上添加了“添加图像”功能。
属性将是rel="lightbox[post id]"
为了最有效地实现这一点,我应该过滤哪些功能?
对于单个帖子和页面,我想添加一些rel
中包含的所有图像的属性,并在编辑屏幕上添加了“添加图像”功能。
属性将是rel="lightbox[post id]"
为了最有效地实现这一点,我应该过滤哪些功能?
image_send_to_editor
function insert_img_rel_attrib( $html, $id, $caption, $title, $align, $url, $size, $alt )
{
/* Run your magic on the image $html to insert rel attrib */
return $html;
}
add_filter( \'image_send_to_editor\', \'insert_img_rel_attrib\' );
这个rel="whatever"
属性仅适用于搜索引擎。如果你想让你的内容对蜘蛛、爬虫等“更好”,take a look at this list first.
将添加类似于我在下面粘贴到函数的代码。php主题文件会降低Wordpress站点的速度,还是影响CPU?(谢谢)function remove_menu_items() { global $menu; $restricted = array(__(\'Links\'), __(\'Comments\'), __(\'Media\'), __(\'Plugins\'), __(\'Tools\'), __(\'Users\')); end ($menu);&#