( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484072{main}( ).../index.php:0
20.0007484424require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.33434100952require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.34054130056include( '/var/www/html/wp-content/themes/twentyfifteen/archive.php ).../template-loader.php:125
50.34054130056get_header( $name = ???, $args = ??? ).../archive.php:19
60.34054130272locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.34054130368load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.34104130912require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.34124138320wp_head( ).../header.php:18
100.34124138320do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.34124138536WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.34124138536WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.34134141952wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.34134141952do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.34134142168WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.34134142168WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.34154268472twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.34164269992wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.34164269992WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.34164269992WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.34164269992_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.34164270312wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.34174271064trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484072{main}( ).../index.php:0
20.0007484424require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.33434100952require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.34054130056include( '/var/www/html/wp-content/themes/twentyfifteen/archive.php ).../template-loader.php:125
50.34054130056get_header( $name = ???, $args = ??? ).../archive.php:19
60.34054130272locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.34054130368load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.34104130912require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.34124138320wp_head( ).../header.php:18
100.34124138320do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.34124138536WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.34124138536WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.34134141952wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.34134141952do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.34134142168WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.34134142168WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.34154268472twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.36984272168wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.36984272168WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.36984272168WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.36984272168_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.36984272488wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.36994272712trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

Bash 小技巧:给目录加上书签,快速切换目录

原文地址:http://www.zhuoqun.net/html/y2011/1635.html

当我们在命令行下面做开发的时候,很大一部分时间都浪费在了目录切换上面,相信不少人每天敲 “cd” 都敲得想吐。如果目录层次多一点,Tab 键也会饱受摧残。虽然 Bash 有内置的 “cd -”, “pushd” 和 “popd” 命令,但用起来都不是很顺手。

昨天在 Twitter 上看到了 Huy Nguyen 的一篇文章:Quick Bash Tip : Directory Bookmarks,用几行简单的 Bash 脚本巧妙地给目录加上了书签,这样你就可以给最常用的那几个工作目录加上书签,不需要每次都敲 cd 了。

昨天 Huy Nguyen 的这篇文章被发布到了 Hacker News 上,然后引来了很多人评论,其中不少评论都是非常有价值的,甚至还有人直接在评论里对 Huy Nguyen 的脚本做了改进。Huy Nguyen 看到评论之后也修改了自己最初写的脚本,并放到了 github 上(https://github.com/huyng/bashmarks),你可以用 git clone 命令把那个脚本下载下来,或者直接把源码复制到你的 ~/.bashrc 中。

这个脚本只有三个命令:

s – 给当前目录加上书签,书签名为 bookmark_name
g – 跳到名为 bookmark_name 的书签
l – 列出所有的书签

如果想要删除已经保存的书签,请直接编辑 $HOME/.sdirs 文件删除相应的行。

评论中也有人推荐了另外一个功能更为强大的名为 z 的脚本,这个脚本也在 github 上(https://github.com/rupa/z),有兴趣的可以试用一下。

BTW, 经常在国外很多技术文章下面看到很多精彩评论,有些甚至比文章本身更加精彩,所以我很多时候都把每个评论仔细看完。评论里没有人说“沙发”,没有人说“傻 逼,这都不懂”,没有人说“菜鸟,早就有人写出同样的东西了!连z都没听说过,我只用它!”,大家都很礼貌,即使是有反对意见也都是逻辑清晰地列出自己的 理由。这让我非常惊诧和羡慕。

作者发布一篇文章,读者提供反馈,然后作者改进原文,文章的改动历史和评论都成为文章不可分割的一部分,作者和读者都可以不断思考和获益。反过来 说,也正是因为这样的氛围才使得很多人敢于分享自己的看法,敢于写出自己的观点,敢于否认自己最初的看法并不断修正。真希望国内在别人文章下面评论的人也 可以有那样的耐心和礼貌,以及与作者对话的逻辑和才能。至少,要把别人的文章看完再发言。