- 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 )
推薦閱讀
- CorelDRAW X6圖形設(shè)計立體化教程
- PS職場達人煉成記:人人都能學(xué)會的Photoshop辦公設(shè)計技巧
- User Training for Busy Programmers
- Entity Framework Tutorial
- 中文版Premiere影視編輯課堂實錄
- ERP沙盤模擬簡明教程
- 邊做邊學(xué):Photoshop圖像制作案例教程(第2版·Photoshop 2020)
- 改變思維:菜鳥也能做出震撼PPT(全彩版)
- jQuery Mobile First Look
- 數(shù)字創(chuàng)意大師:Alias二維與三維概念設(shè)計工作流淺析
- 攝影輕松入門:Photoshop后期處理
- AutoCAD 2016入門與提高(超值版)
- Building Websites with VB.NET and DotNetNuke 4
- 中文版Illustrator 2020基礎(chǔ)教程
- Photoshop CC2017圖像處理實例教程