Skip to content

Commit

Permalink
Merge pull request #1011 from gravityview/develop
Browse files Browse the repository at this point in the history
2.0.1
  • Loading branch information
zackkatz authored May 9, 2018
2 parents 5e9bea4 + 4206cfc commit ff34a2d
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 16 deletions.
8 changes: 6 additions & 2 deletions future/_mocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function GravityView_frontend_get_view_entries( $args, $form_id, $parameters, $c
* @deprecated
* Do not use this filter anymore.
*/
$entries = apply_filters( 'gravityview_entries', $entries, $criteria, $parameters, $count );
$entries = apply_filters_ref_array( 'gravityview_entries', array( $entries, $criteria, $parameters, &$count ) );

return array( $entries, $paging, $count );
}
Expand Down Expand Up @@ -322,10 +322,14 @@ function GravityView_API_field_label( $form, $field_settings, $entry, $force_sho
break;
endswitch;

if( $force_show_label ) {
$field_settings['show_label'] = '1';
}

/** Add the field settings. */
$field->update_configuration( $field_settings );

if ( ! empty( $field->show_label ) || $force_show_label ) {
if ( ! empty( $field->show_label ) ) {

$label = $field->get_label( null, isset( $gf_form ) ? $gf_form : null, $entry );

Expand Down
3 changes: 3 additions & 0 deletions future/_stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class GravityView_Extension {

function __construct() {
}

function add_notice() {
}
}

function gravityview() {
Expand Down
4 changes: 4 additions & 0 deletions future/includes/class-gv-field-gravityforms.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ public function get_label( View $view = null, Source $source = null, Entry $entr
return $label;
}

if ( ! $this->show_label ) {
return '';
}

if ( ! $source || ! is_object( $source ) || ! is_a( $source, '\GV\GF_Form' ) ) {
gravityview()->log->error( '$source is not a valid \GV\GF_Form instance' );
return null;
Expand Down
4 changes: 4 additions & 0 deletions future/includes/class-gv-field-internal.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public function get_label( View $view = null, Source $source = null, Entry $entr
return $label;
}

if ( ! $this->show_label ) {
return '';
}

return $this->field ? $this->field->label : $this->label;
}

Expand Down
2 changes: 1 addition & 1 deletion future/includes/class-gv-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ public function offsetGet( $offset ) {
case 'template_id':
return $this->settings->get( 'template' );
case 'widgets':
return $this->widgets->to_configuration();
return $this->widgets->as_configuration();
}
}

Expand Down
6 changes: 3 additions & 3 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: 2.0
* Version: 2.0.1
* Author: GravityView
* Author URI: https://gravityview.co
* Text Domain: gravityview
Expand All @@ -22,7 +22,7 @@
/**
* The plugin version.
*/
define( 'GV_PLUGIN_VERSION', '2.0' );
define( 'GV_PLUGIN_VERSION', '2.0.1' );

/**
* Full path to the GravityView file
Expand Down Expand Up @@ -221,7 +221,7 @@ public static function is_admin() {
*/
public function frontend_actions( $force = false ) {
gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
return gravityview()->plugin->include_legacy_frontend( $force );
gravityview()->plugin->include_legacy_frontend( $force );
}

/**
Expand Down
8 changes: 8 additions & 0 deletions includes/class-admin-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ public function changelog_screen() {
</ul>
</div>

<h3>2.0.1 on May 9, 2018</h3>
<ul>
<li>Fixed: Hide labels if "Show Label" is not checked</li>
<li>Fixed: CSS borders on List layout</li>
<li>Fixed: Error when fetching GravityView Widget with DataTables Extension 2.2</li>
<li>Fixed: Fail gracefully when GravityView Maps is installed on a server running PHP 5.2.4</li>
</ul>

<h3>1.22.6 on April 4, 2018</h3>

<ul>
Expand Down
12 changes: 6 additions & 6 deletions languages/gravityview.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is distributed under the GPLv2 or later.
msgid ""
msgstr ""
"Project-Id-Version: GravityView 2.0\n"
"Project-Id-Version: GravityView 2.0.1\n"
"Report-Msgid-Bugs-To: https://gravityview.co/support/\n"
"POT-Creation-Date: 2018-05-08 22:37:16+00:00\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -1482,23 +1482,23 @@ msgstr ""
msgid "What&rsquo;s New"
msgstr ""

#: includes/class-admin-welcome.php:379
#: includes/class-admin-welcome.php:387
msgid "View change history"
msgstr ""

#: includes/class-admin-welcome.php:400
#: includes/class-admin-welcome.php:408
msgid "GravityView is brought to you by:"
msgstr ""

#: includes/class-admin-welcome.php:435
#: includes/class-admin-welcome.php:443
msgid "Contributors"
msgstr ""

#: includes/class-admin-welcome.php:460
#: includes/class-admin-welcome.php:468
msgid "Want to contribute?"
msgstr ""

#: includes/class-admin-welcome.php:461
#: includes/class-admin-welcome.php:469
msgid ""
"If you want to contribute to the code, %syou can on Github%s. If your "
"contributions are accepted, you will be thanked here."
Expand Down
7 changes: 7 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ Beautifully display your Gravity Forms entries. Learn more on [gravityview.co](h

== Changelog ==

= 2.0.1 on May 9, 2018 =

* Fixed: Hide labels if "Show Label" is not checked
* Fixed: CSS borders on List layout
* Fixed: Error when fetching GravityView Widget with DataTables Extension 2.2
* Fixed: Fail gracefully when GravityView Maps is installed on a server running PHP 5.2.4

= Version 2.0 on May 8, 2018 =

We are proud to share this release with you: we have been working on this release since 2016, and although most of the changes won’t be seen, GravityView has a brand-new engine that will power the plugin into the future! 🚀
Expand Down
2 changes: 1 addition & 1 deletion templates/css/list-view-rtl.css

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

2 changes: 1 addition & 1 deletion templates/css/list-view.css

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

5 changes: 5 additions & 0 deletions templates/css/source/list-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ $color-description: #999;
margin-bottom: 1em;
}

.gv-list-multiple-container {
border: none;
margin-bottom: 0;
}

// 3.1. Title
// ------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions tests/unit-tests/GravityView_Widget_Search_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private function _test_word_splitting() {
// Test dates
$_GET = array(
'gv_start' => $start,
'gv_end' => $end,
'gv_end' => $end,
);

$search_criteria_dates = array(
Expand Down Expand Up @@ -351,7 +351,7 @@ public function test_search_limited_fields() {
public function test_filter_entries_gv_start_end_time() {
$_GET = array(
'gv_start' => '2018-04-07',
'gv_end' => '2018-04-07',
'gv_end' => '2018-04-07',
);

$view = $this->factory->view->create_and_get( array(
Expand Down

0 comments on commit ff34a2d

Please sign in to comment.