wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
maybe_disable_automattic_widgets › WordPress Function
Desde2.2.0
Obsoleton/a
› maybe_disable_automattic_widgets ( Sem parâmetros )
| Definido em: |
|
| Codex: |
Disables the Automattic widgets plugin, which was merged into core.
Fonte
function maybe_disable_automattic_widgets() {
$plugins = __get_option( 'active_plugins' );
foreach ( (array) $plugins as $plugin ) {
if ( 'widgets.php' === basename( $plugin ) ) {
array_splice( $plugins, array_search( $plugin, $plugins, true ), 1 );
update_option( 'active_plugins', $plugins );
break;
}
}
}