检查选项值jetpack_active_modules
.
正在搜索photon
在wp\\U选项中option_name
.
以下内容将该选项打印为管理通知:
add_action( \'admin_notices\', \'wpse_75103_active_jetpack_modules\' );
function wpse_75103_active_jetpack_modules()
{
if( !current_user_can( \'delete_users\' ) )
return;
$jetp = get_option( \'jetpack_active_modules\' );
$photon_active = ( in_array( \'photon\', $jetp ) ) ? \'is\' : \'is not\';
echo \'<h1>Photon \' . $photon_active . \' active</h1>\';
echo \'<h2>All JetPack Options</h2>\';
echo \'<pre>\' . print_r( $jetp, true ) . \'</pre>\';
}
以下是所有模块激活后的结果
The key numbers are in the order by which the modules were activated and should not be used as reference.
(in a local host installation )Array
(
[0] => vaultpress
[1] => photon
[3] => notes
[5] => publicize
[7] => stats
[9] => comments
[11] => subscriptions
[13] => post-by-email
[15] => carousel
[17] => sharedaddy
[19] => after-the-deadline
[21] => infinite-scroll
[23] => enhanced-distribution
[25] => json-api
[27] => mobile-push
[29] => widgets
[31] => latex
[33] => gravatar-hovercards
[35] => contact-form
[37] => minileven
[39] => custom-css
[41] => shortcodes
[43] => shortlinks
)