Skip to content

Commit

Permalink
Merge pull request #249 from Freemius/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
vovafeldman authored Aug 7, 2018
2 parents c189ba8 + f68b066 commit 3ba7c2a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
17 changes: 13 additions & 4 deletions includes/class-freemius.php
Original file line number Diff line number Diff line change
Expand Up @@ -15590,7 +15590,8 @@ private function _store_site( $store = true, $network_level_or_blog_id = null, F
return;
}

$encrypted_site = clone ( is_object( $site ) ? $site : $this->_site );
$site_clone = is_object( $site ) ? $site : $this->_site;
$encrypted_site = clone $site_clone;

$sites = self::get_all_sites( $this->_module_type, $network_level_or_blog_id );

Expand Down Expand Up @@ -18442,7 +18443,15 @@ function _contact_page_render() {
$this->_logger->entrance();

$vars = array( 'id' => $this->_module_id );
fs_require_once_template( 'contact.php', $vars );

/**
* Added filter to the template to allow developers wrapping the template
* in custom HTML (e.g. within a wizard/tabs).
*
* @author Vova Feldman (@svovaf)
* @since 2.1.3
*/
echo $this->apply_filters( 'templates/contact.php', fs_get_template( 'contact.php', $vars ) );
}

#endregion ------------------------------------------------------------------------
Expand Down Expand Up @@ -18748,14 +18757,14 @@ function _add_trial_notice() {

// Show promotion if never shown before and 24 hours after initial activation with FS.
if ( ! $was_promotion_shown_before &&
$this->_storage->install_timestamp > ( time() - WP_FS__TIME_24_HOURS_IN_SEC )
$this->_storage->install_timestamp > ( time() - $this->apply_filters( 'show_first_trial_after_n_sec', WP_FS__TIME_24_HOURS_IN_SEC ) )
) {
return false;
}

// OR if promotion was shown before, try showing it every 30 days.
if ( $was_promotion_shown_before &&
30 * WP_FS__TIME_24_HOURS_IN_SEC > time() - $last_time_trial_promotion_shown
$this->apply_filters( 'reshow_trial_after_every_n_sec', 30 * WP_FS__TIME_24_HOURS_IN_SEC ) > time() - $last_time_trial_promotion_shown
) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": "Freemius, Inc.",
"license": "GPL-3.0",
"homepage": "https://freemius.com",
"version": "1.2.3",
"version": "2.1.2",
"main": "gulpfile.js",
"dependencies": {},
"scripts": {
Expand Down
11 changes: 11 additions & 0 deletions templates/connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,17 @@ class="wrap<?php if ( ! fs_is_network_admin() && ( ! $fs->is_enable_anonymous()
<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', $slug ); ?></a>
</div>

<?php
/**
* Allows developers to include custom HTML after the license input container.
*
* @author Vova Feldman
* @since 2.1.2
*/
$fs->do_action( 'connect/after_license_input' );
?>

<?php
$send_updates_text = sprintf(
'%s<span class="action-description"> - %s</span>',
Expand Down

0 comments on commit 3ba7c2a

Please sign in to comment.