~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-admin/includes/class-wp-themes-list-table.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
         * @return bool
43
43
         */
44
44
        public function ajax_user_can() {
45
 
                // Do not check edit_theme_options here. AJAX calls for available themes require switch_themes.
 
45
                // Do not check edit_theme_options here. Ajax calls for available themes require switch_themes.
46
46
                return current_user_can( 'switch_themes' );
47
47
        }
48
48
 
104
104
                        // Else, fallthrough. install_themes doesn't help if you can't enable it.
105
105
                } else {
106
106
                        if ( current_user_can( 'install_themes' ) ) {
107
 
                                printf( __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress.org Theme Directory at any time: just click on the <a href="%s">Install Themes</a> tab above.' ), admin_url( 'theme-install.php' ) );
 
107
                                printf( __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress Theme Directory at any time: just click on the <a href="%s">Install Themes</a> tab above.' ), admin_url( 'theme-install.php' ) );
108
108
 
109
109
                                return;
110
110
                        }