Skip to content

Commit

Permalink
Showing 31 changed files with 245 additions and 163 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"type": "wordpress-plugin",
"description": "The best way to display Gravity Forms entries on your website.",
"keywords": ["gravityview", "gravity view", "gravity forms directory", "gravity forms"],
"homepage": "https://gravityview.co/",
"homepage": "https://www.gravitykit.com/",
"license": "GPL-2.0+",
"minimum-stability": "dev",
"prefer-stable": true,
6 changes: 3 additions & 3 deletions future/includes/class-gv-extension.php
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
*/
abstract class Extension {
/**
* @var string Name of the plugin in gravityview.co
* @var string Name of the plugin in gravitykit.com
*/
protected $_title = NULL;

@@ -23,7 +23,7 @@ abstract class Extension {
protected $_version = NULL;

/**
* @var int The ID of the download on gravityview.co
* @var int The ID of the download on gravitykit.com
* @since 1.1
*/
protected $_item_id = NULL;
@@ -51,7 +51,7 @@ abstract class Extension {
/**
* @var string The URL to fetch license info from. Do not change unless you know what you're doing.
*/
protected $_remote_update_url = 'https://gravityview.co';
protected $_remote_update_url = 'https://www.gravitykit.com';

/**
* @var string Author of plugin, sent when fetching license info.
12 changes: 6 additions & 6 deletions future/includes/class-gv-license-handler.php
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ class License_Handler {

const name = 'GravityView';
const author = 'Katz Web Services, Inc.';
const url = 'https://gravityview.co';
const url = 'https://www.gravitykit.com';

/**
* Post ID on gravityview.co
@@ -299,7 +299,7 @@ public function license_details( $response = array() ) {

$login_link_class = gravityview()->plugin->is_GF_25() ? 'button button-outline outline' : 'text-link';
$renews_on = ( 'lifetime' === $response['expires'] ) ? '' : sprintf( esc_html__( 'Renew on: %s', 'gravityview' ), date_i18n( get_option( 'date_format' ), strtotime( $response['expires'] ) - DAY_IN_SECONDS ) );
$login_link = sprintf( '<a href="%s" class="gv-access-account ' . $login_link_class . '" rel="external">%s</a>', esc_url( sprintf( 'https://gravityview.co/wp-login.php?username=%s', $response['customer_email'] ) ), esc_html__( 'Access your GravityView account', 'gravityview' ) );
$login_link = sprintf( '<a href="%s" class="gv-access-account ' . $login_link_class . '" rel="external">%s</a>', esc_url( sprintf( 'https://www.gravitykit.com/wp-login.php?username=%s', $response['customer_email'] ) ), esc_html__( 'Access your GravityView account', 'gravityview' ) );
$local_text = ( ! empty( $response['is_local'] ) ? '<span class="howto">' . __( 'This development site does not count toward license activation limits', 'gravityview' ) . '</span>' : '' );
$license_limit = empty( $response['license_limit'] ) ? __( 'Unlimited', 'gravityview' ) : (int) $response['license_limit'];

@@ -429,10 +429,10 @@ public function strings( $status = NULL, $license_data = null ) {
'failed' => esc_html__( 'Could not deactivate the license. The license key you attempted to deactivate may not be active or valid.', 'gravityview' ),
'site_inactive' => esc_html__( 'The license key is valid, but it has not been activated for this site.', 'gravityview' ),
'inactive' => esc_html__( 'The license key is valid, but it has not been activated for this site.', 'gravityview' ),
'no_activations_left' => esc_html__( 'Invalid: this license has reached its activation limit.', 'gravityview' ) . ' ' . sprintf( esc_html__( 'You can manage license activations %son your GravityView account page%s.', 'gravityview' ), '<a href="https://gravityview.co/account/#licenses">', '</a>' ),
'no_activations_left' => esc_html__( 'Invalid: this license has reached its activation limit.', 'gravityview' ) . ' ' . sprintf( esc_html__( 'You can manage license activations %son your GravityView account page%s.', 'gravityview' ), '<a href="https://www.gravitykit.com/account/#licenses">', '</a>' ),
'deactivated' => esc_html__( 'The license has been deactivated.', 'gravityview' ),
'valid' => esc_html__( 'The license key is valid and active.', 'gravityview' ),
'disabled' => sprintf( esc_html__( 'This license key is disabled. For updates and support, %spurchase a new license%s.', 'gravityview' ), '<a href="https://gravityview.co/account/">', '</a>' ),
'disabled' => sprintf( esc_html__( 'This license key is disabled. For updates and support, %spurchase a new license%s.', 'gravityview' ), '<a href="https://www.gravitykit.com/account/">', '</a>' ),
'invalid' => esc_html__( 'The license key entered is invalid.', 'gravityview' ),
'invalid_item_id' => esc_html__( 'This license key does not have access to this plugin.', 'gravityview' ),
'missing' => esc_html__( 'The license key entered is invalid.', 'gravityview' ), // Missing is "the license couldn't be found", not "you submitted an empty license"
@@ -466,9 +466,9 @@ private function get_license_renewal_url( $license_data ) {
if ( ! empty( $license_data->renewal_url ) ) {
$renew_license_url = $license_data->renewal_url;
} elseif( ! empty( $license_data->license_key ) ) {
$renew_license_url = sprintf( 'https://gravityview.co/checkout/?download_id=17&edd_license_key=%s', $license_data->license_key );
$renew_license_url = sprintf( 'https://www.gravitykit.com/checkout/?download_id=17&edd_license_key=%s', $license_data->license_key );
} else {
$renew_license_url = 'https://gravityview.co/account/';
$renew_license_url = 'https://www.gravitykit.com/account/';
}

$renew_license_url = add_query_arg( wp_parse_args( 'utm_source=admin_notice&utm_medium=admin&utm_content=expired&utm_campaign=Activation&force_login=1' ), $renew_license_url );
4 changes: 2 additions & 2 deletions future/includes/class-gv-settings-addon.php
Original file line number Diff line number Diff line change
@@ -814,7 +814,7 @@ public function license_key_notice() {
$update_below = __( 'Activate your license key below.', 'gravityview' );
break;
}
$url = 'https://gravityview.co/pricing/?utm_source=admin_notice&utm_medium=admin&utm_content=' . $license_status . '&utm_campaign=Admin%20Notice';
$url = 'https://www.gravitykit.com/pricing/?utm_source=admin_notice&utm_medium=admin&utm_content=' . $license_status . '&utm_campaign=Admin%20Notice';

// Show a different notice on settings page for inactive licenses (hide the buttons)
if ( $update_below && gravityview()->request->is_admin( '', 'settings' ) ) {
@@ -973,7 +973,7 @@ public function app_settings_fields() {

$disabled_attribute = \GVCommon::has_cap( 'gravityview_edit_settings' ) ? false : 'disabled';

$affiliate_link = 'https://gravityview.co/account/affiliate/?utm_source=in-plugin&utm_medium=setting&utm_content=Register as an affiliate';
$affiliate_link = 'https://www.gravitykit.com/account/affiliate/?utm_source=in-plugin&utm_medium=setting&utm_content=Register as an affiliate';

$fields = array(
array(
28 changes: 17 additions & 11 deletions future/includes/class-gv-shortcode-gventry.php
Original file line number Diff line number Diff line change
@@ -160,6 +160,10 @@ public function callback( $atts, $content = '', $tag = '' ) {
}
}

if ( \GV\Utils::get( $_GET, 'edit' ) && \GV\Utils::get( $_GET, 'gvid' ) ) {
$atts['edit'] = 1;
}

if ( $atts['edit'] ) {
/**
* Based on code in our unit-tests.
@@ -185,21 +189,23 @@ public function callback( $atts, $content = '', $tag = '' ) {
\GravityView_Edit_Entry::get_nonce_key( $view->ID, $form['id'], $entry['id'] )
);

add_filter( 'gravityview/edit_entry/success', $callback = function( $message ) use ( $view, $entry, $atts ) {
$message = __( 'Entry Updated', 'gravityview' );

add_filter( 'gravityview/edit_entry/success', $callback = function ( $message, $_view_id, $_entry, $back_link, $redirect_url ) use ( $view, $entry, $atts ) {
/**
* @filter `gravityview/shortcodes/gventry/edit/success` Modify the edit entry success message in [gventry].
* @since develop
* @param string $message The message.
* @param \GV\View $view The View.
* @param \GV\Entry $entry The entry.
* @param array $atts The attributes.
*
* @since develop
*
* @param string $message The message.
* @param \GV\View $view The View.
* @param \GV\Entry $entry The entry.
* @param array $atts The attributes.
* @param string $back_link URL to return to the original entry. @since 2.14.6
* @param string|null $redirect_url URL to return to after the update. @since 2.14.6
*/
return apply_filters( 'gravityview/shortcodes/gventry/edit/success', $message, $view, $entry, $atts );
} );
return apply_filters( 'gravityview/shortcodes/gventry/edit/success', $message, $view, $entry, $atts, $back_link, $redirect_url );
}, 10, 5 );

ob_start() && $render->init( $data, \GV\Entry::by_id( $entry['id'] ), $view );
ob_start() && $render->init( $data, \GV\GF_Entry::by_id( $entry['id'] ), $view );
$output = ob_get_clean(); // Render :)

remove_filter( 'gravityview/is_single_entry', '__return_true' );
2 changes: 1 addition & 1 deletion future/includes/class-gv-widget.php
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ abstract class Widget {
* Supports these icon formats:
* - Gravity Forms icon class: The string starts with "gform-icon". Note: the site must be running GF 2.5+. No need to also pass "gform-icon".
* - Dashicons: The string starts with "dashicons". No need to also pass "dashicons".
* - Inline SVG: Starts with "data:"
* - Inline SVG: Starts with "data:". Note: No single quotes are allowed!
* - If not matching those formats, the value will be used as a CSS class in a `<i>` element.
*
* @see GravityView_Admin_View_Item::getOutput
10 changes: 5 additions & 5 deletions gravityview.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/**
* Plugin Name: GravityView
* Plugin URI: https://gravityview.co
* Plugin URI: https://www.gravitykit.com
* Description: The best, easiest way to display Gravity Forms entries on your website.
* Version: 2.14.5
* Author: GravityView
* Author URI: https://gravityview.co
* Version: 2.14.6
* Author: GravityKit
* Author URI: https://www.gravitykit.com
* Text Domain: gravityview
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -22,7 +22,7 @@
/**
* The plugin version.
*/
define( 'GV_PLUGIN_VERSION', '2.14.5' );
define( 'GV_PLUGIN_VERSION', '2.14.6' );

/**
* Full path to the GravityView file
4 changes: 2 additions & 2 deletions includes/admin/class.render.settings.php
Original file line number Diff line number Diff line change
@@ -459,7 +459,7 @@ public static function render_field_options( $form_id, $field_type, $template_id
* @param mixed $curr_value Current value of option
* @return string HTML output of option
*/
public static function render_field_option( $name = '', $option = array(), $curr_value = NULL ) {
public static function render_field_option( $name = '', $option = array(), $curr_value = null ) {

$output = '';

@@ -719,7 +719,7 @@ public static function render_textarea_option( $name = '', $id = '', $current =
* @param string $current [current value]
* @return string [html tags]
*/
public static function render_select_option( $name = '', $id = '', $choices, $current = '' ) {
public static function render_select_option( $name = '', $id = '', $choices = array(), $current = '' ) {

_deprecated_function( __METHOD__, '1.2', 'GravityView_FieldType_select::render_input' );

2 changes: 1 addition & 1 deletion includes/admin/metaboxes/views/select-template.php
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@
<?php } ?>

<?php if( ! empty( $template['license'] ) ) { ?>
<p class="gv-included-in"><?php echo sprintf( esc_html__( 'This layout is included in the %s license.', 'gravityview' ), '<a href="https://gravityview.co/pricing/' . esc_attr( $utm_string ) . '" rel="noreferrer noopener external">' . esc_html( str_replace( ' ', '&nbsp;', $template['license'] ) ) . '</a>' ); ?></p>
<p class="gv-included-in"><?php echo sprintf( esc_html__( 'This layout is included in the %s license.', 'gravityview' ), '<a href="https://www.gravitykit.com/pricing/' . esc_attr( $utm_string ) . '" rel="noreferrer noopener external">' . esc_html( str_replace( ' ', '&nbsp;', $template['license'] ) ) . '</a>' ); ?></p>
<?php } ?>
<?php }

6 changes: 3 additions & 3 deletions includes/class-admin-installer.php
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
*/
class GravityView_Admin_Installer {

const EDD_API_URL = 'https://gravityview.co/edd-api/products/';
const EDD_API_URL = 'https://www.gravitykit.com/edd-api/products/';

const EDD_API_KEY = 'e4c7321c4dcf342c9cb078e27bf4ba97';

@@ -497,7 +497,7 @@ private function get_download_display_details( $download, $wp_plugins ) {
$status_label = '';
$button_label = sprintf( __( 'Upgrade to %s for Access', 'gravityview' ), $required_license );
$button_class = 'button-primary button-large';
$href = 'https://gravityview.co/pricing/?utm_source=admin-installer&utm_medium=admin&utm_campaign=Admin%20Notice&utm_content=' . $required_license;
$href = 'https://www.gravitykit.com/pricing/?utm_source=admin-installer&utm_medium=admin&utm_campaign=Admin%20Notice&utm_content=' . $required_license;
}

elseif ( ! empty( $download_info['coming_soon'] ) ) {
@@ -506,7 +506,7 @@ private function get_download_display_details( $download, $wp_plugins ) {
$status_label = __( 'Coming Soon', 'gravityview' );
$button_label = __( 'Learn More', 'gravityview' );
$button_class = 'button-primary button-large';
$href = \GV\Utils::get( $download_info, 'link', 'https://gravityview.co/extensions/' );
$href = \GV\Utils::get( $download_info, 'link', 'https://www.gravitykit.com/extensions/' );
}

// Access but the plugin is not installed
8 changes: 4 additions & 4 deletions includes/class-admin-views.php
Original file line number Diff line number Diff line change
@@ -235,7 +235,7 @@ public static function render_setting_row( $key = '', $current_settings = array(
* @deprecated since 1.2
* Start using GravityView_Render_Settings::render_field_option
*/
public static function render_field_option( $name = '', $option, $curr_value = NULL ) {
public static function render_field_option( $name = '', $option = array(), $curr_value = null ) {
_deprecated_function( 'GravityView_Admin_Views::render_field_option', '1.1.7', 'GravityView_Render_Settings::render_field_option' );
return GravityView_Render_Settings::render_field_option( $name, $option, $curr_value );
}
@@ -424,12 +424,12 @@ public function tooltips( $tooltips = array() ) {
/**
* Add the Data Source information
*
* @param null $column_name
* @param $post_id
* @param null $column_name Name of the column in the Views table.
* @param int $post_id Post ID.
*
* @return void
*/
public function add_custom_column_content( $column_name = NULL, $post_id ) {
public function add_custom_column_content( $column_name = null, $post_id = 0 ) {

$output = '';

37 changes: 34 additions & 3 deletions includes/class-admin-welcome.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @package GravityView
* @author Zack Katz <zack@gravityview.co>
* @link https://gravityview.co
* @link https://www.gravitykit.com
* @copyright Copyright 2014, Katz Web Services, Inc.
*
* @since 1.0.0
@@ -261,6 +261,37 @@ public function changelog_screen() {
<h2 style="border-bottom: 1px solid #ccc; padding-bottom: 1em; margin-bottom: 0; margin-top: 0"><?php esc_html_e( 'What&rsquo;s New', 'gravityview' ); ?></h2>
</div>

<h3>2.14.6 on May 27, 2022</h3>

<ul>
<li><a href='https://www.gravitykit.com/rebrand/'>GravityView (the company) is now GravityKit!</a>
</li>
<li>Fixed: Embedding Edit Entry context directly in a page/post using the <code>[gventry
edit='1']</code> shortcode (<a
href='https://docs.gravitykit.com/article/463-gventry-shortcode'>learn more</a>)
</li>
<li>Fixed: Edit Entry link wasn't working in the Single Entry context of an embedded View</li>
<li>Fixed: Search Bar GravityView widget was not saving the chosen fields</li>
<li>Fixed: Gravity PDF shortcodes would not be processed when bulk-approving entries using
GravityView. Thanks, Jake!
</li>
<li>Fixed: Sometimes embedding a GravityView shortcode in the block editor could cause a fatal
error
</li>
<li>Fixed: Multiple PHP 8 warnings</li>
</ul>

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

<ul>
<li>Added: <code>redirect_url</code> parameter to the <code>gravityview/edit_entry/success</code>
filter
</li>
<li>Added <code>redirect_url</code> and <code>back_link</code> parameters to the <code>gravityview/shortcodes/gventry/edit/success</code>
filter
</li>
</ul>

<h3>2.14.5 on May 4, 2022</h3>

<ul>
@@ -491,7 +522,7 @@ public function changelog_screen() {
</ul>

<p style="text-align: center;">
<a href="https://gravityview.co/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', 'gravityview' ); ?></a>
<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', 'gravityview' ); ?></a>
</p>

<div class="clear"></div>
@@ -605,7 +636,7 @@ public function credits_screen() { ?>
<li><a href="https://github.com/10up/flexibility">Flexibility</a> - Adds support for CSS flexbox to Internet Explorer 8 &amp; 9</li>
<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>
<li><a href="https://github.com/carhartl/jquery-cookie">jQuery Cookie plugin</a> - Access and store cookie values with jQuery</li>
<li><a href="https://gravityview.co/gravityforms">Gravity Forms</a> - If Gravity Forms weren't such a great plugin, GravityView wouldn't exist!</li>
<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>
<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>
<li>GravityView uses free vector art by <a href="https://www.vecteezy.com">vecteezy.com</a></li>
<li><a href="https://github.com/jnicol/standalone-phpenkoder">PHPEnkoder</a> script encodes the email addresses.</li>
2 changes: 1 addition & 1 deletion includes/class-api.php
Original file line number Diff line number Diff line change
@@ -1387,7 +1387,7 @@ function gravityview_get_files_array( $value, $gv_class = '', $context = null )
*
* @todo use GF's field get_export_value() instead
*
* @see https://gravityview.co/support/documentation/201608159 Read how to modify the link
* @see https://docs.gravitykit.com/article/59-modify-the-map-it-address-link Read how to modify the link
* @param string $address Address
* @return string URL of link to map of address
*/
10 changes: 5 additions & 5 deletions includes/class-frontend-views.php
Original file line number Diff line number Diff line change
@@ -1550,13 +1550,13 @@ public static function add_style( $template_id ) {
*
* @since 1.7
*
* @param string $label Field label
* @param array $field Field settings
* @param array $form Form object
* @param string $label Field label.
* @param array $field Field settings.
* @param array $form Form object.
*
* @return string Field Label
* @return string Field Label.
*/
public function add_columns_sort_links( $label = '', $field, $form ) {
public function add_columns_sort_links( $label = '', $field = array(), $form = array() ) {

/**
* Not a table-based template; don't add sort icons
Loading

0 comments on commit 36d3593

Please sign in to comment.