小技巧:在wordpress仪表盘中双击评论内容可编辑评论
- 时间:2020-05-22 15:47:15
- 分类:网络文摘
- 阅读:151 次
在wordpress的仪表盘中,如果想要编辑某个评论,通常需要点击评论下方的编辑按钮方可实现。但很多人可能不知道,双击评论内容就可以对该评论进行编辑了。这个wordpress技巧虽然用处不大,但它从侧面告诉了我们wordpress的博大,既便是天天使用,也还有许多我们不了解的地方。

当然,如果你不喜欢这个功能,只要添加下面的代码到wordpress主题的functions.php文件中,就可以去掉此功能。
- <?php
- /*
- * Plugin Name: Remove Double-Click to Edit for Comments
- * Description: Disables the double-click to edit action for comments
- * Author: Pippin Williamson
- * Version: 1.0
- */
- class Remove_Double_Click_To_Edit {
- public function __construct() {
- add_action( 'admin_footer', array( $this, 'javascript' ) );
- }
- public function javascript() {
- global $pagenow;
- if( 'edit-comments.php' != $pagenow ) {
- return;
- }
- ?>
- <script>
- (function($){
- $('tr.comment').each(function() {
- $(this).find('a.vim-q').each(function() {
- $(this).removeClass('vim-q');
- });
- });
- }(jQuery));
- </script>
- <?php
- }
- }
- new Remove_Double_Click_To_Edit;
原文:http://www.ludou.org/wordpress-double-click-can-edit-comment.html
推荐阅读:面对陌生作文1200字 搜索引擎优化的“时间”该如何确定? 如何根据用户需求来做SEO优化推广 百度竞价否定词添加成功后:怎么还能被搜索出来? 怎么理解关键词和SEO优化之间的关系 企业推广难题 选择百度竞价还是做SEO? SEO四大搜索方式 你真的都了解吗? SEO网站关键词排名有何技巧和诀窍 近期百度SEO优化的规则有哪些变化? 影响中小企业SEO排名的五个地方
- 评论列表
-
- 添加评论