【发布时间】:2010-02-09 11:59:23
【问题描述】:
你好 php wordpress 人,
我正在为 wordpress 使用内联编辑器插件 我知道出于 seo 的目的,最好确保这些是外部文件。 当我在浏览器中查看源代码时,我可以看到页面代码中显示了用于内联编辑器插件的 javascript。
有没有办法在 wordpress 框架内将其设为外部 js 文件,还是必须在页面内才能使插件工作?
感谢您的帮助
问候 朱迪
有人知道这是从哪里来的吗?我在我的其他网站上没有看到它,所以它必须来自不同的插件?
<script type="text/javascript">
/* <![CDATA[ */
var ileNicEditor;
function startEditing(postId) {
jQuery("#ileEditLink"+postId).hide();
jQuery("#ileEditButton-"+postId).hide();
jQuery("#ileCancelButton-"+postId).show();
ileCreateNicEditor(postId);
}
function ileCreateNicEditor(postId) {
jQuery.ajax({async:false,
type:"POST",
url:"http://fr.com/wp-content/plugins/inline-editor/ajax-content.php",
data:"id="+postId,
success:function(data){
jQuery("#ileContent-"+postId).html(data);
}
});
ileNicEditor = new nicEditor({fullPanel:true,
iconsPath:"http://fr.com/wp-content/plugins/inline-editor/nicEditorIcons.gif",
onSave:function(content,id,instance){ileSave(postId,content)}
}).panelInstance("ileContent-"+postId,{hasPanel:true});;
jQuery("#ileCancelButton"+postId).show();
}
function ileSave(postId,content){
jQuery.post("http://fr.com/wp-content/plugins/inline-editor/ajax-save.php",
{"id":postId,
"content":content},
function(data){
alert(data.message)
jQuery("#ileCancelButton-"+postId).click();
},
"json");
}
/* ]]> */
</script>
【问题讨论】:
标签: wordpress editor plugins inline