Skip to content

Commit

Permalink
Merge pull request #71 from awesomemotive/20241002-Cross-promotion-du…
Browse files Browse the repository at this point in the history
…plicator

Added cross promotion to duplicator
  • Loading branch information
andreamk authored Oct 3, 2024
2 parents 0e0f318 + 9a93a1f commit e68e10b
Show file tree
Hide file tree
Showing 6 changed files with 2,263 additions and 1,632 deletions.
54 changes: 54 additions & 0 deletions assets/img/duplicator-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions assets/js/extra-plugins.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/**
* Transients Manager Extra Plugins
*/

'use strict';

var AmTmExtraPlugins = window.AmTmExtraPlugins || (function (document, window, $) {

/**
* Public functions and properties.
*/
var app = {

/**
* Start the engine.
*/
init: function () {
$(app.ready);
},

/**
* Document ready.
*/
ready: function () {
app.events();
},

/**
* Dismissible notices events.
*/
events: function () {
$(document).on(
'click',
'button.am-tm-extra-plugin-item[data-plugin]',
function (e) {
e.preventDefault();

if ($(this).hasClass('disabled')) {
return;
}

let button = $(this);
let buttonText = $(this).html();

$(this).addClass('disabled');
$(this).html(l10nAmTmExtraPlugins.loading);

$.post(
am_tm_extra_plugins.ajax_url,
{
action: 'transients_manager_extra_plugin',
nonce: am_tm_extra_plugins.extra_plugin_install_nonce,
plugin: $(this).data('plugin'),
}
).done(function (response) {
console.log(response);
if (response.success !== true) {
console.log("Plugin installed failed with message: " + response.data.message);
button.fadeOut(300);

setTimeout(function () {
button.html(buttonText);
button.removeClass('disabled');
button.fadeIn(100);
}, 3000);
return;
}

button.fadeOut(500);
button.html(l10nAmTmExtraPlugins.activated);
button.prepend('<span class="dashicons dashicons-yes"></span>');
button.fadeIn(300);
});
}
);

$(document).on(
'click',
'.notice.cross-promotion .notice-dismiss',
function (e) {
e.preventDefault();

$.post(
am_tm_extra_plugins.ajax_url,
{
action: 'transients_manager_cross_promo_dismiss',
nonce: am_tm_extra_plugins.cross_promo_dismiss_nonce,
}
).done(function (response) {
if (response.success !== true) {
console.log("Error dismissing notice");
return;
}
});
}
);
},


};

return app;

}(document, window, jQuery));

// Initialize.
AmTmExtraPlugins.init();
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Tags: cron, tool, transient
Requires PHP: 5.6.20
Requires at least: 5.3
Tested up to: 6.5
Stable Tag: 2.0.5
Stable Tag: 2.0.6

Provides a familiar interface to view, search, edit, and delete Transients.

Expand Down Expand Up @@ -42,6 +42,7 @@ It was originally created by <a href="https://pippinsplugins.com/" rel="friend">

If you like this plugin and find it useful to manage transients, please leave a good rating and consider checking out our other projects:

* [Duplicator](https://duplicator.com/) – Easy, fast and secure WordPress backups and website migration.
* [OptinMonster](https://optinmonster.com/) – Get more email subscribers with the most popular conversion optimization plugin for WordPress.
* [WPForms](https://wpforms.com/) – #1 drag & drop online form builder for WordPress (trusted by 5 million sites).
* [MonsterInsights](https://www.monsterinsights.com/) – See the stats that matter and grow your business with confidence. Best Google Analytics plugin for WordPress.
Expand Down Expand Up @@ -90,6 +91,9 @@ No. It only works when transients are stored in the database.

== Changelog ==

= 2.0.6 - October 3, 2024 =
* Improved: Product Education

= 2.0.5 - December 12, 2023 =
* Improved: Support for PHP8.2 and below

Expand Down
Loading

0 comments on commit e68e10b

Please sign in to comment.