Skip to content

Commit

Permalink
Remove unnecessary variable
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
mrcasual committed Aug 28, 2024
1 parent 2fe508d commit 33756ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions includes/admin/metaboxes/views/select-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ static function ( array $mapping, string $key ) use ( $templates ) {
$selected = ( $id == $directory_template ) ? ' gv-selected' : '';
$placeholder = ! empty( $template['buy_source'] );
$is_included = ! empty( $template['included'] );
$template_text_domain = $template['textdomain'] ?? '';
$plugin_data = GravityKit\GravityView\Foundation\Helpers\Core::get_installed_plugin_by_text_domain( $template_text_domain ) ?: array();
$plugin_text_domain = $plugin_data['text_domain'] ?? $template_text_domain;
$plugin_data = GravityKit\GravityView\Foundation\Helpers\Core::get_installed_plugin_by_text_domain( $template['textdomain'] ?? '' ) ?? [];
$plugin_text_domain = $plugin_data['text_domain'] ?? $template['textdomain'] ?? '';
$button_text = empty( $plugin_data ) ? esc_html__( 'Install', 'gk-gravityview' ) : esc_html__( 'Activate & Select', 'gk-gravityview' );
$button_class = 'gv-layout-' . ( empty( $plugin_data ) ? 'install' : 'activate' );
$base_type = $base_template_mapping[ $template['slug'] ?? 'table' ] ?? 'default_table';
Expand Down

0 comments on commit 33756ee

Please sign in to comment.