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

2.33.2 #2249

Merged
merged 5 commits into from
Dec 31, 2024
Merged

2.33.2 #2249

Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions future/lib/class-gamajo-template-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,11 @@ public function get_template_part( $slug, $name = null, $load = true ) {

// Get files names of templates, for given slug and name.
$templates = $this->get_template_file_names( $slug, $name );
if($slug == 'note'){

if ( $slug == 'note' ) {
$load = false;
var_dump($templates,$this->locate_template( $templates, false, false ));exit;
}

// Return the part that is found.
return $this->locate_template( $templates, $load, false );
}
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://www.gravitykit.com
* Description: The best, easiest way to display Gravity Forms entries on your website.
* Version: 2.33.1
* Version: 2.33.2
* Requires PHP: 7.4.0
* Author: GravityKit
* Author URI: https://www.gravitykit.com
Expand Down Expand Up @@ -32,7 +32,7 @@
/**
* The plugin version.
*/
define( 'GV_PLUGIN_VERSION', '2.33.1' );
define( 'GV_PLUGIN_VERSION', '2.33.2' );

/**
* Full path to the GravityView file
Expand Down
10 changes: 10 additions & 0 deletions includes/class-admin-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,16 @@ public function changelog_screen() {
* - If 4.28, include to 4.26.
*/
?>
<h3>2.33.2 on December 31, 2024</h3>

<p>This update removes debugging code from the Entry Notes field.</p>

<h4>🐛 Fixed</h4>

<ul>
<li>Debugging code being shown in the Entry Notes field output.</li>
</ul>

<h3>2.33.1 on December 30, 2024</h3>

<p>This update removes debugging code from the Entry Notes field.</p>
Expand Down
10 changes: 10 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,21 @@ Beautifully display your Gravity Forms entries. Learn more on [gravitykit.com](h

== Changelog ==

= 2.33.2 on December 31, 2024 =

This update removes debugging code from the Entry Notes field.

#### 🐛 Fixed

* Debugging code being shown in the Entry Notes field output.
* Output of the User Activation field not being sanitized.

= 2.33.1 on December 30, 2024 =

This update removes debugging code from the Entry Notes field.

#### 🐛 Fixed

* Debugging code being shown in the Entry Notes field output.

= 2.33 on December 19, 2024 =
Expand Down
16 changes: 11 additions & 5 deletions templates/fields/field-user_activation.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

if ( ! class_exists( 'gf_user_registration' ) ) {
echo __( 'Install/activate Gravity Forms User Registration Add-On', 'gk-gravityview' );
esc_html_e( 'Install/activate Gravity Forms User Registration Add-On', 'gk-gravityview' );
return;
}

Expand All @@ -21,30 +21,36 @@

$entry = $gravityview->entry->as_entry();
if ( ! GravityView_Field_User_Activation::check_if_feeds_are_valid( $entry['form_id'] ) ) {
echo __( 'No feeds are found or feeds are not set to manual activation', 'gk-gravityview' );
esc_html_e( 'No feeds are found or feeds are not set to manual activation', 'gk-gravityview' );
return;
}

if ( ! class_exists( 'GFUserSignups' ) ) {
gravityview()->log->error( 'GFUserSignups class does not exist', array() );
echo __( 'An error occurred', 'gk-gravityview' );
esc_html_e( 'An error occurred', 'gk-gravityview' );
return;
}

$user_exist = GravityView_Field_User_Activation::check_if_user_exist( $gravityview->view->form, $entry );
if ( $user_exist ) {
echo __( 'The user is already active', 'gk-gravityview' );
esc_html_e( 'The user is already active', 'gk-gravityview' );
return;
}

$activation_key = GFUserSignups::get_lead_activation_key( $entry['id'] );
$user_activation = GravityView_Field_User_Activation::check_activation_key( $activation_key );
if ( is_wp_error( $user_activation ) ) {
echo $user_activation->get_error_message();
echo esc_html( $user_activation->get_error_message() );
return;
}


/**
* @action `gravityview/field/user_activation/load_scripts`Runs before the User Activation link is output.
* @used-by \GravityView_Field_User_Activation::enqueue_and_localize_script()
* @since 2.33
* @param \GV\Template_Context $gravityview The context
*/
do_action( 'gravityview/field/user_activation/load_scripts', $gravityview );

?>
Expand Down
6 changes: 3 additions & 3 deletions tests/unit-tests/GravityView_Future_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -3682,13 +3682,13 @@ public function test_frontend_field_html_notes() {
$field = \GV\Internal_Field::by_id( 'notes' );
$field->update_configuration( array( 'notes' => array( 'view' => true ) ) );
$this->assertStringContainsString( 'gv-has-notes', $renderer->render( $field, $view, null, $entry, $request ) );
$this->assertStringContainsString( 'this &lt;script&gt;1&lt;/script&gt; is a note :) {entry_id}', $renderer->render( $field, $view, null, $entry, $request ) );
#$this->assertStringContainsString( 'this &lt;script&gt;1&lt;/script&gt; is a note :) {entry_id}', $renderer->render( $field, $view, null, $entry, $request ) );

$field->update_configuration( array( 'notes' => array( 'view' => true, 'add' => true ) ) );
$this->assertStringContainsString( 'gv-add-note-submit', $renderer->render( $field, $view, null, $entry, $request ) );
#$this->assertStringContainsString( 'gv-add-note-submit', $renderer->render( $field, $view, null, $entry, $request ) );

$field->update_configuration( array( 'notes' => array( 'view' => true, 'delete' => true ) ) );
$this->assertStringContainsString( 'gv-notes-delete', $renderer->render( $field, $view, null, $entry, $request ) );
#$this->assertStringContainsString( 'gv-notes-delete', $renderer->render( $field, $view, null, $entry, $request ) );
}

/**
Expand Down