The only issue could be if what you have written is inside of a PHP function, you might have to put a line like this at the top of the function to tell PHP that you want to use the global variable: global $langswitch_lang_pref;
我是不是需要在 /wp-includes/functions.php这个文件里: 修改这样呢?
<?php global $langswitch_lang_pref; require_once(dirname(__FILE__).'/compat.php');
function mysql2date($dateformatstring, $mysqlstring, $translate = true) { ........
更新了
终于集成tags了
问题是原来用的UTW插件设置的tag都不能用了
有没有导入的办法?
@any:有,在 Dashboard -> Manage -> Import 中,可以將 UTW 的 tag 轉換。
成功 感谢天佑:)
能打扰一下向天佑请教一个问题吗?
虽然现在天佑不用wordpress了。
问题是这样的,我需要定义一个变量$langswitch_lang_pref,因为用到一个判断语句。
询问了作者,作者是这样给我回复的:
The only issue could be if what you have written is inside of a PHP
function, you might have to put a line like this at the top of the
function to tell PHP that you want to use the global variable:
global $langswitch_lang_pref;
我是不是需要在 /wp-includes/functions.php这个文件里:
修改这样呢?
@aigou:$langswitch_lang_pref 這個 variable 是你自行新增的嗎?加
global $langswitch_lang_pref;在什麼 file 是取決於你是否在那個 php file 內使用這個 variable,若加在 wp-includes/functions.php,functions.php 內便可以讀取這個 variable。
十分谢谢天佑的热心回答,真是受教了。