Changeset 42343 for trunk/src/wp-admin/theme-install.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/theme-install.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/theme-install.php
r42003 r42343 13 13 wp_reset_vars( array( 'tab' ) ); 14 14 15 if ( ! current_user_can( 'install_themes') )15 if ( ! current_user_can( 'install_themes' ) ) { 16 16 wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) ); 17 } 17 18 18 19 if ( is_multisite() && ! is_network_admin() ) { … … 21 22 } 22 23 23 $title = __( 'Add Themes' );24 $title = __( 'Add Themes' ); 24 25 $parent_file = 'themes.php'; 25 26 … … 40 41 } 41 42 42 wp_localize_script( 'theme', '_wpThemeSettings', array( 43 'themes' => false, 44 'settings' => array( 45 'isInstall' => true, 46 'canInstall' => current_user_can( 'install_themes' ), 47 'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null, 48 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ) 49 ), 50 'l10n' => array( 51 'addNew' => __( 'Add New Theme' ), 52 'search' => __( 'Search Themes' ), 53 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis) 54 'upload' => __( 'Upload Theme' ), 55 'back' => __( 'Back' ), 56 'error' => sprintf( 57 /* translators: %s: support forums URL */ 58 __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ), 59 __( 'https://wordpress.org/support/' ) 43 wp_localize_script( 44 'theme', '_wpThemeSettings', array( 45 'themes' => false, 46 'settings' => array( 47 'isInstall' => true, 48 'canInstall' => current_user_can( 'install_themes' ), 49 'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null, 50 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ), 60 51 ), 61 'tryAgain' => __( 'Try Again' ), 62 'themesFound' => __( 'Number of Themes found: %d' ), 63 'noThemesFound' => __( 'No themes found. Try a different search.' ), 64 'collapseSidebar' => __( 'Collapse Sidebar' ), 65 'expandSidebar' => __( 'Expand Sidebar' ), 66 /* translators: accessibility text */ 67 'selectFeatureFilter' => __( 'Select one or more Theme features to filter by' ), 68 ), 69 'installedThemes' => array_keys( $installed_themes ), 70 ) ); 52 'l10n' => array( 53 'addNew' => __( 'Add New Theme' ), 54 'search' => __( 'Search Themes' ), 55 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis) 56 'upload' => __( 'Upload Theme' ), 57 'back' => __( 'Back' ), 58 'error' => sprintf( 59 /* translators: %s: support forums URL */ 60 __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ), 61 __( 'https://wordpress.org/support/' ) 62 ), 63 'tryAgain' => __( 'Try Again' ), 64 'themesFound' => __( 'Number of Themes found: %d' ), 65 'noThemesFound' => __( 'No themes found. Try a different search.' ), 66 'collapseSidebar' => __( 'Collapse Sidebar' ), 67 'expandSidebar' => __( 'Expand Sidebar' ), 68 /* translators: accessibility text */ 69 'selectFeatureFilter' => __( 'Select one or more Theme features to filter by' ), 70 ), 71 'installedThemes' => array_keys( $installed_themes ), 72 ) 73 ); 71 74 72 75 wp_enqueue_script( 'theme' ); … … 88 91 $help_overview = 89 92 '<p>' . sprintf( 90 /* translators: %s: Theme Directory URL */93 /* translators: %s: Theme Directory URL */ 91 94 __( 'You can find additional themes for your site by using the Theme Browser/Installer on this screen, which will display themes from the <a href="%s">WordPress Theme Directory</a>. These themes are designed and developed by third parties, are available free of charge, and are compatible with the license WordPress uses.' ), 92 __( 'https://wordpress.org/themes/' )93 ) . '</p>' .95 __( 'https://wordpress.org/themes/' ) 96 ) . '</p>' . 94 97 '<p>' . __( 'You can Search for themes by keyword, author, or tag, or can get more specific and search by criteria listed in the feature filter.' ) . ' <span id="live-search-desc">' . __( 'The search results will be updated as you type.' ) . '</span></p>' . 95 98 '<p>' . __( 'Alternately, you can browse the themes that are Featured, Popular, or Latest. When you find a theme you like, you can preview it or install it.' ) . '</p>' . 96 99 '<p>' . sprintf( 97 /* translators: %s: /wp-content/themes */100 /* translators: %s: /wp-content/themes */ 98 101 __( 'You can Upload a theme manually if you have already downloaded its ZIP archive onto your computer (make sure it is from a trusted and original source). You can also do it the old-fashioned way and copy a downloaded theme’s folder via FTP into your %s directory.' ), 99 '<code>/wp-content/themes</code>' 100 ) . '</p>'; 101 102 get_current_screen()->add_help_tab( array( 103 'id' => 'overview', 104 'title' => __('Overview'), 105 'content' => $help_overview 106 ) ); 102 '<code>/wp-content/themes</code>' 103 ) . '</p>'; 104 105 get_current_screen()->add_help_tab( 106 array( 107 'id' => 'overview', 108 'title' => __( 'Overview' ), 109 'content' => $help_overview, 110 ) 111 ); 107 112 108 113 $help_installing = 109 '<p>' . __('Once you have generated a list of themes, you can preview and install any of them. Click on the thumbnail of the theme you’re interested in previewing. It will open up in a full-screen Preview page to give you a better idea of how that theme will look.') . '</p>' . 110 '<p>' . __('To install the theme so you can preview it with your site’s content and customize its theme options, click the "Install" button at the top of the left-hand pane. The theme files will be downloaded to your website automatically. When this is complete, the theme is now available for activation, which you can do by clicking the "Activate" link, or by navigating to your Manage Themes screen and clicking the "Live Preview" link under any installed theme’s thumbnail image.') . '</p>'; 111 112 get_current_screen()->add_help_tab( array( 113 'id' => 'installing', 114 'title' => __('Previewing and Installing'), 115 'content' => $help_installing 116 ) ); 114 '<p>' . __( 'Once you have generated a list of themes, you can preview and install any of them. Click on the thumbnail of the theme you’re interested in previewing. It will open up in a full-screen Preview page to give you a better idea of how that theme will look.' ) . '</p>' . 115 '<p>' . __( 'To install the theme so you can preview it with your site’s content and customize its theme options, click the "Install" button at the top of the left-hand pane. The theme files will be downloaded to your website automatically. When this is complete, the theme is now available for activation, which you can do by clicking the "Activate" link, or by navigating to your Manage Themes screen and clicking the "Live Preview" link under any installed theme’s thumbnail image.' ) . '</p>'; 116 117 get_current_screen()->add_help_tab( 118 array( 119 'id' => 'installing', 120 'title' => __( 'Previewing and Installing' ), 121 'content' => $help_installing, 122 ) 123 ); 117 124 118 125 get_current_screen()->set_help_sidebar( 119 '<p><strong>' . __( 'For more information:') . '</strong></p>' .120 '<p>' . __( '<a href="https://codex.wordpress.org/Using_Themes#Adding_New_Themes">Documentation on Adding New Themes</a>') . '</p>' .121 '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'126 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . 127 '<p>' . __( '<a href="https://codex.wordpress.org/Using_Themes#Adding_New_Themes">Documentation on Adding New Themes</a>' ) . '</p>' . 128 '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>' 122 129 ); 123 130 124 include( ABSPATH . 'wp-admin/admin-header.php');131 include( ABSPATH . 'wp-admin/admin-header.php' ); 125 132 126 133 ?> … … 358 365 wp_print_admin_notice_templates(); 359 366 360 include( ABSPATH . 'wp-admin/admin-footer.php');367 include( ABSPATH . 'wp-admin/admin-footer.php' );
Note: See TracChangeset
for help on using the changeset viewer.