Ticket #558: ticket-558.patch
| File ticket-558.patch, 1.5 KB (added by so1o, 5 years ago) |
|---|
-
bb-admin/themes.php
10 10 11 11 $activetheme = bb_get_option('bb_active_theme'); 12 12 13 $themes = bb_get_themes();13 $themes = array_keys(bb_get_themes()); 14 14 15 15 if ( !in_array($activetheme, $themes)) { 16 $activetheme = BBPATH . 'bb-templates/kakumei';16 $activetheme = 'kakumei'; 17 17 bb_update_option('bb_active_theme',$activetheme); 18 18 } 19 19 20 ?> 20 21 <h2><?php _e('Presentation'); ?></h2> 21 22 22 23 23 <form method="post"> 24 24 <?php 25 25 foreach ($themes as $theme) : 26 26 if ($theme == $activetheme) $checked = "checked='checked' "; else $checked = ""; 27 $base = basename($theme); 28 echo "<p><input type='radio' name='active_theme' value ='$theme' $checked/> $base</p>"; 27 echo "<p><input type='radio' id='active_theme_$theme' name='active_theme' value ='$theme' $checked/> <label for='active_theme_$theme'>$theme</label></p>"; 29 28 endforeach; 30 29 ?> 31 30 <p class="submit"><input type="submit" name="submit" value="Make Default"></p> -
bb-includes/functions.php
1864 1864 } 1865 1865 1866 1866 function bb_get_active_theme_folder() { 1867 $activetheme = bb_get_option( 'bb_active_theme' ); 1867 $themes = bb_get_themes(); 1868 $activetheme = $themes[bb_get_option( 'bb_active_theme' )]; 1868 1869 if ( !$activetheme ) 1869 1870 $activetheme = BBPATH . 'bb-templates/kakumei'; 1870 1871