- WordPress 3 Plugin Development Essentials
- Brian Bondari Everett Griffiths
- 115字
- 2021-04-09 21:19:58
Bonus for the curious
In case you're wondering exactly where and how WordPress stores the information about activated plugins, have a look in the database. Using your MySQL client, you can browse the wp_options
table or execute the following query:
SELECT option_value FROM wp_options WHERE option_name='active_plugins';
The active plugins are stored as a serialized PHP hash, referencing the file containing the header. The following is an example of what the serialized hash might contain if you had activated a plugin named "Bad Example". You can use PHP's unserialize() function to parse the contents of this string into a PHP variable as in the following script:
<?php $active_plugin_str = 'a:1:{i:0;s:27:"bad-example/bad-example.php";}'; print_r( unserialize($active_plugin_str) ); ?>
And here's its output:
Array ( [0] => bad-example/bad-example.php )
推薦閱讀
- Active Directory Disaster Recovery
- Irrlicht 1.7 Realtime 3D Engine Beginner's Guide
- vtiger CRM Beginner's Guide
- 中文版After Effects 2021入門教程
- OpenStack實(shí)戰(zhàn)指南
- AutoCAD 2014 中文版從入門到精通
- Rhino 6.0中文版入門、精通與實(shí)戰(zhàn)
- Ogre 3D 1.7 Beginner's Guide
- Building Websites with Joomla! 1.5
- 中文版Illustrator 2020基礎(chǔ)教程
- 剪映真?zhèn)鳎?8招玩轉(zhuǎn)短視頻剪輯
- Building SOA/Based Composite Applications Using NetBeans IDE 6
- Oracle Modernization Solutions
- GraphPad Prism學(xué)術(shù)圖表(全彩)
- 設(shè)計(jì)+制作+印刷+商業(yè)模版:InDesign實(shí)例教程