@@ -15,32 +15,32 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | <div id="directory-fields" class="gv-section"> |
| 17 | 17 | |
| 18 | - <h4><?php esc_html_e( 'Above Entries Widgets', 'gravityview'); ?> <span><?php esc_html_e( 'These widgets will be shown above entries.', 'gravityview'); ?></span></h4> |
|
| 18 | + <h4><?php esc_html_e( 'Above Entries Widgets', 'gravityview' ); ?> <span><?php esc_html_e( 'These widgets will be shown above entries.', 'gravityview' ); ?></span></h4> |
|
| 19 | 19 | |
| 20 | - <?php do_action('gravityview_render_widgets_active_areas', $curr_template, 'header', $post->ID ); ?> |
|
| 20 | + <?php do_action( 'gravityview_render_widgets_active_areas', $curr_template, 'header', $post->ID ); ?> |
|
| 21 | 21 | |
| 22 | - <h4><?php esc_html_e( 'Entries Fields', 'gravityview'); ?> <span><?php esc_html_e( 'These fields will be shown for each entry.', 'gravityview'); ?></span></h4> |
|
| 22 | + <h4><?php esc_html_e( 'Entries Fields', 'gravityview' ); ?> <span><?php esc_html_e( 'These fields will be shown for each entry.', 'gravityview' ); ?></span></h4> |
|
| 23 | 23 | |
| 24 | 24 | <div id="directory-active-fields" class="gv-grid"> |
| 25 | - <?php if(!empty( $curr_template ) ) { |
|
| 26 | - do_action('gravityview_render_directory_active_areas', $curr_template, 'directory', $post->ID, true ); |
|
| 25 | + <?php if ( ! empty( $curr_template ) ) { |
|
| 26 | + do_action( 'gravityview_render_directory_active_areas', $curr_template, 'directory', $post->ID, true ); |
|
| 27 | 27 | } ?> |
| 28 | 28 | </div> |
| 29 | 29 | |
| 30 | - <h4><?php esc_html_e( 'Below Entries Widgets', 'gravityview'); ?> <span><?php esc_html_e( 'These widgets will be shown below entries.', 'gravityview'); ?></span></h4> |
|
| 30 | + <h4><?php esc_html_e( 'Below Entries Widgets', 'gravityview' ); ?> <span><?php esc_html_e( 'These widgets will be shown below entries.', 'gravityview' ); ?></span></h4> |
|
| 31 | 31 | |
| 32 | 32 | <?php |
| 33 | 33 | |
| 34 | - do_action('gravityview_render_widgets_active_areas', $curr_template, 'footer', $post->ID ); |
|
| 34 | + do_action( 'gravityview_render_widgets_active_areas', $curr_template, 'footer', $post->ID ); |
|
| 35 | 35 | |
| 36 | - do_action('gravityview_render_field_pickers', 'directory' ); |
|
| 36 | + do_action( 'gravityview_render_field_pickers', 'directory' ); |
|
| 37 | 37 | |
| 38 | 38 | ?> |
| 39 | 39 | |
| 40 | 40 | <?php // list of available widgets to be shown in the popup ?> |
| 41 | 41 | <div id="directory-available-widgets" class="hide-if-js gv-tooltip"> |
| 42 | 42 | <span class="close" role="button" aria-label="<?php esc_html_e( 'Close', 'gravityview' ); ?>"><i class="dashicons dashicons-dismiss"></i></span> |
| 43 | - <?php do_action('gravityview_render_available_widgets' ); ?> |
|
| 43 | + <?php do_action( 'gravityview_render_available_widgets' ); ?> |
|
| 44 | 44 | </div> |
| 45 | 45 | |
| 46 | 46 | </div> |
@@ -56,17 +56,17 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | <div id="single-fields" class="gv-section"> |
| 58 | 58 | |
| 59 | - <h4><?php esc_html_e( 'These fields will be shown in Single Entry view.', 'gravityview'); ?></h4> |
|
| 59 | + <h4><?php esc_html_e( 'These fields will be shown in Single Entry view.', 'gravityview' ); ?></h4> |
|
| 60 | 60 | |
| 61 | 61 | <div id="single-active-fields" class="gv-grid"> |
| 62 | 62 | <?php |
| 63 | - if(!empty( $curr_template ) ) { |
|
| 64 | - do_action('gravityview_render_directory_active_areas', $curr_template, 'single', $post->ID, true ); |
|
| 63 | + if ( ! empty( $curr_template ) ) { |
|
| 64 | + do_action( 'gravityview_render_directory_active_areas', $curr_template, 'single', $post->ID, true ); |
|
| 65 | 65 | } |
| 66 | 66 | ?> |
| 67 | 67 | </div> |
| 68 | 68 | <?php |
| 69 | - do_action('gravityview_render_field_pickers', 'single' ); |
|
| 69 | + do_action( 'gravityview_render_field_pickers', 'single' ); |
|
| 70 | 70 | ?> |
| 71 | 71 | </div> |
| 72 | 72 | |
@@ -76,16 +76,16 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | <div id="edit-fields" class="gv-section"> |
| 78 | 78 | |
| 79 | - <h4><?php esc_html_e( 'Fields shown when editing an entry.', 'gravityview'); ?> <span><?php esc_html_e('If not configured, all form fields will be displayed.', 'gravityview'); ?></span></h4> |
|
| 79 | + <h4><?php esc_html_e( 'Fields shown when editing an entry.', 'gravityview' ); ?> <span><?php esc_html_e( 'If not configured, all form fields will be displayed.', 'gravityview' ); ?></span></h4> |
|
| 80 | 80 | |
| 81 | 81 | <div id="edit-active-fields" class="gv-grid"> |
| 82 | 82 | <?php |
| 83 | - do_action('gravityview_render_directory_active_areas', apply_filters( 'gravityview/template/edit', 'default_table_edit' ), 'edit', $post->ID, true ); |
|
| 83 | + do_action( 'gravityview_render_directory_active_areas', apply_filters( 'gravityview/template/edit', 'default_table_edit' ), 'edit', $post->ID, true ); |
|
| 84 | 84 | ?> |
| 85 | 85 | </div> |
| 86 | 86 | |
| 87 | 87 | <?php |
| 88 | - do_action('gravityview_render_field_pickers', 'edit' ); |
|
| 88 | + do_action( 'gravityview_render_field_pickers', 'edit' ); |
|
| 89 | 89 | ?> |
| 90 | 90 | |
| 91 | 91 | </div> |
@@ -22,27 +22,27 @@ |
||
| 22 | 22 | |
| 23 | 23 | <?php // list all the available templates (type= fresh or custom ) ?> |
| 24 | 24 | <div class="gv-grid"> |
| 25 | - <?php foreach( $templates as $id => $template ) { |
|
| 25 | + <?php foreach ( $templates as $id => $template ) { |
|
| 26 | 26 | $selected = ( $id == $current_template ) ? ' gv-selected' : ''; ?> |
| 27 | 27 | |
| 28 | 28 | <div class="gv-grid-col-1-3"> |
| 29 | - <div class="gv-view-types-module<?php echo $selected; ?>" data-filter="<?php echo esc_attr( $template['type'] ); ?>"> |
|
| 29 | + <div class="gv-view-types-module<?php echo $selected; ?>" data-filter="<?php echo esc_attr( $template[ 'type' ] ); ?>"> |
|
| 30 | 30 | <div class="gv-view-types-hover"> |
| 31 | 31 | <div> |
| 32 | - <?php if( !empty( $template['buy_source'] ) ) { ?> |
|
| 33 | - <p><a href="<?php echo esc_url( $template['buy_source'] ); ?>" class="button-primary button-buy-now"><?php esc_html_e( 'Buy Now', 'gravityview'); ?></a></p> |
|
| 32 | + <?php if ( ! empty( $template[ 'buy_source' ] ) ) { ?> |
|
| 33 | + <p><a href="<?php echo esc_url( $template[ 'buy_source' ] ); ?>" class="button-primary button-buy-now"><?php esc_html_e( 'Buy Now', 'gravityview' ); ?></a></p> |
|
| 34 | 34 | <?php } else { ?> |
| 35 | - <p><button href="#gv_select_template" class="gv_select_template button button-hero button-primary" data-templateid="<?php echo esc_attr( $id ); ?>"><?php esc_html_e( 'Select', 'gravityview'); ?></button></p> |
|
| 36 | - <?php if( !empty( $template['preview'] ) ) { ?> |
|
| 37 | - <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> |
|
| 35 | + <p><button href="#gv_select_template" class="gv_select_template button button-hero button-primary" data-templateid="<?php echo esc_attr( $id ); ?>"><?php esc_html_e( 'Select', 'gravityview' ); ?></button></p> |
|
| 36 | + <?php if ( ! empty( $template[ 'preview' ] ) ) { ?> |
|
| 37 | + <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> |
|
| 38 | 38 | <?php } ?> |
| 39 | 39 | <?php } ?> |
| 40 | 40 | </div> |
| 41 | 41 | </div> |
| 42 | 42 | <div class="gv-view-types-normal"> |
| 43 | - <img src="<?php echo esc_url( $template['logo'] ); ?>" alt="<?php echo esc_attr( $template['label'] ); ?>"> |
|
| 44 | - <h5><?php echo esc_html( $template['label'] ); ?></h5> |
|
| 45 | - <p class="description"><?php echo esc_html( $template['description'] ); ?></p> |
|
| 43 | + <img src="<?php echo esc_url( $template[ 'logo' ] ); ?>" alt="<?php echo esc_attr( $template[ 'label' ] ); ?>"> |
|
| 44 | + <h5><?php echo esc_html( $template[ 'label' ] ); ?></h5> |
|
| 45 | + <p class="description"><?php echo esc_html( $template[ 'description' ] ); ?></p> |
|
| 46 | 46 | </div> |
| 47 | 47 | </div> |
| 48 | 48 | </div> |
@@ -10,13 +10,13 @@ discard block |
||
| 10 | 10 | wp_nonce_field( 'gravityview_select_form', 'gravityview_select_form_nonce' ); |
| 11 | 11 | |
| 12 | 12 | //current value |
| 13 | -$current_form = (int) \GV\Utils::_GET( 'form_id', gravityview_get_form_id( $post->ID ) ); |
|
| 13 | +$current_form = (int)\GV\Utils::_GET( 'form_id', gravityview_get_form_id( $post->ID ) ); |
|
| 14 | 14 | |
| 15 | 15 | // If form is in trash or not existing, show error |
| 16 | 16 | GravityView_Admin::connected_form_warning( $current_form ); |
| 17 | 17 | |
| 18 | 18 | // check for available gravity forms |
| 19 | -$forms = gravityview_get_forms('any'); |
|
| 19 | +$forms = gravityview_get_forms( 'any' ); |
|
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * @param int $current_form Form currently selected in the View (0 if none selected) |
@@ -35,24 +35,24 @@ discard block |
||
| 35 | 35 | ?> |
| 36 | 36 | <a class="button button-primary" href="#gv_start_fresh" title="<?php esc_attr_e( 'Use a Form Preset', 'gravityview' ); ?>"><?php esc_html_e( 'Use a Form Preset', 'gravityview' ); ?></a> |
| 37 | 37 | |
| 38 | - <?php if( !empty( $forms ) ) { ?> |
|
| 38 | + <?php if ( ! empty( $forms ) ) { ?> |
|
| 39 | 39 | <span> <?php esc_html_e( 'or use an existing form', 'gravityview' ); ?> </span> |
| 40 | 40 | <?php } |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | // If there are no forms to select, show no forms. |
| 44 | - if( !empty( $forms ) ) { ?> |
|
| 44 | + if ( ! empty( $forms ) ) { ?> |
|
| 45 | 45 | <select name="gravityview_form_id" id="gravityview_form_id"> |
| 46 | 46 | <option value="" <?php selected( '', $current_form, true ); ?>>— <?php esc_html_e( 'list of forms', 'gravityview' ); ?> —</option> |
| 47 | - <?php foreach( $forms as $form ) { ?> |
|
| 48 | - <option value="<?php echo $form['id']; ?>" <?php selected( $form['id'], $current_form, true ); ?>><?php echo esc_html( $form['title'] ); ?></option> |
|
| 47 | + <?php foreach ( $forms as $form ) { ?> |
|
| 48 | + <option value="<?php echo $form[ 'id' ]; ?>" <?php selected( $form[ 'id' ], $current_form, true ); ?>><?php echo esc_html( $form[ 'title' ] ); ?></option> |
|
| 49 | 49 | <?php } ?> |
| 50 | 50 | </select> |
| 51 | 51 | <?php } else { ?> |
| 52 | 52 | <select name="gravityview_form_id" id="gravityview_form_id" class="hidden"><option selected="selected" value=""></option></select> |
| 53 | 53 | <?php } ?> |
| 54 | 54 | |
| 55 | - <button class="button button-primary" <?php if( empty( $current_form ) ) { echo 'style="display:none;"'; } ?> id="gv_switch_view_button" title="<?php esc_attr_e( 'Switch View', 'gravityview' ); ?>"><?php esc_html_e( 'Switch View Type', 'gravityview' ); ?></button> |
|
| 55 | + <button class="button button-primary" <?php if ( empty( $current_form ) ) { echo 'style="display:none;"'; } ?> id="gv_switch_view_button" title="<?php esc_attr_e( 'Switch View', 'gravityview' ); ?>"><?php esc_html_e( 'Switch View Type', 'gravityview' ); ?></button> |
|
| 56 | 56 | </p> |
| 57 | 57 | |
| 58 | 58 | <?php // confirm dialog box ?> |