I'm a wordpress designer & developer and I want to know if if it's possible to check my wordpress version in tables of mysql database to print it in an administration panel page ?
我是一名wordpress设计师和开发人员,我想知道是否有可能在mysql数据库表格中检查我的wordpress版本,以便在管理面板页面中打印它?
1 个解决方案
#1
23
Should be in wp_options table, the field is called db_version. So, yes, it's possible.
应该在wp_options表中,该字段称为db_version。所以,是的,这是可能的。
Make sure to consult the codex, as the db_version looks different from the wp version. for instance:
请务必查阅codex,因为db_version看起来与wp版本不同。例如:
For Version 3.1, the database version (db_version in wp_options) changed to 17056, and the Trac revision was 17485.
对于版本3.1,数据库版本(wp_options中的db_version)更改为17056,Trac版本更改为17485。
Alternatively, you can find the file in the wordpress installation, inside the folder "wp-incudes". The file is called version.php and defines a global variable like so:
或者,您可以在wordpress安装中找到该文件,位于文件夹“wp-incudes”中。该文件名为version.php,并定义了一个全局变量,如下所示:
/**
* The WordPress version string
*
* @global string $wp_version
*/
$wp_version = '3.7.1';
#1
23
Should be in wp_options table, the field is called db_version. So, yes, it's possible.
应该在wp_options表中,该字段称为db_version。所以,是的,这是可能的。
Make sure to consult the codex, as the db_version looks different from the wp version. for instance:
请务必查阅codex,因为db_version看起来与wp版本不同。例如:
For Version 3.1, the database version (db_version in wp_options) changed to 17056, and the Trac revision was 17485.
对于版本3.1,数据库版本(wp_options中的db_version)更改为17056,Trac版本更改为17485。
Alternatively, you can find the file in the wordpress installation, inside the folder "wp-incudes". The file is called version.php and defines a global variable like so:
或者,您可以在wordpress安装中找到该文件,位于文件夹“wp-incudes”中。该文件名为version.php,并定义了一个全局变量,如下所示:
/**
* The WordPress version string
*
* @global string $wp_version
*/
$wp_version = '3.7.1';