Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.22 #919

Merged
merged 33 commits into from
Sep 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d6a58a3
GF 2.2 test fixes
soulseekah Jul 13, 2017
9ac1ac9
Fix transient cache issues when invalidating cache
soulseekah Aug 1, 2017
e8866ab
Improve multiform cache invalidation
soulseekah Aug 1, 2017
06f3a9b
Divide by zero error
soulseekah Aug 3, 2017
14bf456
Support arrays with empty values in `gv_empty`
soulseekah Aug 8, 2017
fc9b14f
Tiny bugfix
soulseekah Aug 8, 2017
7328575
Fixes #887
zackkatz Aug 17, 2017
9f26300
Fixes fatal error reported
zackkatz Aug 18, 2017
9612e88
Minor fixes for tests to launch work with 2.1
soulseekah Aug 16, 2017
58f395c
Stub remote HTTP calls
soulseekah Aug 16, 2017
8bb2c95
Edit Entry GF 2.3 support
soulseekah Aug 16, 2017
71b449e
Uninstall table name fixing
soulseekah Aug 16, 2017
3c505e2
Add back-compatibility with 2.2
soulseekah Aug 16, 2017
a3ac75f
CI test changes for GF 2.3 compatibility
soulseekah Aug 22, 2017
9e41e82
Merge branch 'develop-gf22-tests' into develop
soulseekah Aug 22, 2017
8dea89d
Merge branch 'develop-gf23' into develop
soulseekah Aug 22, 2017
a8554cd
Add additional CSS classes to container <div>s
zackkatz Sep 1, 2017
a1e7b88
Improve GRAVITYVIEW_LICENSE_KEY experience
zackkatz Sep 1, 2017
f93b5a2
Improve readme
zackkatz Sep 1, 2017
700ee9d
Load plugin/hooks compat hooks later
soulseekah Sep 2, 2017
772d093
Prevent Elegant Themes sidebar render in the admin
soulseekah Sep 2, 2017
ab2815b
Merge branch 'master' into develop
soulseekah Sep 2, 2017
02c687c
Merge branch 'develop' of github.com:gravityview/GravityView into dev…
soulseekah Sep 2, 2017
bf6f494
Merge branch 'develop' into fix/914
soulseekah Sep 2, 2017
61b96cb
Fix empty( constant ) syntax error
soulseekah Sep 2, 2017
1999406
Merge branch 'develop' into fix/914
soulseekah Sep 2, 2017
38ab867
Update readme
zackkatz Sep 4, 2017
a55ed0f
Merge pull request #918 from gravityview/fix/914
zackkatz Sep 4, 2017
9dbfffe
Minified files got moar mini
zackkatz Sep 4, 2017
5b3fb57
Update translation file
zackkatz Sep 4, 2017
6adc783
Version bump
zackkatz Sep 4, 2017
235e9c4
Merge remote-tracking branch 'origin/develop' into develop
zackkatz Sep 4, 2017
740101a
Fix CSS changes that break back-compatibility
zackkatz Sep 4, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ branches:
- master
- develop
- 2.0
- test

php:
- 5.3
Expand All @@ -24,6 +23,7 @@ php:

env:
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=latest WP_MULTISITE=0 GF_VERSION=2.3
- WP_VERSION=4.0 WP_MULTISITE=0

matrix:
Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin-edd-license.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/admin-views.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/field-approval.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions future/_mocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,12 @@ function GravityView_frontend_get_view_entries( $args, $form_id, $parameters, $c
$entries = $form->entries
->filter( \GV\GF_Entry_Filter::from_search_criteria( $criteria['search_criteria'] ) )
->offset( $args['offset'] )
->limit( $criteria['paging']['page_size'] )
->page( ( ( $criteria['paging']['offset'] - $args['offset'] ) / $criteria['paging']['page_size'] ) + 1 );
->limit( $criteria['paging']['page_size'] );

if ( $criteria['paging']['page_size'] ) {
$entries = $entries->page( ( ( $criteria['paging']['offset'] - $args['offset'] ) / $criteria['paging']['page_size'] ) + 1 );
}

if ( ! empty( $criteria['sorting'] ) ) {
$field = new \GV\Field();
$field->ID = $criteria['sorting']['key'];
Expand Down
4 changes: 2 additions & 2 deletions gravityview.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: GravityView
* Plugin URI: https://gravityview.co
* Description: The best, easiest way to display Gravity Forms entries on your website.
* Version: 1.21.5.3
* Version: 1.22
* Author: GravityView
* Author URI: https://gravityview.co
* Text Domain: gravityview
Expand Down Expand Up @@ -79,7 +79,7 @@
*/
final class GravityView_Plugin {

const version = '1.21.5.3';
const version = '1.22';

private static $instance;

Expand Down
20 changes: 20 additions & 0 deletions includes/class-admin-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,26 @@ public function changelog_screen() {
<h2 style="border-bottom: 1px solid #ccc; padding-bottom: 1em; margin-bottom: 0;"><?php esc_html_e( 'What&rsquo;s New', 'gravityview' ); ?></h2>
</div>

<h3>1.22 on September 4, 2017</h3>

<ul>
<li>Added: Support for Gravity Forms 2.3</li>
<li>Fixed: Inline Edit plugin not working when displaying a single entry</li>
<li>Fixed: Featured Entries plugin not adding correct CSS selector to the single entry container</li>
</ul>

<p><strong>Developer Updates:</strong></p>

<ul>
<li>Modified: Template files <code>list-header.php</code>, <code>list-single.php</code>, <code>table-header.php</code>, <code>table-single.php</code></li>
<li>Fixed: When <code>GRAVITYVIEW_LICENSE_KEY</code> constant is defined, it will always be used, and the license field will be disabled</li>
<li>Fixed: List View and Table View templates have more standardized CSS selectors for single &amp; multiple contexts (<a href="http://docs.gravityview.co/article/63-css-guide">Learn more</a>)</li>
<li>Fixed: Permalink issue when embedding a View on a page, then making it the site&#39;s Front Page</li>
<li>Fixed: Transient cache issues when invalidating cache</li>
<li>Fixed: <code>gv_empty()</code> now returns false for an array with all empty values</li>
<li>Fixed: Delay plugin compatibility checks until <code>plugins_loaded</code></li>
</ul>

<h3>1.21.5.3 on July 24, 2017</h3>

<ul>
Expand Down
4 changes: 4 additions & 0 deletions includes/class-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,10 @@ public static function directory_link( $post_id = NULL, $add_query_args = true )
// @since 1.3
$link = wp_cache_get( 'gv_directory_link_'.$post_id );

if( (int) $post_id === (int) get_option( 'page_on_front' ) ) {
$link = home_url();
}

if( empty( $link ) ) {

$link = get_permalink( $post_id );
Expand Down
21 changes: 13 additions & 8 deletions includes/class-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ protected function get_cache_key_prefix( $form_ids = NULL ) {

// Normally just one form, but supports multiple forms
//
// Array of IDs 12, 5, 14 would result in `f-12f-5f-14`
$forms = 'f:' . implode( '&f:', (array) $form_ids );
// Array of IDs 12, 5, 14 would result in `f:12-f:5-f:14`
$forms = 'f:' . implode( '-f:', (array) $form_ids );

// Prefix for transient keys
// Now the prefix would be: `gv-cache-f-12f-5f-14`
// Now the prefix would be: `gv-cache-f:12-f:5-f:14-`
return 'gv-cache-' . $forms . '-';

}
Expand Down Expand Up @@ -408,7 +408,7 @@ public function delete( $form_ids = NULL ) {

foreach ( (array) $form_ids as $form_id ) {

$key = $this->get_cache_key_prefix( $form_id );
$key = '_transient_gv-cache-';

// WordPress 4.0+
if ( is_callable( array( $wpdb, 'esc_like' ) ) ) {
Expand All @@ -417,15 +417,20 @@ public function delete( $form_ids = NULL ) {
$key = like_escape( $key );
}

$key = "%" . $key . "%";
$form_id = intval( $form_id );

$sql = $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE `option_name` LIKE %s", $key );
// Find the transients containing this form
$key = "$key%f:$form_id-%"; // \_transient\_gv-cache-%f:1-% for example
$sql = $wpdb->prepare( "SELECT option_name FROM {$wpdb->options} WHERE `option_name` LIKE %s", $key );

$result = $wpdb->query( $sql );
foreach ( ( $transients = $wpdb->get_col( $sql ) ) as $transient ) {
// We have to delete it via the API to make sure the object cache is updated appropriately
delete_transient( preg_replace( '#^_transient_#', '', $transient ) );
}

do_action( 'gravityview_log_debug', 'GravityView_Cache[delete] Deleting cache for form #' . $form_id, array(
$sql,
sprintf( 'Deleted results: %d', $result )
sprintf( 'Deleted results: %d', count( $transients ) )
) );
}

Expand Down
3 changes: 1 addition & 2 deletions includes/class-gravityview-entry-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ function __construct( $entries = array(), $post_id = 0, $form = array(), $link_f
$this->link_format = $link_format;
$this->after_link = $after_link;
$this->context = $context;
$this->empty_message = gv_no_results();

$this->empty_message = function_exists( 'gv_no_results' ) ? gv_no_results() : __('No entries match your request.', 'gravityview');
}

/**
Expand Down
Loading