WordPress.org

Make WordPress Core

Ticket #16707: 16707.2.diff

File 16707.2.diff, 1.7 KB (added by MikeHansenMe, 18 months ago)

simpler patch with wording from original patch.

  • wp-admin/includes/class-wp-themes-list-table.php

     
    7676                        // else, fallthrough. install_themes doesn't help if you can't enable it. 
    7777                } else { 
    7878                        if ( current_user_can( 'install_themes' ) ) { 
    79                                 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' ) ); 
     79                                if( file_exists( get_theme_root().'/'.get_option( 'current_theme' ).'/index.php') ){ 
     80                                        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' ) ); 
     81                                } else { 
     82                                        printf( __( 'Currently there are no themes installed which probably means that your WordPress installation is broken. Please install one to restore functionality. Click on the &#8220;<a href="%s">Install Themes</a>&#8221; tab and you will be able to browse or search for themes from the <a href="%s" target="_blank">WordPress.org Theme Directory</a>. Themes in the WordPress.org Theme Directory are designed and developed by third parties, and are licensed under the GNU General Public License, version 2, just like WordPress. Oh, and they&#8217;re free!' ), admin_url( 'theme-install.php' ), "http://wordpress.org/extend/themes/" ); 
     83                                } 
    8084 
    8185                                return; 
    8286                        }