| 170 | | <?php if ( current_user_can( 'edit_themes' ) && $parent_theme ) { |
| 171 | | /* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?> |
| 172 | | <p><?php printf( __( 'The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$s</strong>. Changes made to the templates will affect both themes.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ), $title, $parent_theme ); ?></p> |
| 173 | | <?php } else { ?> |
| 174 | | <p><?php printf( __( 'All of this theme’s files are located in <code>%2$s</code>.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ) ); ?></p> |
| 175 | | <?php } ?> |
| | 177 | <?php $this->show_files_location( $ct ); ?> |
| | 222 | |
| | 223 | /** |
| | 224 | * Show location of template and theme files |
| | 225 | * |
| | 226 | * @param object/array $ct The theme to show it's file locations |
| | 227 | */ |
| | 228 | function show_files_location( $ct ) { |
| | 229 | if ( ! is_array( $ct ) ) { |
| | 230 | $ct = get_object_vars( $ct ); |
| | 231 | } |
| | 232 | if ( current_user_can( 'edit_themes' ) && ! empty( $ct['parent_theme'] ) ) { |
| | 233 | /* translators: 1: template dir, 2: stylesheet_dir, 3: theme title, 4: parent_theme */ ?> |
| | 234 | <p><?php printf( __( '<strong>%3$s</strong> (<code>%2$s</code>) uses templates from <strong>%4$s</strong> (<code>%1$s</code>).' ), str_replace( WP_CONTENT_DIR, '', $ct['template_dir'] ), str_replace( WP_CONTENT_DIR, '', $ct['stylesheet_dir'] ), $ct['title'], $ct['parent_theme'] ); ?></p> |
| | 235 | <?php } else { ?> |
| | 236 | <p><?php printf( __( 'All of this theme’s files are located in <code>%1$s</code>.' ), str_replace( WP_CONTENT_DIR, '', $ct['template_dir'] ) ); ?></p> |
| | 237 | <?php } |
| | 238 | } |