| 186 | | <?php if ( current_user_can( 'edit_themes' ) && $parent_theme ) { |
| 187 | | /* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?> |
| 188 | | <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> |
| 189 | | <?php } else { ?> |
| 190 | | <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> |
| 191 | | <?php } ?> |
| | 193 | <?php $this->_show_files_location( $ct ); ?> |
| | 240 | |
| | 241 | function _show_files_location( $ct ) { |
| | 242 | if ( ! is_array( $ct ) ) { |
| | 243 | $ct = get_object_vars( $ct ); |
| | 244 | } |
| | 245 | if ( current_user_can( 'edit_themes' ) && ! empty( $ct['parent_theme'] ) ) { |
| | 246 | /* translators: 1: template dir, 2: stylesheet_dir, 3: theme title, 4: parent_theme */ ?> |
| | 247 | <p><?php printf( __( 'The template files are located in <code>%1$s</code>. The stylesheet files are located in <code>%2$s</code>. <strong>%3$s</strong> uses templates from <strong>%4$s</strong>. Changes made to the templates will affect both themes.' ), str_replace( WP_CONTENT_DIR, '', $ct['template_dir'] ), str_replace( WP_CONTENT_DIR, '', $ct['stylesheet_dir'] ), $ct['title'], $ct['parent_theme'] ); ?></p> |
| | 248 | <?php } else { ?> |
| | 249 | <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> |
| | 250 | <?php } |
| | 251 | } |