Skip to content

Commit

Permalink
Merge pull request #4261 from bainternet/release/2.0.9
Browse files Browse the repository at this point in the history
make my template tabs translateable fixes #4221
  • Loading branch information
KingYes committed Apr 29, 2018
2 parents 707bac1 + 90b790f commit 50496e2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions includes/template-library/sources/local.php
Original file line number Diff line number Diff line change
Expand Up @@ -1373,10 +1373,19 @@ private function send_file_headers( $file_name, $file_size ) {
* @return string Template label.
*/
private function get_template_label_by_type( $template_type ) {
$template_label = ucwords( str_replace( [ '_', '-' ], ' ', $template_type ) );
static $document_types = null;
if ( null === $document_types ) {
$document_types = Plugin::instance()->documents->get_document_types();
}

if ( isset( $document_types[ $template_type ] ) ) {
$template_label = call_user_func( [ $document_types[ $template_type ], 'get_title' ] );
} else {
$template_label = ucwords( str_replace( [ '_', '-' ], ' ', $template_type ) );
}

if ( 'page' === $template_type ) {
$template_label = 'Content';
$template_label = __( 'Content', 'elementor' );
}

/**
Expand Down

0 comments on commit 50496e2

Please sign in to comment.