Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Freemius/wordpress-sdk i…
Browse files Browse the repository at this point in the history
…nto develop

* 'develop' of https://github.com/Freemius/wordpress-sdk:
  [connect] [text] [minor]
  [add-ons] [auto-install] Fixes related to add-ons and the autoinstall mechanism.
  [add-ons] [bug-fix] The "View details" button's text was actually empty.
  • Loading branch information
vovafeldman committed Dec 19, 2017
2 parents dc95762 + 6b7835a commit 004bfcc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
11 changes: 6 additions & 5 deletions includes/class-freemius.php
Original file line number Diff line number Diff line change
Expand Up @@ -13792,7 +13792,7 @@ function _install_premium_version_ajax_action() {
) );
}

$plugin_id = fs_request_get( 'module_id', $this->get_id() );
$plugin_id = fs_request_get( 'target_module_id', $this->get_id() );

if ( ! FS_Plugin::is_valid_id( $plugin_id ) ) {
// Invalid ID.
Expand Down Expand Up @@ -13910,10 +13910,11 @@ function _add_auto_installation_dialog_box() {
}
}

$vars = array(
'id' => $plugin_id,
'slug' => $this->_slug,
);
$vars = array(
'id' => $this->_module_id,
'target_module_id' => $plugin_id,
'slug' => $this->_slug,
);

fs_require_template( 'auto-installation.php', $vars );
}
Expand Down
2 changes: 1 addition & 1 deletion templates/add-ons.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class="fs-price"><?php
echo implode(' - ', $descriptors) ?></span>
</li>
<li class="fs-description"><?php echo ! empty( $addon->info->short_description ) ? $addon->info->short_description : 'SHORT DESCRIPTION' ?></li>
<li class="fs-cta"><a class="button"><?php fs_esc_html_inline( 'View details', 'view-details', $slug ) ?></a></li>
<li class="fs-cta"><a class="button"><?php fs_esc_html_echo_inline( 'View details', 'view-details', $slug ) ?></a></li>
</ul>
</div>
</li>
Expand Down
15 changes: 8 additions & 7 deletions templates/auto-installation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
/**
* @var array $VARS
*/
$slug = $VARS['slug'];
$plugin_id = $VARS['id'];
$slug = $VARS['slug'];
$plugin_id = $VARS['target_module_id'];

$fs = freemius( $plugin_id );
$fs = freemius( $VARS['id'] );

$action = $fs->is_tracking_allowed() ?
'stop_tracking' :
Expand Down Expand Up @@ -145,10 +145,11 @@ class="button button-primary"><?php fs_esc_html_echo_inline( 'Install Now', 'ins
$modal.find('.fs-ajax-loader').show();

var data = {
action : '<?php echo $fs->get_ajax_action( 'install_premium_version' ) ?>',
security : '<?php echo $fs->get_ajax_security( 'install_premium_version' ) ?>',
slug : '<?php echo $slug ?>',
module_id: '<?php echo $plugin_id ?>'
action : '<?php echo $fs->get_ajax_action( 'install_premium_version' ) ?>',
security : '<?php echo $fs->get_ajax_security( 'install_premium_version' ) ?>',
slug : '<?php echo $slug ?>',
module_id : '<?php echo $fs->get_id() ?>',
target_module_id: '<?php echo $plugin_id ?>'
};

if (requireCredentials) {
Expand Down
2 changes: 1 addition & 1 deletion templates/connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class="wrap<?php if ( ! $fs->is_enable_anonymous() || $is_pending_activation ||
placeholder="<?php fs_esc_attr_echo_inline( 'License key', 'license-key', $slug ) ?>" tabindex="1"/>
<i class="dashicons dashicons-admin-network"></i>
<a class="show-license-resend-modal show-license-resend-modal-<?php echo $fs->get_unique_affix() ?>"
href="#"><?php fs_esc_html_echo_inline( "Can't find your license key?", 'cant-find-license-key' ); ?></a>
href="#"><?php fs_esc_html_echo_inline( "Can't find your license key?", 'cant-find-license-key', $slug ); ?></a>
</div>
<?php endif ?>
</div>
Expand Down

0 comments on commit 004bfcc

Please sign in to comment.