12 wp_nonce_field(
'gravityview_select_template',
'gravityview_select_template_nonce' );
21 foreach ( GravityKitFoundation::helpers()->core->get_plugins() as $path => $plugin ) {
22 if ( empty( $plugin[
'TextDomain'] ) ) {
28 'version' => $plugin[
'Version'],
29 'activated' => is_plugin_active( $path )
35 <input type=
"hidden" id=
"gravityview_directory_template" name=
"gravityview_directory_template" value=
"<?php echo esc_attr( $current_template ); ?>" />
37 <div
class=
"gv-view-template-notice notice inline error hidden">
38 <p><!-- Contents will be replaced by JavaScript
if there is an error --></p>
46 $is_included = ! empty(
$template[
'included'] );
49 $button_text = empty( $plugin_data ) ? esc_html__(
'Install',
'gk-gravityview' ) : esc_html__(
'Activate & Select',
'gk-gravityview' );
50 $button_class =
'gv-layout-' . ( empty( $plugin_data ) ?
'install' :
'activate' );
51 $template_path = isset( $plugin_data[
'path'] ) ? $plugin_data[
'path'] :
'';
55 <div
class=
"gv-grid-col-1-4">
56 <div
class=
"gv-view-types-module<?php echo $selected; if( $placeholder ) { echo ' gv-view-template-placeholder'; } ?>" data-filter=
"<?php echo esc_attr( $template['type'] ); ?>">
57 <div
class=
"gv-view-types-normal">
58 <img src=
"<?php echo esc_url( $template['logo'] ); ?>" alt=
"<?php echo esc_attr( $template['label'] ); ?>">
59 <h5><?php echo esc_html(
$template[
'label'] ); ?></h5>
60 <p
class=
"description"><?php echo esc_html(
$template[
'description'] ); ?></p>
62 <div
class=
"gv-view-types-hover">
67 <p><button
class=
"button button-secondary button-hero <?php echo esc_attr( $button_class ); ?>" rel=
"internal" data-
template-path=
"<?php echo esc_attr( $template_path ); ?>" data-templateid=
"<?php echo esc_attr( $template_id ); ?>" data-download-
id=
"<?php echo esc_attr( $download_id ); ?>"><?php echo $button_text; ?></button></p>
68 <?php
if( !empty(
$template[
'license'] ) ) { ?>
69 <p
class=
"gv-included-in"><?php echo sprintf( esc_html__(
'This layout is included in the %s license.',
'gk-gravityview' ), esc_html( str_replace(
' ',
' ',
$template[
'license'] ) ) ); ?></p>
73 $utm_string =
'?utm_source=plugin&utm_medium=buy_now&utm_campaign=view_type&utm_term=' . urlencode(
$template[
'license'] ) .
'&utm_content=' . urlencode(
$template[
'slug'] );
75 <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',
'gk-gravityview'); ?></a></p>
77 <?php
if( !empty(
$template[
'preview'] ) ) { ?>
78 <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', 'gk-gravityview'); ?>"></i> <?php esc_html_e(
'Try a demo',
'gk-gravityview' ); ?></a></p>
81 <?php
if( ! empty(
$template[
'license'] ) ) { ?>
82 <p
class=
"gv-included-in"><?php echo sprintf( esc_html__(
'This layout is included in the %s license.',
'gk-gravityview' ),
'<a href="https://www.gravitykit.com/pricing/' . esc_attr( $utm_string ) .
'" rel="noreferrer noopener external">' . esc_html( str_replace(
' ',
' ',
$template[
'license'] ) ) .
'</a>' ); ?></p>
86 if (
$placeholder || $is_included) { ?> </div><div
class=
"hidden"> <?php } ?>
88 <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',
'gk-gravityview'); ?></a></p>
89 <?php
if( !empty(
$template[
'preview'] ) ) { ?>
90 <a href=
"<?php echo esc_url( $template['preview'] ); ?>" rel=
"external" class=
"gv-site-preview"><i
class=
"dashicons dashicons-welcome-view-site" title=
"<?php esc_html_e( 'View a live demo of this preset', 'gk-gravityview'); ?>"></i></a>
if(! isset( $gravityview)||empty( $gravityview->template)) $template
The entry loop for the list output.
static get( $array, $key, $default=null)
{}
static get_installed_plugin_by_text_domain( $text_domains_str)
Searches installed plugin by text domain(s) and returns its data.
gravityview_get_registered_templates()
Get all available preset templates.
gravityview_get_template_id( $post_id)
Get the template ID (list, table, datatables, map) for a View.