comment_post_ID) . "#comments\r\n\r\n"; //把 wp-includes/pluggable.php 的如上修改" /> WordPress文件及后台编辑器修改 – 少龙代理™

首页 » 建站技术 » WordPress » 浏览内容

WordPress文件及后台编辑器修改


2010-08-25 21:38:53 2,604 0 发表评论 字体: 作者:C.K.
标签: WordPress备忘

体验版 88 元,个人版 128 元,多用户版 288元个人版160元升级到多用户版。
$notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n";
  • //把 wp-includes/pluggable.php 的如上修改成如下,这样如果收到邮件说是博客上面有新留言
  • //链接就会变成可以直接到留言那一层的锚链接咯
  • $notify_message .= get_permalink($comment->comment_post_ID) . "#comment-$comment_id\r\n\
  • 出处:来自网络

    if ( !$drafts ) {
  •     $drafts_query = new WP_Query( array(
  •         'post_type' => 'post',
  •         'post_status' => 'draft',
  •         'author' => $GLOBALS['current_user']->ID,
  •         'posts_per_page' => 5, //这里修改成 20,这样一次就能显示更多的草稿咯
  •         'orderby' => 'modified',
  •         'order' => 'DESC'
  •     ) );
  •     $drafts =& $drafts_query->posts;
  • }
  • // 文件于 /wp-admin/includes/dashboard.php
  • edButtons[edButtons.length]=new edButton("ed_img","img","","","m",-1);
  • //老样子,先删除这个原本的 img 标签,因为小邪不喜欢这个 ╮( ̄▽ ̄)╭
  •  
  • edButtons[edButtons.length]=new edButton("ed_pre_php","pre_php","
  • <p0re lang='php' line='1'>\n","\n</p0re>","p",-1);
  • edButtons[edButtons.length]=new edButton("ed_pre_css","pre_css","
  • <p0re lang='css' line='1'>\n","\n</p0re>","pp",-1);
  • edButtons[edButtons.length]=new edButton("ed_pre_js","pre_js","
  • <p0re lang='JavaScript' line='1'>\n","\n</p0re>","ppp",-1);
  • //然后增加 WP-Syntax 的代码插入按键
  • edButtons[edButtons.length]=new edButton("ed_oimg","oimg","<img src='"
  • ,"' />","pppp",-1);
  • //以及小邪喜欢的 img 标签
  •  
  • j.Buttons[j.Buttons.length]=new edButton(a+"_img","img","","","m",-1);
  • //删除这一行,原因和上面一样,这里是不选中字符时候执行的
  • j.Buttons[j.Buttons.length]=new edButton(a+"_pre_php","pre_php",
  • "<p0re lang='php' line='1'>\n","\n</p0re>","p",-1);
  • j.Buttons[j.Buttons.length]=new edButton(a+"_pre_css","pre_css",
  • "<p0re lang='css' line='1'>\n","\n</p0re>","pp",-1);
  • j.Buttons[j.Buttons.length]=new edButton(a+"_pre_js","pre_js",
  • "<p0re lang='JavaScript' line='1'>\n","\n</p0re>","ppp",-1);
  • //Syntax 插件的代码插入按键
  • j.Buttons[j.Buttons.length]=new edButton(a+"_oimg","oimg",
  • "<img src='","' />","pppp",-1);
  • //小邪喜欢的 img 标签
  •  
  • edButtons[edButtons.length]=new edButton("ed_link","link","","</a>","a");
  • //删除这行,原本的 link 真难用
  • edButtons[edButtons.length]=new edButton("ed_olink","olink",
  • "<a target='_blank' rel='nofollow' href='","'></a>","ppppp",-1);
  • //增加这行,依然是选中字符后在两边添加所需代码变为 a 标签,在新窗口打开
  •  
  • j.Buttons[j.Buttons.length]=new edButton(a+"_link","link","","</a>","a");
  • //删除这行,代码是不选中字符时候运行的
  • j.Buttons[j.Buttons.length]=new edButton(a+"_olink","olink",
  • "<a target='_blank' rel='nofollow' href='","'></a>","ppppp",-1);
  • //增加这行,老样子
  •  
  • j.Buttons[j.Buttons.length]=new edButton(a+"_code","code","<code>",
  • "</code>","c");
  • edButtons[edButtons.length]=new edButton("ed_code","code","<code>",
  • "</code>","c");
  • //分别删除以上两行,这个按键太占位子鸟
  •  
  • //文件于 /wp-includes/js/quicktags.js,注意喔,别忘记将代码中的 p0re 全部替换为 pre
  • //因为为了显示这些代码已经用了 pre 标签鸟,所以里面的就不能是 pre 了

    网站统计 Statistics

    • 创建时间: 2005年1月3日 距今5064 天
    • 日志总数: 2461
    • 评论总数: 630
    • 标签总数: 654
    • 链接总数: 273
    • 最后更新: 2018-8-31 17:57:04
    • 您是本站第 14156904 位访客

    广告区 Guǎng Gào