Completed
Pull Request — develop (#1436)
by
unknown
15:35
created
includes/presets/register-default-templates.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
 		'GravityView_DataTables_Template' => array(
60 60
 			'slug' => 'dt_placeholder',
61 61
 			'label' =>  __( 'DataTables Table', 'gv-datatables', 'gravityview' ),
62
-			'description' => __('Display items in a dynamic table powered by DataTables.', 'gravityview'),
63
-			'logo' => plugins_url('assets/images/templates/logo-datatables.png', GRAVITYVIEW_FILE ),
62
+			'description' => __( 'Display items in a dynamic table powered by DataTables.', 'gravityview' ),
63
+			'logo' => plugins_url( 'assets/images/templates/logo-datatables.png', GRAVITYVIEW_FILE ),
64 64
 			'buy_source' => 'https://gravityview.co/pricing/?utm_source=plugin&utm_medium=buy_now&utm_campaign=view_type&utm_term=datatables',
65 65
 			'preview' => 'https://try.gravityview.co/view/datatables/?utm_source=plugin&utm_medium=try_demo&utm_campaign=view_type&utm_term=datatables',
66 66
 			'license' => esc_html__( 'All Access', 'gravityview' ),
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
 				continue;
100 100
 			}
101 101
 
102
-			$placeholder['type']     = 'custom';
103
-			$placeholder['included'] = ( (int) $license['price_id'] >= $placeholder['price_id'] );
102
+			$placeholder[ 'type' ]     = 'custom';
103
+			$placeholder[ 'included' ] = ( (int)$license[ 'price_id' ] >= $placeholder[ 'price_id' ] );
104 104
 
105
-			new GravityView_Placeholder_Template( $placeholder['slug'], $placeholder );
105
+			new GravityView_Placeholder_Template( $placeholder[ 'slug' ], $placeholder );
106 106
 		}
107 107
 
108 108
 	} catch ( Exception $exception ) {
Please login to merge, or discard this patch.
includes/class-admin-installer.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 */
54 54
 	public function register_noconflict( $items ) {
55 55
 
56
-		$items[] = 'gravityview-admin-installer';
56
+		$items[ ] = 'gravityview-admin-installer';
57 57
 
58 58
 		return $items;
59 59
 	}
@@ -68,21 +68,21 @@  discard block
 block discarded – undo
68 68
 
69 69
 	    $downloads_data = get_site_transient( self::DOWNLOADS_DATA_TRANSIENT );
70 70
 
71
-	    if ( ! $downloads_data && ! isset( $_GET['cache'] ) ) {
71
+	    if ( ! $downloads_data && ! isset( $_GET[ 'cache' ] ) ) {
72 72
 			return;
73 73
 		}
74 74
 
75
-		add_filter( 'plugins_api', function ( $data, $action, $args ) use ( $downloads_data ) {
75
+		add_filter( 'plugins_api', function( $data, $action, $args ) use ( $downloads_data ) {
76 76
 			foreach ( $downloads_data as $extension ) {
77
-				if ( empty( $extension['info'] ) || empty( $args->slug ) || $args->slug !== $extension['info']['slug'] ) {
77
+				if ( empty( $extension[ 'info' ] ) || empty( $args->slug ) || $args->slug !== $extension[ 'info' ][ 'slug' ] ) {
78 78
 					continue;
79 79
 				}
80 80
 
81
-				return (object) array(
82
-					'slug'          => $extension['info']['slug'],
83
-					'name'          => $extension['info']['title'],
84
-					'version'       => $extension['licensing']['version'],
85
-					'download_link' => $extension['files'][0]['file'],
81
+				return (object)array(
82
+					'slug'          => $extension[ 'info' ][ 'slug' ],
83
+					'name'          => $extension[ 'info' ][ 'title' ],
84
+					'version'       => $extension[ 'licensing' ][ 'version' ],
85
+					'download_link' => $extension[ 'files' ][ 0 ][ 'file' ],
86 86
 				);
87 87
 			}
88 88
 
@@ -144,13 +144,13 @@  discard block
 block discarded – undo
144 144
 
145 145
 		foreach ( $all_plugins as $path => $plugin ) {
146 146
 
147
-			if ( empty( $plugin['TextDomain'] ) ) {
147
+			if ( empty( $plugin[ 'TextDomain' ] ) ) {
148 148
 				continue;
149 149
 			}
150 150
 
151
-			$wp_plugins[ $plugin['TextDomain'] ] = array(
151
+			$wp_plugins[ $plugin[ 'TextDomain' ] ] = array(
152 152
 				'path'      => $path,
153
-				'version'   => $plugin['Version'],
153
+				'version'   => $plugin[ 'Version' ],
154 154
 				'activated' => is_plugin_active( $path )
155 155
 			);
156 156
 		}
@@ -204,11 +204,11 @@  discard block
 block discarded – undo
204 204
 
205 205
 		$downloads_data = get_site_transient( self::DOWNLOADS_DATA_TRANSIENT );
206 206
 
207
-		if ( $downloads_data && ! isset( $_GET['cache'] ) ) {
207
+		if ( $downloads_data && ! isset( $_GET[ 'cache' ] ) ) {
208 208
 			return $downloads_data;
209 209
 		}
210 210
 
211
-		if( \GV\Plugin::is_network_activated() ) {
211
+		if ( \GV\Plugin::is_network_activated() ) {
212 212
 			$home_url = network_home_url();
213 213
 		} else {
214 214
 			$home_url = home_url();
@@ -236,13 +236,13 @@  discard block
 block discarded – undo
236 236
 
237 237
 		$downloads_data = json_decode( wp_remote_retrieve_body( $response ), true );
238 238
 
239
-		if ( empty( $downloads_data['products'] ) ) {
239
+		if ( empty( $downloads_data[ 'products' ] ) ) {
240 240
 			return array();
241 241
 		}
242 242
 
243
-		$this->set_downloads_data( $downloads_data['products'] );
243
+		$this->set_downloads_data( $downloads_data[ 'products' ] );
244 244
 
245
-		return $downloads_data['products'];
245
+		return $downloads_data[ 'products' ];
246 246
 	}
247 247
 
248 248
 	/**
@@ -317,9 +317,9 @@  discard block
 block discarded – undo
317 317
 
318 318
 				$this->render_section( 'extensions', esc_html__( 'GravityView Extensions', 'gravityview' ), $downloads_data, $wp_plugins );
319 319
 
320
-				$this->render_section(  'plugins', esc_html__( 'Gravity Forms Add-Ons', 'gravityview' ), $downloads_data, $wp_plugins );
320
+				$this->render_section( 'plugins', esc_html__( 'Gravity Forms Add-Ons', 'gravityview' ), $downloads_data, $wp_plugins );
321 321
 
322
-				$this->render_section(  'friends', esc_html__( 'Friends of GravityView', 'gravityview' ), $downloads_data, $wp_plugins );
322
+				$this->render_section( 'friends', esc_html__( 'Friends of GravityView', 'gravityview' ), $downloads_data, $wp_plugins );
323 323
 				?>
324 324
             </div>
325 325
         </div>
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 				continue;
337 337
 			}
338 338
 
339
-			if ( empty( $download['info'] ) ) {
339
+			if ( empty( $download[ 'info' ] ) ) {
340 340
 				continue;
341 341
 			}
342 342
 
@@ -364,29 +364,29 @@  discard block
 block discarded – undo
364 364
 
365 365
         $details = $this->get_download_display_details( $download, $wp_plugins );
366 366
 
367
-        $download_info = $details['download_info'];
367
+        $download_info = $details[ 'download_info' ];
368 368
 
369 369
 		?>
370
-        <div class="item <?php echo esc_attr( $details['item_class'] ); ?>">
370
+        <div class="item <?php echo esc_attr( $details[ 'item_class' ] ); ?>">
371 371
             <div class="addon-inner">
372
-                <a href="<?php echo esc_url( $download_info['link'] ); ?>" rel="external noreferrer noopener" title="<?php esc_html_e( 'Visit the plugin page', 'gravityview' ); ?>"><img class="thumbnail" src="<?php echo esc_attr( $download_info['thumbnail'] ); ?>" alt="" /></a>
373
-                <h3><?php echo esc_html( \GV\Utils::get( $download_info, 'installer_title', $download_info['title'] ) ); ?></h3>
372
+                <a href="<?php echo esc_url( $download_info[ 'link' ] ); ?>" rel="external noreferrer noopener" title="<?php esc_html_e( 'Visit the plugin page', 'gravityview' ); ?>"><img class="thumbnail" src="<?php echo esc_attr( $download_info[ 'thumbnail' ] ); ?>" alt="" /></a>
373
+                <h3><?php echo esc_html( \GV\Utils::get( $download_info, 'installer_title', $download_info[ 'title' ] ) ); ?></h3>
374 374
                 <div>
375
-                    <?php if( ! empty( $details['status_label'] ) ) { ?>
376
-                    <div class="status <?php echo esc_attr( $details['status'] ); ?>" title="<?php printf( esc_attr__( 'Plugin status: %s', 'gravityview' ), esc_html( $details['status_label'] ) ); ?>">
377
-                        <span class="dashicons dashicons-admin-plugins"></span> <span class="status-label"><?php echo esc_html( $details['status_label'] ); ?></span>
375
+                    <?php if ( ! empty( $details[ 'status_label' ] ) ) { ?>
376
+                    <div class="status <?php echo esc_attr( $details[ 'status' ] ); ?>" title="<?php printf( esc_attr__( 'Plugin status: %s', 'gravityview' ), esc_html( $details[ 'status_label' ] ) ); ?>">
377
+                        <span class="dashicons dashicons-admin-plugins"></span> <span class="status-label"><?php echo esc_html( $details[ 'status_label' ] ); ?></span>
378 378
                     </div>
379 379
 			        <?php } ?>
380 380
 
381
-                    <a data-status="<?php echo esc_attr( $details['status'] ); ?>" data-plugin-path="<?php echo esc_attr( $details['plugin_path'] ); ?>" href="<?php echo esc_url( $details['href'] ); ?>" class="button <?php echo esc_attr( $details['button_class'] ); ?>" title="<?php echo esc_attr( $details['button_title'] ); ?>">
382
-                        <span class="title"><?php echo esc_html( $details['button_label'] ); ?></span>
383
-                        <?php if( $details['spinner'] ) { ?><span class="spinner"></span><?php } ?>
381
+                    <a data-status="<?php echo esc_attr( $details[ 'status' ] ); ?>" data-plugin-path="<?php echo esc_attr( $details[ 'plugin_path' ] ); ?>" href="<?php echo esc_url( $details[ 'href' ] ); ?>" class="button <?php echo esc_attr( $details[ 'button_class' ] ); ?>" title="<?php echo esc_attr( $details[ 'button_title' ] ); ?>">
382
+                        <span class="title"><?php echo esc_html( $details[ 'button_label' ] ); ?></span>
383
+                        <?php if ( $details[ 'spinner' ] ) { ?><span class="spinner"></span><?php } ?>
384 384
                     </a>
385 385
                 </div>
386 386
 
387 387
                 <div class="addon-excerpt"><?php
388 388
 
389
-                    $excerpt = \GV\Utils::get( $download_info, 'installer_excerpt', $download_info['excerpt'] );
389
+                    $excerpt = \GV\Utils::get( $download_info, 'installer_excerpt', $download_info[ 'excerpt' ] );
390 390
 
391 391
                     // Allow some pure HTML tags, but remove everything else from the excerpt.
392 392
                     $tags = array( '<strong>', '</strong>', '<em>', '</em>', '<code>', '</code>' );
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 	 */
427 427
 	private function get_download_display_details( $download, $wp_plugins ) {
428 428
 
429
-		$download_info = wp_parse_args( (array) $download['info'], array(
429
+		$download_info = wp_parse_args( (array)$download[ 'info' ], array(
430 430
 			'thumbnail' => '',
431 431
 			'title' => '',
432 432
 			'textdomain' => '',
@@ -438,9 +438,9 @@  discard block
 block discarded – undo
438 438
 			'installer_excerpt' => null, // May not be defined
439 439
 		) );
440 440
 
441
-		$wp_plugin = \GV\Utils::get( $wp_plugins, $download_info['textdomain'], false );
441
+		$wp_plugin = \GV\Utils::get( $wp_plugins, $download_info[ 'textdomain' ], false );
442 442
 
443
-		$has_access = ! empty( $download['files'] );
443
+		$has_access = ! empty( $download[ 'files' ] );
444 444
 		$spinner = true;
445 445
 		$href = $plugin_path = '#';
446 446
 		$status = $item_class = $button_title = $button_class = '';
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 		$required_license = $galactic_only ? __( 'All Access', 'gravityview' ) : __( 'Core + Extensions', 'gravityview' );
451 451
 
452 452
 		// The license is not active - no matter what level, this should not work
453
-		if( ! $is_active  && empty( $base_price ) ) {
453
+		if ( ! $is_active && empty( $base_price ) ) {
454 454
 			$spinner      = false;
455 455
 			$status_label = '';
456 456
 			$button_class = 'disabled disabled-license';
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 			$status_label = '';
464 464
 			$button_label = sprintf( __( 'Purchase Now for %s', 'gravityview' ), '$' . $base_price );
465 465
 			$button_class = 'button-primary button-large';
466
-			$href         = $download_info['link'];
466
+			$href         = $download_info[ 'link' ];
467 467
 			$item_class   = 'featured';
468 468
 		}
469 469
 
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
 			$href         = 'https://gravityview.co/pricing/?utm_source=admin-installer&utm_medium=admin&utm_campaign=Admin%20Notice&utm_content=' . $required_license;
477 477
 		}
478 478
 
479
-        elseif ( ! empty( $download_info['coming_soon'] ) ) {
479
+        elseif ( ! empty( $download_info[ 'coming_soon' ] ) ) {
480 480
 	        $spinner      = false;
481 481
 	        $status       = 'notinstalled';
482 482
 	        $status_label = __( 'Coming Soon', 'gravityview' );
@@ -491,8 +491,8 @@  discard block
 block discarded – undo
491 491
 			$href = add_query_arg(
492 492
 				array(
493 493
 					'action'   => 'install-plugin',
494
-					'plugin'   => $download_info['slug'],
495
-					'_wpnonce' => wp_create_nonce( 'install-plugin_' . $download_info['slug'] ),
494
+					'plugin'   => $download_info[ 'slug' ],
495
+					'_wpnonce' => wp_create_nonce( 'install-plugin_' . $download_info[ 'slug' ] ),
496 496
 				),
497 497
 				self_admin_url( 'update.php' )
498 498
 			);
@@ -504,25 +504,25 @@  discard block
 block discarded – undo
504 504
 		}
505 505
 
506 506
 		// Access and the plugin is installed but not active
507
-		elseif ( false === $wp_plugin['activated'] ) {
507
+		elseif ( false === $wp_plugin[ 'activated' ] ) {
508 508
 			$status = 'inactive';
509 509
 			$status_label = __( 'Inactive', 'gravityview' );
510 510
 			$button_label = __( 'Activate', 'gravityview' );
511
-			$plugin_path = $wp_plugin['path'];
511
+			$plugin_path = $wp_plugin[ 'path' ];
512 512
 
513 513
 		}
514 514
 
515 515
 		// Access and the plugin is installed and active
516 516
 		else {
517 517
 
518
-			$plugin_path = $wp_plugin['path'];
518
+			$plugin_path = $wp_plugin[ 'path' ];
519 519
 			$status = 'active';
520 520
 			$status_label = __( 'Active', 'gravityview' );
521 521
 			$button_label = __( 'Deactivate', 'gravityview' );
522 522
 
523 523
 		}
524 524
 
525
-		return compact( 'download_info','plugin_path', 'status', 'status_label', 'button_title', 'button_class', 'button_label', 'href', 'spinner', 'item_class', 'required_license', 'is_active' );
525
+		return compact( 'download_info', 'plugin_path', 'status', 'status_label', 'button_title', 'button_class', 'button_label', 'href', 'spinner', 'item_class', 'required_license', 'is_active' );
526 526
     }
527 527
 
528 528
 	/**
@@ -537,11 +537,11 @@  discard block
 block discarded – undo
537 537
 	    $base_price = \GV\Utils::get( $download, 'pricing/amount', 0 );
538 538
 		$base_price = \GFCommon::to_number( $base_price );
539 539
 
540
-		unset( $download['pricing']['amount'] );
540
+		unset( $download[ 'pricing' ][ 'amount' ] );
541 541
 
542 542
 		// Price options array, not single price
543
-		if ( ! $base_price && ! empty( $download['pricing'] ) ) {
544
-			$base_price = array_shift( $download['pricing'] );
543
+		if ( ! $base_price && ! empty( $download[ 'pricing' ] ) ) {
544
+			$base_price = array_shift( $download[ 'pricing' ] );
545 545
 		}
546 546
 
547 547
 		return floatval( $base_price );
@@ -555,13 +555,13 @@  discard block
 block discarded – undo
555 555
 	public function activate_download() {
556 556
 		$data = \GV\Utils::_POST( 'data', array() );
557 557
 
558
-		if ( empty( $data['path'] ) ) {
558
+		if ( empty( $data[ 'path' ] ) ) {
559 559
 			return;
560 560
 		}
561 561
 
562
-		$result = activate_plugin( $data['path'] );
562
+		$result = activate_plugin( $data[ 'path' ] );
563 563
 
564
-		if ( is_wp_error( $result ) || ! is_plugin_active( $data['path'] ) ) {
564
+		if ( is_wp_error( $result ) || ! is_plugin_active( $data[ 'path' ] ) ) {
565 565
 			wp_send_json_error( array(
566 566
                 'error' => sprintf( __( 'Plugin activation failed: %s', 'gravityview' ), $result->get_error_message() )
567 567
             ) );
@@ -578,13 +578,13 @@  discard block
 block discarded – undo
578 578
 	public function deactivate_download() {
579 579
 		$data = \GV\Utils::_POST( 'data', array() );
580 580
 
581
-		if ( empty( $data['path'] ) ) {
581
+		if ( empty( $data[ 'path' ] ) ) {
582 582
 			return;
583 583
 		}
584 584
 
585
-		deactivate_plugins( $data['path'] );
585
+		deactivate_plugins( $data[ 'path' ] );
586 586
 
587
-		if( is_plugin_active( $data['path'] ) ) {
587
+		if ( is_plugin_active( $data[ 'path' ] ) ) {
588 588
             wp_send_json_error( array(
589 589
                 'error' => sprintf( __( 'Plugin deactivation failed.', 'gravityview' ) )
590 590
             ) );
Please login to merge, or discard this patch.
includes/admin/metaboxes/views/select-template.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -26,52 +26,52 @@
 block discarded – undo
26 26
 
27 27
 <?php // list all the available templates (type= fresh or custom ) ?>
28 28
 <div class="gv-grid">
29
-	<?php foreach( $templates as $id => $template ) {
29
+	<?php foreach ( $templates as $id => $template ) {
30 30
 		$selected     = ( $id == $current_template ) ? ' gv-selected' : '';
31
-		$placeholder  = ! empty( $template['buy_source'] );
32
-		$is_included  = ! empty( $template['included'] );
31
+		$placeholder  = ! empty( $template[ 'buy_source' ] );
32
+		$is_included  = ! empty( $template[ 'included' ] );
33 33
 		$plugin_data  = GravityView_Admin_Installer::get_wp_plugins_data( \GV\Utils::get( $template, 'textdomain', '' ) );
34 34
 		$button_text  = empty( $plugin_data ) ? esc_html__( 'Install Layout', 'gravityview' ) : esc_html__( 'Activate & Select Layout', 'gravityview' );
35 35
 		$button_class = 'gv-layout-' . ( empty( $plugin_data ) ? 'install' : 'activate' );
36
-		$template_path = isset($plugin_data['path']) ? $plugin_data['path'] : '';
36
+		$template_path = isset( $plugin_data[ 'path' ] ) ? $plugin_data[ 'path' ] : '';
37 37
 
38 38
 		?>
39 39
 		<div class="gv-grid-col-1-3">
40
-			<div class="gv-view-types-module<?php echo $selected; if( $placeholder ) { echo ' gv-view-template-placeholder'; } ?>" data-filter="<?php echo esc_attr( $template['type'] ); ?>">
40
+			<div class="gv-view-types-module<?php echo $selected; if ( $placeholder ) { echo ' gv-view-template-placeholder'; } ?>" data-filter="<?php echo esc_attr( $template[ 'type' ] ); ?>">
41 41
 				<div class="gv-view-types-normal">
42
-					<img src="<?php echo esc_url( $template['logo'] ); ?>" alt="<?php echo esc_attr( $template['label'] ); ?>">
43
-					<h5><?php echo esc_html( $template['label'] ); ?></h5>
44
-					<p class="description"><?php echo esc_html( $template['description'] ); ?></p>
42
+					<img src="<?php echo esc_url( $template[ 'logo' ] ); ?>" alt="<?php echo esc_attr( $template[ 'label' ] ); ?>">
43
+					<h5><?php echo esc_html( $template[ 'label' ] ); ?></h5>
44
+					<p class="description"><?php echo esc_html( $template[ 'description' ] ); ?></p>
45 45
 				</div>
46 46
 				<div class="gv-view-types-hover">
47 47
 					<div>
48 48
 						<?php
49
-						if( $is_included ) {
49
+						if ( $is_included ) {
50 50
 						?>
51 51
 							<p><a href="<?php echo esc_url( admin_url( 'edit.php?post_type=gravityview&page=gv-admin-installer' ) ); ?>" class="button button-secondary button-hero <?php echo $button_class; ?>" rel="internal" data-template-path="<?php echo $template_path; ?>"><?php echo $button_text; ?></a></p>
52
-							<?php if( !empty( $template['license'] ) ) { ?>
53
-								<p class="gv-included-in"><?php echo sprintf( esc_html__( 'This layout is included in the %s license.', 'gravityview' ), esc_html( str_replace( ' ', '&nbsp;', $template['license'] ) ) ); ?></p>
52
+							<?php if ( ! empty( $template[ 'license' ] ) ) { ?>
53
+								<p class="gv-included-in"><?php echo sprintf( esc_html__( 'This layout is included in the %s license.', 'gravityview' ), esc_html( str_replace( ' ', '&nbsp;', $template[ 'license' ] ) ) ); ?></p>
54 54
 							<?php } ?>
55 55
 						<?php
56
-						} elseif( $placeholder ) {
57
-							$utm_string = '?utm_source=plugin&utm_medium=buy_now&utm_campaign=view_type&utm_term=' . urlencode( $template['license'] ) . '&utm_content=' . urlencode( $template['slug'] );
56
+						} elseif ( $placeholder ) {
57
+							$utm_string = '?utm_source=plugin&utm_medium=buy_now&utm_campaign=view_type&utm_term=' . urlencode( $template[ 'license' ] ) . '&utm_content=' . urlencode( $template[ 'slug' ] );
58 58
 							?>
59
-							<p><a href="<?php echo esc_url( $template['buy_source'] ); ?>" class="button button-primary button-hero" rel="noreferrer noopener external"><?php esc_html_e( 'Buy Now', 'gravityview'); ?></a></p>
59
+							<p><a href="<?php echo esc_url( $template[ 'buy_source' ] ); ?>" class="button button-primary button-hero" rel="noreferrer noopener external"><?php esc_html_e( 'Buy Now', 'gravityview' ); ?></a></p>
60 60
 
61
-							<?php if( !empty( $template['preview'] ) ) { ?>
62
-								<p><a href="<?php echo esc_url( $template['preview'] ); ?>" rel="noreferrer noopener external" class="button button-secondary"><i class="dashicons dashicons-external" style="vertical-align: middle;" title="<?php esc_html_e( 'View a live demo of this layout', 'gravityview'); ?>"></i> <?php esc_html_e( 'Try a demo', 'gravityview' ); ?></a></p>
61
+							<?php if ( ! empty( $template[ 'preview' ] ) ) { ?>
62
+								<p><a href="<?php echo esc_url( $template[ 'preview' ] ); ?>" rel="noreferrer noopener external" class="button button-secondary"><i class="dashicons dashicons-external" style="vertical-align: middle;" title="<?php esc_html_e( 'View a live demo of this layout', 'gravityview' ); ?>"></i> <?php esc_html_e( 'Try a demo', 'gravityview' ); ?></a></p>
63 63
 							<?php } ?>
64 64
 
65
-							<?php if( ! empty( $template['license'] ) ) { ?>
66
-								<p class="gv-included-in"><?php echo sprintf( esc_html__( 'This layout is included in the %s license.', 'gravityview' ), '<a href="https://gravityview.co/pricing/' . esc_attr( $utm_string ) . '" rel="noreferrer noopener external">' . esc_html( str_replace( ' ', '&nbsp;', $template['license'] ) ) . '</a>' ); ?></p>
65
+							<?php if ( ! empty( $template[ 'license' ] ) ) { ?>
66
+								<p class="gv-included-in"><?php echo sprintf( esc_html__( 'This layout is included in the %s license.', 'gravityview' ), '<a href="https://gravityview.co/pricing/' . esc_attr( $utm_string ) . '" rel="noreferrer noopener external">' . esc_html( str_replace( ' ', '&nbsp;', $template[ 'license' ] ) ) . '</a>' ); ?></p>
67 67
 							<?php } ?>
68 68
 						<?php }
69 69
 
70
-						if ($placeholder || $is_included) { ?> </div><div class="hidden"> <?php } ?>
70
+						if ( $placeholder || $is_included ) { ?> </div><div class="hidden"> <?php } ?>
71 71
 
72
-                        <p><a href="#gv_select_template" role="button" class="gv_select_template button button-hero button-primary" data-templateid="<?php echo esc_attr( $id ); ?>"><?php esc_html_e( 'Select', 'gravityview'); ?></a></p>
73
-                        <?php if( !empty( $template['preview'] ) ) { ?>
74
-                            <a href="<?php echo esc_url( $template['preview'] ); ?>" rel="external" class="gv-site-preview"><i class="dashicons dashicons-admin-links" title="<?php esc_html_e( 'View a live demo of this preset', 'gravityview'); ?>"></i></a>
72
+                        <p><a href="#gv_select_template" role="button" class="gv_select_template button button-hero button-primary" data-templateid="<?php echo esc_attr( $id ); ?>"><?php esc_html_e( 'Select', 'gravityview' ); ?></a></p>
73
+                        <?php if ( ! empty( $template[ 'preview' ] ) ) { ?>
74
+                            <a href="<?php echo esc_url( $template[ 'preview' ] ); ?>" rel="external" class="gv-site-preview"><i class="dashicons dashicons-admin-links" title="<?php esc_html_e( 'View a live demo of this preset', 'gravityview' ); ?>"></i></a>
75 75
                         <?php } ?>
76 76
 					</div>
77 77
 				</div>
Please login to merge, or discard this patch.