Ticket #25948: 25948.check_capability.diff
File 25948.check_capability.diff, 1.2 KB (added by , 12 years ago) |
---|
-
wp-admin/themes.php
97 97 'root' => '/wp-admin/themes.php', 98 98 'container' => '#appearance', 99 99 'extraRoutes' => '', 100 'canInstall' => ( ! is_multisite() && current_user_can( 'install_themes' ) ), 100 101 ), 101 102 'i18n' => array( 102 103 'add_new' => __( 'Add New Theme' ), -
wp-admin/js/theme.js
465 465 }); 466 466 467 467 // 'Add new theme' element shown at the end of the grid 468 this.$el.append( '<div id="add-new" class="theme add-new"><a href="' + themes.data.settings.install_uri + '"><div class="theme-screenshot"><span></span></div><h3 class="theme-name">' + themes.data.i18n.add_new + '</h3></a></div>' ); 468 if ( themes.data.settings.canInstall ) { 469 this.$el.append( '<div id="add-new" class="theme add-new"><a href="' + themes.data.settings.install_uri + '"><div class="theme-screenshot"><span></span></div><h3 class="theme-name">' + themes.data.i18n.add_new + '</h3></a></div>' ); 470 } 469 471 470 472 this.parent.page++; 471 473 },