Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: Trocar Tema
- Version: 1.0
- Author: brasofilo
- Author URI: http://brasofilo.com
- */
- /* Trocar de tema conforme o usuario */
- function change_theme( $template = '' ) {
- global $current_user;
- get_currentuserinfo();
- if ( $current_user->user_login === 'SEU-NOME-DE-USUARIO' ) {
- // NOME DO TEMPLATE ALTERNATIVO
- $template = 'twentyten';
- }
- return $template;
- }
- add_filter('template', 'change_theme');
- add_filter('option_template', 'change_theme');
- add_filter('option_stylesheet', 'change_theme');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement