GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
class-admin-welcome.php
Go to the documentation of this file.
1 <?php
2 /**
3  * Welcome Page Class
4  *
5  * @package GravityView
6  * @author Zack Katz <[email protected]>
7  * @link https://www.gravitykit.com
8  * @copyright Copyright 2014, Katz Web Services, Inc.
9  *
10  * @since 1.0.0
11  */
12 
13 // Exit if accessed directly
14 if ( ! defined( 'ABSPATH' ) ) exit;
15 
16 /**
17  * GravityView_Welcome Class
18  *
19  * A general class for About page.
20  *
21  * @since 1.0
22  */
24 
25  /**
26  * @var string The capability users should have to view the page
27  */
28  public $minimum_capability = 'gravityview_getting_started';
29 
30  /**
31  * Get things started
32  *
33  * @since 1.0
34  */
35  public function __construct() {
36  add_action( 'gk/foundation/initialized', array( $this, 'admin_menus' ) );
37  add_action( 'admin_head', array( $this, 'admin_head' ) );
38  add_action( 'admin_init', array( $this, 'welcome' ) );
39  add_filter( 'gravityview_is_admin_page', array( $this, 'is_dashboard_page'), 10, 2 );
40  }
41 
42  /**
43  * Register the Dashboard Pages which are later hidden but these pages
44  * are used to render the Welcome pages.
45  *
46  * @since 1.0
47  *
48  * @return void
49  *
50  * @param \GravityKit\GravityView\Foundation\Core|GravityKitFoundation $foundation
51  */
52  public function admin_menus( $foundation ) {
53  if ( $foundation::helpers()->core->is_network_admin() ) {
54  return;
55  }
56 
57  /** @var \GravityKit\GravityView\Foundation\WP\AdminMenu $admin_menu */
58  $admin_menu = $foundation::admin_menu();
59 
60  // Changelog Page
61  $admin_menu::add_submenu_item( [
62  'id' => 'gv-changelog',
63  'page_title' => __( 'Changelog', 'gk-gravityview' ),
64  'menu_title' => __( 'Changelog', 'gk-gravityview' ),
65  'capability' => $this->minimum_capability,
66  'callback' => array( $this, 'changelog_screen' ),
67  'order' => 40,
68  ], 'center' );
69 
70  // Changelog Page
71  $admin_menu::add_submenu_item( [
72  'id' => 'gv-credits',
73  'page_title' => __( 'Credits', 'gk-gravityview' ),
74  'menu_title' => __( 'Credits', 'gk-gravityview' ),
75  'capability' => $this->minimum_capability,
76  'callback' => array( $this, 'credits_screen' ),
77  'order' => 50,
78  ], 'center' );
79 
80  // Add Getting Started page to GravityView menu
81  $admin_menu::add_submenu_item( [
82  'id' => 'gv-getting-started',
83  'page_title' => __( 'GravityView: Getting Started', 'gk-gravityview' ),
84  'menu_title' => __( 'Getting Started', 'gk-gravityview' ),
85  'capability' => $this->minimum_capability,
86  'callback' => array( $this, 'getting_started_screen' ),
87  'order' => 60, // Make it the last so that the border divider remains
88  ], 'center' );
89  }
90 
91  /**
92  * Is this page a GV dashboard page?
93  *
94  * @return boolean $is_page True: yep; false: nope
95  */
96  public function is_dashboard_page( $is_page = false, $hook = NULL ) {
97  global $pagenow;
98 
99  if ( empty( $_GET['page'] ) ) {
100  return $is_page;
101  }
102 
103  if ( ! $pagenow ) {
104  return $is_page;
105  }
106 
107  return 'admin.php' === $pagenow && in_array( $_GET['page'], array( 'gv-changelog', 'gv-credits', 'gv-getting-started' ), true );
108  }
109 
110  /**
111  * Hide Individual Dashboard Pages
112  *
113  * @since 1.0
114  * @return void
115  */
116  public function admin_head() {
117 
118  /** @var \GravityKit\GravityView\Foundation\WP\AdminMenu $admin_menu */
119  $admin_menu = GravityKitFoundation::admin_menu();
120 
121  $admin_menu::remove_submenu_item( 'gv-credits' );
122  $admin_menu::remove_submenu_item( 'gv-changelog' );
123 
124  if( ! $this->is_dashboard_page() ) {
125  return;
126  }
127 
128  ?>
129  <style>
130  .update-nag { display: none; }
131  </style>
132  <?php
133  }
134 
135  /**
136  * Navigation tabs
137  *
138  * @since 1.0
139  * @return void
140  */
141  public function tabs() {
142  global $plugin_page;
143 
144  // Don't fetch -beta, etc.
145  list( $display_version ) = explode( '-', GV_PLUGIN_VERSION );
146 
147  $selected = !empty( $plugin_page ) ? $plugin_page : 'gv-getting-started';
148 
149  echo gravityview_get_floaty( 132 );
150  ?>
151 
152  <h1><?php printf( esc_html__( 'Welcome to GravityView %s', 'gk-gravityview' ), $display_version ); ?></h1>
153  <div class="about-text"><?php esc_html_e( 'Thank you for installing GravityView. Beautifully display your Gravity Forms entries.', 'gk-gravityview' ); ?></div>
154 
155  <h2 class="nav-tab-wrapper clear">
156  <a class="nav-tab <?php echo $selected == 'gv-getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-getting-started' ), 'admin.php' ) ) ); ?>">
157  <?php esc_html_e( "Getting Started", 'gk-gravityview' ); ?>
158  </a>
159  <a class="nav-tab <?php echo $selected == 'gv-changelog' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-changelog' ), 'admin.php' ) ) ); ?>">
160  <?php esc_html_e( "List of Changes", 'gk-gravityview' ); ?>
161  </a>
162  <a class="nav-tab <?php echo $selected == 'gv-credits' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-credits' ), 'admin.php' ) ) ); ?>">
163  <?php esc_html_e( 'Credits', 'gk-gravityview' ); ?>
164  </a>
165  </h2>
166  <?php
167  }
168 
169  /**
170  * Render About Screen
171  *
172  * @since 1.0
173  * @return void
174  */
175  public function getting_started_screen() {
176  ?>
177  <div class="wrap about-wrap">
178  <?php $this->tabs(); ?>
179  </div>
180 
181  <div class="about-wrap">
182 
183  <h2 class="about-headline-callout">Configuring a View</h2>
184 
185  <div class="feature-video" style="text-align:center;">
186  <iframe height="315" src="https://www.youtube-nocookie.com/embed/WrXsZhqKRY8?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
187 
188  <p style="text-align:center; padding-top: 1em;"><a class="button button-primary button-hero" href="https://docs.gravityview.co/category/24-category" rel="noopener noreferrer external" target="_blank">Read more: Setting Up Your First View<span class='screen-reader-text'> <?php esc_attr_e( 'This link opens in a new window.', 'gk-gravityview' ); ?></span></a></p>
189  </div>
190 
191  <div class="feature-section two-col has-2-columns is-fullwidth">
192  <div class="col column">
193  <h3>Create a View</h3>
194 
195  <ol class="ol-decimal">
196  <li>Go to the GravityKit menu and click on <a href="<?php echo admin_url('post-new.php?post_type=gravityview'); ?>">New View</a></li>
197  <li>If you want to <strong>create a new form</strong>, click the "Use a Form Preset" button</li>
198  <li>If you want to <strong>use an existing form&rsquo;s entries</strong>, select from the dropdown.</li>
199  <li>Select the type of View you would like to create. There are two core types of Views: <strong>Table</strong> and <strong>Listing</strong>.
200  <ul class="ul-square">
201  <li><strong>Table Views</strong> output entries as tables; a grid of data.</li>
202  <li><strong>Listing Views</strong> display entries in a more visual layout.</li>
203  </ul>
204  </li>
205  <li>On the View Configuration metabox, click on the "+Add Field" button to add form fields to the active areas of your View. These are the fields that will be displayed in the frontend.</li>
206  </ol>
207  </div>
208  <div class="col column">
209  <h4>What is a View?</h4>
210  <p>When a form is submitted in Gravity Forms, an entry is created. Without GravityView, Gravity Forms entries are visible only in the WordPress dashboard, and only to users with permission.</p>
211  <p>GravityView allows you to display entries on the front of your site. In GravityView, when you arrange the fields you want displayed and save the configuration, it's called a "View".</p>
212  </div>
213  </div>
214 
215  <hr />
216 
217  <div class="feature-section two-col has-2-columns is-fullwidth">
218  <div class="col column">
219  <h3>Embed Views in the Block Editor</h3>
220  <p>Embed Views using the "Add Shortcode" button above your content editor. <a href="https://docs.gravityview.co/article/73-using-the-shortcode">Learn how to use the <code>[gravityview]</code> shortcode.</a></p>
221  </div>
222  <div class="col column">
223  <img src="<?php echo plugins_url( 'assets/images/screenshots/shortcode-block.png', GRAVITYVIEW_FILE ); ?>" alt="Screenshot of the Shortcode block" />
224  </div>
225  </div>
226 
227  <div class="feature-section two-col has-2-columns is-fullwidth">
228  <div class="col column">
229  <h3>Embed Views in Classic Editor</h3>
230  <p>Views don&rsquo;t need to be embedded in a post or page, but you can if you want. Embed Views using the "Add View" button above your content editor.</p>
231  </div>
232  <div class="col column">
233  <img src="<?php echo plugins_url( 'assets/images/screenshots/add-view-button.png', GRAVITYVIEW_FILE ); ?>" alt="Screenshot of Add View button" />
234  </div>
235  </div>
236 
237  <hr />
238 
239  <div class="feature-section two-col has-2-columns is-fullwidth">
240  <div class="col column">
241  <h3>Configure Multiple Entry, Single Entry, and Edit Entry Layouts</h3>
242 
243  <p>You can configure what fields are displayed in <strong>Multiple Entry</strong>, <strong>Single Entry</strong>, and <strong>Edit Entry</strong> modes. These can be configured by clicking on the three associated tabs when editing a View.</p>
244 
245  <ul class="ul-disc">
246  <li>Click "+ Add Field" to add a field to a zone</li>
247  <li>Click the name of the field you want to display</li>
248  <li>Once added, fields can be dragged and dropped to be re-arranged. Hover over the field until you see a cursor with four arrows, then drag the field.</li>
249  <li>Click the <i class="dashicons dashicons-admin-generic"></i> gear icon on each field to configure the <strong>Field Settings</strong></li>
250  </ul>
251  </div>
252  <div class="col column">
253  <img src="<?php echo plugins_url( 'assets/images/screenshots/add-field.png', GRAVITYVIEW_FILE ); ?>" alt="Add a field dialog box" />
254  </div>
255  </div>
256  </div>
257  <?php
258  }
259 
260 
261  /**
262  * Render Changelog Screen
263  *
264  * @since 1.0.1
265  * @return void
266  */
267  public function changelog_screen() {
268 
269  ?>
270  <div class="wrap about-wrap">
271 
272  <?php $this->tabs(); ?>
273 
274  <div class="changelog point-releases" style="margin-top: 3em; border-bottom: 0">
275 
276  <div class="headline-feature" style="max-width: 100%">
277  <h2 style="border-bottom: 1px solid #ccc; padding-bottom: 1em; margin-bottom: 0; margin-top: 0"><?php esc_html_e( 'What&rsquo;s New', 'gk-gravityview' ); ?></h2>
278  </div>
279 
280  <p>2.17 on February 13, 2023</p>
281 
282  <p><strong>Note: GravityView now requires PHP 7.2 or newer</strong></p>
283 
284  <ul>
285  <li>It's faster than ever to create a new View! (Table and DataTables View types only)
286  <ul>
287  <li>Fields configured in the <a href="https://docs.gravityforms.com/entries/#h-entry-columns">Gravity Forms Entry Columns</a> are added to the Multiple Entries layout</li>
288  <li>The first field in the Multiple Entries layout is linked to the Single Entry layout</li>
289  <li>All form fields are added to the Single Entry layout</li>
290  <li>An Edit Entry Link field is added to the bottom of the Single Entry layout</li>
291  </ul></li>
292  <li>Added: New "No Entries Behavior" setting: when a View has no entries visible to the current user, you can now choose to display a message, show a Gravity Forms form, or redirect to a URL</li>
293  <li>Modified: The field picker now uses Gravity Forms field icons</li>
294  <li>Fixed: <a href="https://docs.gravitykit.com/article/701-show-choices-that-exist">"Pre-filter choices"</a> Search Bar setting not working for Address fields</li>
295  <li>Fixed: <code>[gventry]</code> shortcode not working the Entry ID is set to "first" or "last"</li>
296  <li>Fixed: Fatal error when using the Gravity Forms Survey Add-On</li>
297  <li>Tweak: The field picker in the View editor now uses Gravity Forms field icons</li>
298  </ul>
299 
300  <p><strong>Developer Updates:</strong></p>
301 
302  <ul>
303  <li>Modified: If you use the <code>gravityview/template/text/no_entries</code> or <code>gravitview_no_entries_text</code> filters, the output is now passed through the <code>wpautop()</code> function prior to applying the filters, not after
304  <ul>
305  <li>Added <code>$unformatted_output</code> parameter to the <code>gravityview/template/text/no_entries</code> filter to return the original value before being passed through <code>wpautop()</code></li>
306  </ul></li>
307  <li>Modified: Container classes for no results output change based on the "No Entries Behavior" setting:
308  <ul>
309  <li><code>.gv-no-results.gv-no-results-text</code> when set to "Show a Message"</li>
310  <li><code>.gv-no-results.gv-no-results-form</code> when set to "Display a Form"</li>
311  <li>Updated <code>templates/views/list/list-body.php</code>, <code>templates/views/table/table-body.php</code></li>
312  </ul></li>
313  <li>Added: <code>$form_id</code> parameter to <code>gravityview_get_directory_fields()</code> function and <code>GVCommon::get_directory_fields()</code> method</li>
314  </ul>
315 
316  <p>2.16.6 on January 12, 2023</p>
317 
318  <ul>
319  <li>Fixed: Fatal error due to an uncaught PHP exception</li>
320  <li>Fixed: It was not possible to select any content inside the field settings window in the View editor</li>
321  </ul>
322 
323  <p>2.16.5 on January 5, 2023</p>
324 
325  <ul>
326  <li>Updated: <a href="https://www.gravitykit.com/foundation/">Foundation</a> to version 1.0.8</li>
327  <li>Improved: Internal changes to allow using Custom Content fields on the Edit Screen with the <a href="https://www.gravitykit.com/extensions/diy-layout/">DIY Layout</a></li>
328  </ul>
329 
330  <h3>2.16.4 on December 23, 2022</h3>
331 
332  <ul>
333  <li>Fixed: Prevent possible conflict in the View editor with themes/plugins that use Bootstrap's tooltip library</li>
334  </ul>
335 
336  <h3>2.16.3 on December 21, 2022</h3>
337 
338  <ul>
339  <li>Fixed: Caching wouldn't always clear when an entry was added or modified</li>
340  <li>Fixed: Fatal error on some hosts due to a conflict with one of the plugin dependencies (psr/log)</li>
341  <li>Fixed: PHP 8.1 notices</li>
342  <li>Fixed: View scripts and styles not loading for some logged-in users</li>
343  </ul>
344 
345  <h3>2.16.2 on December 14, 2022</h3>
346 
347  <ul>
348  <li>Fixed: Views would take an abnormally long time to load</li>
349  <li>Fixed: Fatal error on some hosts that use weak security keys and salts</li>
350  </ul>
351 
352  <h3>2.16.1 on December 7, 2022</h3>
353 
354  <ul>
355  <li>Fixed: Date picker and other JavaScript not working on the Edit Entry screen</li>
356  <li>Fixed: JavaScript error preventing the Search Bar widget properties from opening when creating a new View</li>
357  <li>Fixed: CodeMirror editor initializing multiple times when opening the custom content field properties in the View</li>
358  <li>Fixed: Secure download link for the file upload field was not showing the file name as the link text</li>
359  <li>Fixed: The saved View would not recognize fields added from a joined form when using the <a href="https://www.gravitykit.com/extensions/multiple-forms/">Multiple Forms</a> extension</li>
360  </ul>
361 
362  <h3>2.16.0.4 on December 2, 2022</h3>
363 
364  <ul>
365  <li>Fixed: Incompatibility with some plugins/themes that could result in a blank WordPress Dashboard</li>
366  </ul>
367 
368  <h3>2.16.0.3 on December 2, 2022</h3>
369 
370  <ul>
371  <li>Fixed: Fatal error when downloading plugin translations</li>
372  </ul>
373 
374  <h3>2.16.0.2 on December 1, 2022</h3>
375 
376  <ul>
377  <li>Fixed: Fatal error when Maps isn't installed</li>
378  </ul>
379 
380  <h3>2.16.0.1 on December 1, 2022</h3>
381 
382  <ul>
383  <li>Fixed: Admin menu not expanded when on a GravityView page</li>
384  </ul>
385 
386  <h3>2.16 on December 1, 2022</h3>
387 
388  <ul>
389  <li>Added: New WordPress admin menu where you can now centrally manage all your GravityKit product
390  licenses and settings (<a href='https://www.gravitykit.com/foundation/'>learn more about the new
391  GravityKit menu</a>)
392  <ul>
393  <li>Go to the WordPress sidebar and check out the GravityKit menu!</li>
394  <li>We have automatically migrated your existing licenses and settings, which were
395  previously entered in the Views→Settings page
396  </li>
397  <li>Request support using the 'Grant Support Access' menu item</li>
398  </ul>
399  </li>
400  <li>Added: Support for defining <code>alt</code> text in File Upload fields</li>
401  <li>Added: 'Pre-Filter Choices' Search Bar setting will only display choices that exist in submitted
402  entries (<a href='https://docs.gravitykit.com/article/701-s'>learn more about Pre-Filter
403  Choices</a>)
404  </li>
405  <li>Improved: When creating a new View, it is now possible to install a View type (if included in
406  the license) straight from the View editor
407  </li>
408  <li>Improved: Reduce the number of queries when displaying a View</li>
409  <li>Improved: The Edit View screen loads faster</li>
410  <li>Fixed: Merge Tags were not processed inside Custom Content fields when using the <a
411  href='https://docs.gravitykit.com/article/463-gventry-shortcode'><code>[gventry]</code>
412  edit mode</a></li>
413  <li>Fixed: Gravity Forms poll results was not being refreshed after editing a Poll field in
414  GravityView Edit Entry
415  </li>
416  <li>Fixed: Survey field 'Rating' stars were not displaying properly in the frontend</li>
417  <li>Fixed: JavaScript error when creating a new View</li>
418  <li>Fixed: JavaScript error when opening field settings in a new View</li>
419  <li>Fixed: Merge Tag picker not initializing when changing View type for an existing View</li>
420  <li>Fixed: 'Field connected to XYZ field was deleted from the form' notice when adding a new field
421  to a View created from a form preset
422  </li>
423  <li>Fixed: Edit Entry may partially save changes if form fields have conditional logic; thanks,
424  Jurriaan!
425  </li>
426  <li>Fixed: View presets not working</li>
427  <li>Fixed: 'This View is configured using the View type, which is disabled' notice when creating a
428  new View after activating or installing a View type (e.g., Maps, DIY, DataTables)
429  </li>
430  <li>Fixed: Incorrect search mode is set when one of the View search widget fields uses a 'date
431  range' input type
432  </li>
433  <li>Fixed: Multiple files upload error (e.g., when editing an entry using GravityEdit)</li>
434  </ul>
435 
436  <p><strong>Developer Updates:</strong></p>
437 
438  <ul>
439  <li>Added: <code>gravityview/template/field/survey/rating/before</code> filter that fires before the
440  Survey field rating stars markup
441  </li>
442  <li>Added: <code>$return_view</code> parameter to <code>\GV\Request::is_view()</code> method,
443  reducing the need to build a \GV\View object when simply checking if a request is a View
444  </li>
445  <li>Added: <code>$expiration</code> parameter to <code>GravityView_Cache::set()</code> method to
446  allow for different cache lifetimes
447  </li>
448  <li>Fixed: <code>GravityView_Cache</code> was not used when the <code>WP_DEBUG</code> constant was
449  set to <code>true</code>. This resulted in the cache being effectively disabled on many sites.
450  <ul>
451  <li>Improved: Only run <code>GravityView_Cache::use_cache()</code> once per request</li>
452  <li>Added: <code>GRAVITYVIEW_DISABLE_CACHE</code> constant to disable the cache. Note:
453  <code>gravityview_use_cache</code> filter will still be run.
454  </li>
455  </ul>
456  </li>
457  </ul>
458 
459 
460  <h3>2.15 on September 21, 2022</h3>
461 
462  <ul>
463  <li>Added: Entire View contents are wrapped in a container, allowing for better styling (<a href='https://docs.gravitykit.com/article/867-modifying-the-view-container-div'>learn about, and how to modify, the container</a>)</li>
464  <li>Added: When submitting a search form, the page will scroll to the search form</li>
465  <li>Modified: Select and Multiselect search inputs will now use the connected field's "Placeholder" values, if defined in Gravity Forms (<a href="https://docs.gravitykit.com/article/866-search-bar-placeholder">read about Search Bar placeholders</a>)</li>
466  <li>Improved: Date comparisons when using <code>[gvlogic]</code> with <code>greater_than</code> or <code>less_than</code> comparisons</li>
467  <li>Fixed: Reduced the number of database queries to render a View, especially when using Custom Content, Entry Link, Edit Link, and Delete Link fields</li>
468  <li>Fixed: Removed the Gravity Forms Partial Entries Add-On privacy notice when using Edit Entry because auto-saving in Edit Entry is not supported</li>
469  <li>Fixed: The "entry approval is changed" notification, if configured, was being sent for new form submissions</li>
470  <li>Fixed: Views would not render in PHP 8.1</li>
471  <li>Fixed: Multiple PHP 8 and PHP 8.1 warnings</li>
472  </ul>
473 
474  <p><strong>Developer Updates:</strong></p>
475 
476  <ul>
477  <li>Added: <code>gravityview/widget/search/append_view_id_anchor</code> filter to control appending the unique View anchor ID to the search URL (enabled by default)</li>
478  <li>Added: <code>gravityview/view/wrapper_container</code> filter to wrap to optionally wrap the View in a container (enabled by default) — <a href="https://docs.gravitykit.com/article/867-modifying-the-view-container-div">see examples of modifying the container</a></li>
479  <li>Added: <code>gravityview/view/anchor_id</code> filter to control the unique View anchor ID</li>
480  <li>Modified the following template files:
481  <ul>
482  <li><code>includes/widgets/search-widget/templates/search-field-multiselect.php</code></li>
483  <li><code>includes/widgets/search-widget/templates/search-field-select.php</code></li>
484  <li><code>templates/views/list.php</code></li>
485  <li><code>templates/views/table.php</code></li>
486  <li><code>templates/fields/field-custom.php</code></li>
487  <li><code>templates/fields/field-duplicate_link-html.php</code></li>
488  <li><code>templates/fields/field-delete_link-html.php</code></li>
489  <li><code>templates/fields/field-edit_link-html.php</code></li>
490  <li><code>templates/fields/field-entry_link-html.php</code></li>
491  <li><code>templates/fields/field-website-html.php</code></li>
492  <li><code>templates/deprecated/fields/custom.php</code></li>
493  <li><code>templates/deprecated/fields/website.php</code></li>
494  </ul>
495  </li>
496  </ul>
497 
498  <h3>2.14.7 on July 31, 2022</h3>
499 
500  <ul>
501  <li>Fixed: GravityView plugin updates were not shown in the plugin update screen since version 2.14.4 (April 27, 2022)</li>
502  </ul>
503 
504  <h3>2.14.6 on May 27, 2022</h3>
505 
506  <ul>
507  <li><a href='https://www.gravitykit.com/rebrand/'>GravityView (the company) is now GravityKit!</a>
508  </li>
509  <li>Fixed: Embedding Edit Entry context directly in a page/post using the <code>[gventry
510  edit='1']</code> shortcode (<a
511  href='https://docs.gravitykit.com/article/463-gventry-shortcode'>learn more</a>)
512  </li>
513  <li>Fixed: Edit Entry link wasn't working in the Single Entry context of an embedded View</li>
514  <li>Fixed: Search Bar GravityView widget was not saving the chosen fields</li>
515  <li>Fixed: Gravity PDF shortcodes would not be processed when bulk-approving entries using
516  GravityView. Thanks, Jake!
517  </li>
518  <li>Fixed: Sometimes embedding a GravityView shortcode in the block editor could cause a fatal
519  error
520  </li>
521  <li>Fixed: Multiple PHP 8 warnings</li>
522  </ul>
523 
524  <p><strong>Developer Updates:</strong></p>
525 
526  <ul>
527  <li>Added: <code>redirect_url</code> parameter to the <code>gravityview/edit_entry/success</code>
528  filter
529  </li>
530  <li>Added <code>redirect_url</code> and <code>back_link</code> parameters to the <code>gravityview/shortcodes/gventry/edit/success</code>
531  filter
532  </li>
533  </ul>
534 
535  <h3>2.14.5 on May 4, 2022</h3>
536 
537  <ul>
538  <li>Added: A link that allows administrators to disable the "Show only approved entries" View setting from the front-end</li>
539  <li>Fixed: Configuring new Search Bar WordPress widgets wasn't working in WordPress 5.8+</li>
540  <li>Fixed: Styling of form settings dropdowns on the Gravity Forms "Forms" page</li>
541  </ul>
542 
543  <h3>2.14.4 on April 27, 2022</h3>
544 
545  <ul>
546  <li>Added: Search Bar support for the <a
547  href='https://www.gravityforms.com/add-ons/chained-selects/'>Chained Selects</a> field
548  type
549  </li>
550  <li>Improved: Plugin updater script now supports auto-updates and better supports multisite
551  installations
552  </li>
553  <li>Improved: If a View does not support joined forms, log as a notice, not an error</li>
554  <li>Fixed: Merge Tag picker behavior when using Gravity Forms 2.6</li>
555  <li>Fixed: Deleting a file when editing an entry as a non-administrator user on Gravity Forms 2.6.1
556  results in a server error
557  </li>
558  <li>Fixed: When The Events Calendar Pro plugin is active, Views became un-editable</li>
559  <li>Tweak: Additional translation strings related to View editing</li>
560  </ul>
561 
562  <p>Note: We will be requiring Gravity Forms 2.5 and WordPress 5.3 in the near future; please upgrade!</p>
563 
564  <p><strong>Developer Updates:</strong></p>
565 
566  <ul>
567  <li>Added: Search URLs now support <code>input_{field ID}</code> formats as well as <code>filter_{field
568  ID}</code>; the following will both be treated the same:
569  <ul>
570  <li><code>/view/example/?filter_3=SEARCH</code></li>
571  <li><code>/view/example/?input_3=SEARCH</code></li>
572  </ul>
573  </li>
574  <li>Added: In the admin, CSS classes are now added to the <code>body</code> tag based on Gravity
575  Forms version. See <code>GravityView_Admin_Views::add_gf_version_css_class()</code></li>
576  <li>Modified: Allow non-admin users with 'edit entry' permissions to delete uploaded files</li>
577  <li>Updated: EDD<em>SL</em>Plugin_Updater script to version 1.9.1</li>
578  </ul>
579 
580  <h3>2.14.3 on March 24, 2022</h3>
581 
582  <ul>
583  <li>Added: Support for displaying WebP images</li>
584  <li>Improved: Internal logging of notices and errors</li>
585  <li>Fixed: Images hosted on Dropbox sometimes would not display properly on the Safari browser. Thanks, Kevin M. Dean!</li>
586  </ul>
587 
588  <p><strong>Developer Updates:</strong></p>
589 
590  <ul>
591  <li>Added: <code>GravityView_Image::get_image_extensions()</code> static method to fetch full list of extension types interpreted as images by GravityView.</li>
592  <li>Added: <code>webp</code> as a valid image extension</li>
593  </ul>
594 
595  <h3>2.14.2.1 on March 11, 2022</h3>
596 
597  <ul>
598  <li>Fixed: Empty values in search widget fields may return incorrect results</li>
599  </ul>
600 
601  <p><strong>Developer Updates:</strong></p>
602 
603  <ul>
604  <li>
605  Added: <code>gravityview/search/ignore-empty-values</code> filter to control strict matching of empty field values
606  </li>
607 
608  </ul>
609 
610  <h3>2.14.2 on March 10, 2022</h3>
611 
612  <ul>
613  <li>Fixed: Potential fatal error on PHP 8 when exporting View entries in CSV and TSV formats</li>
614  <li>Fixed: Search widget would cause a fatal error when the Number field is used with the "is" operator</li>
615  <li>Fixed: Search widget returning incorrect results when a field value is blank and the operator is set to "is"</li>
616  <li>Fixed: Gravity Forms widget icon not showing</li>
617  <li>Fixed: Gravity Forms widget not displaying available forms when the View is saved</li>
618  </ul>
619 
620  <h3>2.14.1 on January 25, 2022</h3>
621 
622  <ul>
623  <li>Tested with WordPress 5.9</li>
624  <li>Improved: The <a href='https://wordpress.org/plugins/members/'>Members plugin</a> now works with
625  No-Conflict Mode enabled
626  </li>
627  <li>Improved: Performance when saving Views with many fields</li>
628  <li>Improved: Performance when loading the Edit View screen when a View has many fields</li>
629  <li>Fixed: Gravity Forms widget used in the View editor would initialize on all admin pages</li>
630  <li>Fixed: PHP notice when editing an entry in Gravity Forms that was created by user that no longer
631  exists
632  </li>
633  <li>Fixed: Error activating on sites that use the Danish language</li>
634  <li>Fixed: Entry approval scripts not loading properly when using Full Site Editing themes in
635  WordPress 5.9
636  </li>
637  <li>Updated: TrustedLogin client to Version 1.2, which now supports logins for WordPress Multisite
638  installations
639  </li>
640  <li>Updated: Polish translation. Thanks, Dariusz!</li>
641  </ul>
642 
643  <p><strong>Developer Updates:</strong></p>
644 
645  <ul>
646  <li>Modified: Refactored drag &amp; drop in the View editor to improve performance: we only
647  initialize drag &amp; drop on the active tab instead of globally.
648  <ul>
649  <li>Added: <code>gravityview/tab-ready</code> jQuery trigger to <code>body</code> when each
650  GravityView tab is ready (drag &amp; drop initialized). <a
651  href='https://gist.github.com/zackkatz/a2844e9f6b68879e79ba7d6f66ba0850'>See
652  example of binding to this event</a>.
653  </li>
654  </ul>
655  </li>
656  </ul>
657 
658  <h3>2.14 on December 21, 2021</h3>
659 
660  <p>This would be a minor version update (2.13.5), except that we renamed many functions. See 'Developer
661  Updates' for this release below.</p>
662 
663  <ul>
664  <li>Added: <code>{is_starred}</code> Merge Tag. <a
665  href='https://docs.gravityview.co/article/820-the-isstarred-merge-tag'>Learn more about
666  using <code>{is_starred}</code></a></li>
667  <li>Fixed: Media files uploaded to Dropbox were not properly embedded</li>
668  <li>Fixed: JavaScript error when trying to edit entry's creator</li>
669  <li>Fixed: Recent Entries widget would cause a fatal error on WP 5.8 or newer</li>
670  <li>Fixed: When using Multiple Forms, editing an entry in a joined form now works properly if the
671  "Edit Entry" tab has not been configured
672  </li>
673  <li>Fixed: View settings not hiding automatically on page load</li>
674  </ul>
675 
676  <p><strong>Developer Updates:</strong></p>
677 
678  <p>We renamed all instances of <code>blacklist</code> to <code>blocklist</code> and
679  <code>whitelist</code> to <code>allowlist</code>. All methods and filters have been deprecated using
680  <code>apply_filters_deprecated()</code> and <code>_deprecated_function()</code>. <a
681  href="https://docs.gravityview.co/article/816-renamed-filters-methods-in-2-14">See a
682  complete list of modified methods and filters</a>.</p>
683 
684  <p style="text-align: center;">
685  <a href="https://www.gravitykit.com/changelog/" class="aligncenter button button-primary button-hero" style="margin: 0 auto; display: inline-block; text-transform: capitalize"><?php esc_html_e( 'View change history', 'gk-gravityview' ); ?></a>
686  </p>
687 
688  <div class="clear"></div>
689  </div>
690 
691  </div>
692  <?php
693  }
694 
695  /**
696  * Render Credits Screen
697  *
698  * @since 1.0
699  * @return void
700  */
701  public function credits_screen() { ?>
702  <div class="wrap about-wrap">
703 
704  <?php $this->tabs(); ?>
705 
706  <style>
707  .feature-section h3 a {
708  text-decoration: none;
709  display: inline-block;
710  margin-left: .2em;
711  line-height: 1em;
712  }
713  .about-wrap .cols {
714  display: flex;
715  flex-wrap: wrap;
716  flex-direction: row;
717  justify-content: space-between;
718  }
719  .col {
720  width: 45%;
721  margin-right: 5%;
722  }
723  .col h4 {
724  font-weight: 400;
725  margin-top: 0;
726  }
727  .cols .col p img {
728  float: left;
729  margin: 0 15px 10px 0;
730  max-width: 200px;
731  border-radius: 20px;
732  }
733  </style>
734 
735  <h2><?php _e( 'GravityView is brought to you by:', 'gk-gravityview' ); ?></h2>
736 
737  <div class="cols">
738 
739  <div class="col">
740  <h3>Zack Katz <a href="https://twitter.com/zackkatz"><span class="dashicons dashicons-twitter" title="Follow Zack on Twitter"></span></a> <a href="https://katz.co" title="View Zack&rsquo;s website"><span class="dashicons dashicons-admin-site"></span></a></h3>
741  <h4>Project Lead &amp; Developer</h4>
742  <p><img alt="Zack Katz" src="<?php echo plugins_url( 'assets/images/team/Zack.jpg', GRAVITYVIEW_FILE ); ?>" width="94" height="94" />Zack has been developing WordPress plugins since 2008 and has been a huge Gravity Forms fan from the start. Zack is co-owner of GravityKit and he lives with his wife in Leverett, Massachusetts. He can&rsquo;t wait for the next episode of <a href="https://atp.fm">ATP</a> or <a href="https://www.flophousepodcast.com">The Flop House</a> podcasts.</p>
743  </div>
744 
745  <div class="col">
746  <h3>Rafael Ehlers <a href="https://twitter.com/rafaehlers" title="Follow Rafael on Twitter"><span class="dashicons dashicons-twitter"></span></a> <a href="https://heropress.com/essays/journey-resilience/" title="View Rafael&rsquo;s WordPress Journey"><span class="dashicons dashicons-admin-site"></span></a></h3>
747  <h4>Project Manager, Support Lead &amp; Customer&nbsp;Advocate</h4>
748  <p><img alt="Rafael Ehlers" class="alignleft avatar" src="<?php echo plugins_url( 'assets/images/team/Ehlers.jpg', GRAVITYVIEW_FILE ); ?>" width="94" height="94" />Rafael helps guide GravityKit development priorities and keep us on track. He&rsquo;s the face of our customer support and helps customers get the most out of the product. Rafael hails from <a href="https://wikipedia.org/wiki/Porto_Alegre">Porto Alegre, Brazil</a>.</p>
749  </div>
750 
751  <div class="col">
752  <h3>Vlad K.</h3>
753  <h4>Core Developer</h4>
754  <p><img alt="Vlad K." class="alignleft avatar" src="<?php echo plugins_url( 'assets/images/team/Vlad.jpg', GRAVITYVIEW_FILE ); ?>" width="94" height="94" />Vlad is GravityKit&rsquo;s lead developer. He focuses on GravityKit&rsquo;s user-facing code in the Dashboard and front end. Vlad comes from Russia and lives in Canada.</p>
755  </div>
756 
757  <div class="col">
758  <h3>Rafael Bennemann <a href="https://twitter.com/rafaelbe" title="Follow Rafael on Twitter"><span class="dashicons dashicons-twitter"></span></a></h3>
759  <h4>Support Specialist</h4>
760  <p><img alt="Rafael Bennemann" class="alignleft avatar" src="<?php echo plugins_url( 'assets/images/team/Bennemann.jpg', GRAVITYVIEW_FILE ); ?>" width="94" height="94" />Rafael dedicated most of his adult life to helping people and companies take their ideas to the web, first as a developer and now as a Customer Advocate at GravityKit. He will do his best to help you too, all the while sipping a <a href="https://en.wikipedia.org/wiki/Spritz_Veneziano">Spritz Veneziano</a> in Northern Italy, where he currently lives with his family.</p>
761  </div>
762 
763  <div class='col'>
764  <h3>Casey Burridge</h3>
765  <h4 style='font-weight:0; margin-top:0'>Content Creator</h4>
766  <p><img alt="Casey Burridge" class="alignleft avatar" src="<?php echo plugins_url( 'assets/images/team/Casey.jpg', GRAVITYVIEW_FILE ); ?>" width="94" height="94"/>Casey is GravityKit&rsquo;s resident content creator. He&rsquo;s been a WordPress lover ever since launching his first blog more than 6 years ago. Casey has lived and worked in London and Beijing, but feels most at home in Cape Town, South Africa, where he&rsquo;s originally from.</p>
767  </div>
768  </div>
769 
770  <hr class="clear" />
771 
772  <div class="feature-section">
773  <h2><?php esc_attr_e( 'Contributors', 'gk-gravityview' ); ?></h2>
774 
775  <h4>Development</h4>
776  <ul class="ul-disc">
777  <li>Core &amp; Add-On development by <a href='https://mrcasual.com' class='block'>Vlad K.</a>, <a href='https://katz.co' class='block'>Zack Katz</a>, <a href="https://codeseekah.com" class="block">Gennady Kovshenin</a>, <a href='https://tinygod.pt' class='block'>Luis Godinho</a></li>
778  <li>Code contributions by <a href="https://github.com/ryanduff">@ryanduff</a>, <a href="https://github.com/dmlinn">@dmlinn</a>, <a href="https://github.com/mgratch">@mgratch</a>, <a href="https://github.com/ViewFromTheBox">@ViewFromTheBox</a>, <a href="https://github.com/stevehenty">@stevehenty</a>, <a href="https://github.com/naomicbush">@naomicbush</a>, <a href='https://github.com/mrcasual'>@mrcasual</a> and <a href="https://github.com/rafaehlers">@rafaehlers</a></li>
779  <li>Accessibility contributions by <a href="https://github.com/RianRietveld">@RianRietveld</a></li>
780  </ul>
781 
782  <h4>Translations</h4>
783  <ul class="ul-disc">
784  <li>Bengali translation by <a href="https://www.transifex.com/accounts/profile/tareqhi/">@tareqhi</a></li>
785  <li>German translation by <a href="https://www.transifex.com/user/profile/hubert123456/">@hubert123456</a>, <a href="https://www.transifex.com/accounts/profile/seschwarz/">@seschwarz</a>, <a href="https://www.transifex.com/accounts/profile/abdmc/">@abdmc</a>, <a href="https://www.transifex.com/accounts/profile/deckerweb/">@deckerweb</a></li>
786  <li>Turkish translation by <a href="https://www.transifex.com/accounts/profile/suhakaralar/">@suhakaralar</a></li>
787  <li>Dutch translation by <a href="https://www.transifex.com/accounts/profile/leooosterloo/">@leooosterloo</a>, <a href="https://www.transifex.com/accounts/profile/Weergeven/">@Weergeven</a>, and <a href="https://www.transifex.com/accounts/profile/erikvanbeek/">@erikvanbeek</a>, and <a href="https://www.transifex.com/user/profile/SilverXp/">Thom (@SilverXp)</a></li>
788  <li>Hungarian translation by <a href="https://www.transifex.com/accounts/profile/dbalage/">@dbalage</a> and <a href="https://www.transifex.com/accounts/profile/Darqebus/">@Darqebus</a></li>
789  <li>Italian translation by <a href="https://www.transifex.com/accounts/profile/Lurtz/">@Lurtz</a> and <a href="https://www.transifex.com/accounts/profile/ClaraDiGennaro/">@ClaraDiGennaro</a></li>
790  <li>French translation by <a href="https://www.transifex.com/accounts/profile/franckt/">@franckt</a> and <a href="https://www.transifex.com/accounts/profile/Newbdev/">@Newbdev</a></li>
791  <li>Portuguese translation by <a href="https://www.transifex.com/accounts/profile/luistinygod/">@luistinygod</a>, <a href="https://www.transifex.com/accounts/profile/marlosvinicius.info/">@marlosvinicius</a>, and <a href="https://www.transifex.com/user/profile/rafaehlers/">@rafaehlers</a></li>
792  <li>Romanian translation by <a href="https://www.transifex.com/accounts/profile/ArianServ/">@ArianServ</a></li>
793  <li>Finnish translation by <a href="https://www.transifex.com/accounts/profile/harjuja/">@harjuja</a></li>
794  <li>Spanish translation by <a href="https://www.transifex.com/accounts/profile/jorgepelaez/">@jorgepelaez</a>, <a href="https://www.transifex.com/accounts/profile/luisdiazvenero/">@luisdiazvenero</a>, <a href="https://www.transifex.com/accounts/profile/josemv/">@josemv</a>, <a href="https://www.transifex.com/accounts/profile/janolima/">@janolima</a> and <a href="https://www.transifex.com/accounts/profile/matrixmercury/">@matrixmercury</a>, <a href="https://www.transifex.com/user/profile/jplobaton/">@jplobaton</a></li>
795  <li>Swedish translation by <a href="https://www.transifex.com/accounts/profile/adamrehal/">@adamrehal</a></li>
796  <li>Indonesian translation by <a href="https://www.transifex.com/accounts/profile/sariyanta/">@sariyanta</a></li>
797  <li>Norwegian translation by <a href="https://www.transifex.com/accounts/profile/aleksanderespegard/">@aleksanderespegard</a></li>
798  <li>Danish translation by <a href="https://www.transifex.com/accounts/profile/jaegerbo/">@jaegerbo</a></li>
799  <li>Chinese translation by <a href="https://www.transifex.com/user/profile/michaeledi/">@michaeledi</a></li>
800  <li>Persian translation by <a href="https://www.transifex.com/user/profile/azadmojtaba/">@azadmojtaba</a>, <a href="https://www.transifex.com/user/profile/amirbe/">@amirbe</a>, <a href="https://www.transifex.com/user/profile/Moein.Rm/">@Moein.Rm</a></li>
801  <li>Russian translation by <a href="https://www.transifex.com/user/profile/gkovaleff/">@gkovaleff</a>, <a href="https://www.transifex.com/user/profile/awsswa59/">@awsswa59</a></li>
802  <li>Polish translation by <a href="https://www.transifex.com/user/profile/dariusz.zielonka/">@dariusz.zielonka</a></li>
803  </ul>
804 
805  <h3><?php esc_attr_e( 'Want to contribute?', 'gk-gravityview' ); ?></h3>
806  <p><?php echo sprintf( esc_attr__( 'If you want to contribute to the code, %syou can on Github%s. If your contributions are accepted, you will be thanked here.', 'gk-gravityview'), '<a href="https://github.com/gravityview/GravityView">', '</a>' ); ?></p>
807  </div>
808 
809  <hr class="clear" />
810 
811  <div class="changelog">
812 
813  <h3>Thanks to the following open-source software:</h3>
814 
815  <ul class="ul-disc">
816  <li><a href="https://datatables.net/">DataTables</a> - amazing tool for table data display. Many thanks!</li>
817  <li><a href="https://github.com/10up/flexibility">Flexibility</a> - Adds support for CSS flexbox to Internet Explorer 8 &amp; 9</li>
818  <li><a href="https://github.com/GaryJones/Gamajo-Template-Loader">Gamajo Template Loader</a> - makes it easy to load template files with user overrides</li>
819  <li><a href="https://github.com/carhartl/jquery-cookie">jQuery Cookie plugin</a> - Access and store cookie values with jQuery</li>
820  <li><a href="https://www.gravitykit.com/gravityforms">Gravity Forms</a> - If Gravity Forms weren't such a great plugin, GravityView wouldn't exist!</li>
821  <li>GravityView uses icons made by Freepik, Adam Whitcroft, Amit Jakhu, Zurb, Scott de Jonge, Yannick, Picol, Icomoon, TutsPlus, Dave Gandy, SimpleIcon from <a href="https://www.flaticon.com" title="Flaticon">www.flaticon.com</a></li>
822  <li>GravityView uses free vector art by <a href="https://www.vecteezy.com">vecteezy.com</a></li>
823  <li><a href="https://github.com/jnicol/standalone-phpenkoder">PHPEnkoder</a> script encodes the email addresses.</li>
824  <li>The Duplicate View functionality is based on the excellent <a href="https://lopo.it/duplicate-post-plugin/">Duplicate Post plugin</a> by Enrico Battocchi</li>
825  <li>Browser testing by <a href="https://www.browserstack.com">BrowserStack</a></li>
826  <li><a href="https://easydigitaldownloads.com/downloads/software-licensing/">Easy Digital Downloads</a> makes auto-upgrades possible</li>
827  </ul>
828 
829  </div>
830 
831  </div>
832  <?php
833  }
834 
835 
836  /**
837  * Sends user to the Welcome page on first activation of GravityView as well as each
838  * time GravityView is upgraded to a new version
839  *
840  * @since 1.0
841  * @return void
842  */
843  public function welcome() {
844  global $plugin_page;
845 
846  // Bail if we're just editing the plugin
847  if( $plugin_page === 'plugin-editor.php' ) { return; }
848 
849  // Bail if no activation redirect
850  if ( ! get_transient( '_gv_activation_redirect' ) ) { return; }
851 
852  // Delete the redirect transient
853  delete_transient( '_gv_activation_redirect' );
854 
855  $upgrade = get_option( 'gv_version_upgraded_from' );
856 
857  // Don't do anything if they've already seen the new version info
858  if( $upgrade === GV_PLUGIN_VERSION ) {
859  return;
860  }
861 
862  // Add "Upgraded From" Option
863  update_option( 'gv_version_upgraded_from', GV_PLUGIN_VERSION );
864 
865  // Bail if activating from network, or bulk
866  if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { return; }
867 
868  // First time install
869  if( ! $upgrade ) {
870  wp_safe_redirect( admin_url( 'admin.php?page=gv-getting-started' ) ); exit;
871  }
872  // Update
873  else {
874  wp_safe_redirect( admin_url( 'admin.php?page=gv-changelog' ) ); exit;
875  }
876  }
877 }
const GV_PLUGIN_VERSION(! GravityKit\GravityView\Foundation\meets_min_php_version_requirement(__FILE__, '7.2.0'))
Constants.
Definition: gravityview.php:34
static get_directory_fields( $post_id, $apply_filter=true, $form_id=0)
Get the field configuration for the View.
gravityview_get_floaty( $height=87, $css_class=null)
Get an image of our intrepid explorer friend.
welcome()
Sends user to the Welcome page on first activation of GravityView as well as each time GravityView is...
gravityview_get_directory_fields( $post_id, $apply_filter=true, $form_id=0)
Get the field configuration for the View.
getting_started_screen()
Render About Screen.
Handle caching using transients for GravityView.
Definition: class-cache.php:6
set( $content, $filter_name='', $expiration=null)
Cache content as a transient.
is_dashboard_page( $is_page=false, $hook=NULL)
Is this page a GV dashboard page?
__construct()
Get things started.
new GravityView_Welcome
GravityView_Welcome Class.
add_gf_version_css_class( $class)
Allow targeting different versions of Gravity Forms using CSS selectors.
if(empty( $created_by)) $form_id
is_view( $return_view=true)
The current $post is a View, no?
scale description ul
gravityview()
The main GravityView wrapper function.
use_cache()
Check whether to use cached results, if available.
static get_image_extensions()
Returns an array of file extensions recognized by GravityView as images.
tabs()
Navigation tabs.