Version Description
- removed uninstall feedback
Download this release
Release Info
| Developer | machothemes |
| Plugin | |
| Version | 3.7.5 |
| Comparing to | |
| See all releases | |
Code changes from version 3.7.4 to 3.7.5
- feedback/class-epsilon-feedback.php +0 -271
- feedback/class-epsilon-plugin-request.php +0 -225
- readme.txt +5 -2
- speed-booster-pack.php +2 -6
feedback/class-epsilon-feedback.php
DELETED
|
@@ -1,271 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Epsilon_Feedback {
|
| 4 |
-
|
| 5 |
-
private $plugin_file = '';
|
| 6 |
-
private $plugin_name = '';
|
| 7 |
-
|
| 8 |
-
function __construct( $_plugin_file ) {
|
| 9 |
-
|
| 10 |
-
$this->plugin_file = $_plugin_file;
|
| 11 |
-
$this->plugin_name = basename( $this->plugin_file, '.php' );
|
| 12 |
-
|
| 13 |
-
// Deactivation
|
| 14 |
-
add_filter( 'plugin_action_links_' . plugin_basename( $this->plugin_file ), array(
|
| 15 |
-
$this,
|
| 16 |
-
'filter_action_links',
|
| 17 |
-
) );
|
| 18 |
-
add_action( 'admin_footer-plugins.php', array( $this, 'goodbye_ajax' ) );
|
| 19 |
-
add_action( 'wp_ajax_epsilon_deactivate_plugin', array( $this, 'epsilon_deactivate_plugin_callback' ) );
|
| 20 |
-
|
| 21 |
-
}
|
| 22 |
-
|
| 23 |
-
/**
|
| 24 |
-
* Filter the deactivation link to allow us to present a form when the user deactivates the plugin
|
| 25 |
-
*
|
| 26 |
-
* @since 1.0.0
|
| 27 |
-
*/
|
| 28 |
-
public function filter_action_links( $links ) {
|
| 29 |
-
|
| 30 |
-
if ( isset( $links['deactivate'] ) ) {
|
| 31 |
-
$deactivation_link = $links['deactivate'];
|
| 32 |
-
// Insert an onClick action to allow form before deactivating
|
| 33 |
-
$deactivation_link = str_replace( '<a ', '<div class="epsilon-deactivate-form-wrapper"><span class="epsilon-deactivate-form" id="epsilon-deactivate-form-' . esc_attr( $this->plugin_name ) . '"></span></div><a onclick="javascript:event.preventDefault();" id="epsilon-deactivate-link-' . esc_attr( $this->plugin_name ) . '" ', $deactivation_link );
|
| 34 |
-
$links['deactivate'] = $deactivation_link;
|
| 35 |
-
}
|
| 36 |
-
|
| 37 |
-
return $links;
|
| 38 |
-
}
|
| 39 |
-
|
| 40 |
-
/**
|
| 41 |
-
* Form text strings
|
| 42 |
-
* These can be filtered
|
| 43 |
-
*
|
| 44 |
-
* @since 1.0.0
|
| 45 |
-
*/
|
| 46 |
-
public function goodbye_ajax() {
|
| 47 |
-
// Get our strings for the form
|
| 48 |
-
$form = $this->get_form_info();
|
| 49 |
-
|
| 50 |
-
// Build the HTML to go in the form
|
| 51 |
-
$html = '<div class="epsilon-deactivate-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
|
| 52 |
-
$html .= '<div class="epsilon-deactivate-form-body"><p>' . esc_html( $form['body'] ) . '</p>';
|
| 53 |
-
if ( is_array( $form['options'] ) ) {
|
| 54 |
-
$html .= '<div class="epsilon-deactivate-options"><p>';
|
| 55 |
-
foreach ( $form['options'] as $key => $option ) {
|
| 56 |
-
if ( 'features' == $key ) {
|
| 57 |
-
$html .= '<input type="radio" name="epsilon-deactivate-reason" checked="checked" id="' . esc_attr( $key ) . '" value="' . esc_attr( $key ) . '"> <label for="' . esc_attr( $key ) . '">' . esc_attr( $option ) . '</label><br>';
|
| 58 |
-
} else {
|
| 59 |
-
$html .= '<input type="radio" name="epsilon-deactivate-reason" id="' . esc_attr( $key ) . '" value="' . esc_attr( $key ) . '"> <label for="' . esc_attr( $key ) . '">' . esc_attr( $option ) . '</label><br>';
|
| 60 |
-
}
|
| 61 |
-
}
|
| 62 |
-
$html .= '</p><label id="epsilon-deactivate-details-label" for="epsilon-deactivate-reasons"><strong>' . esc_html( $form['details'] ) . '</strong></label><textarea name="epsilon-deactivate-details" id="epsilon-deactivate-details" rows="2" style="width:100%"></textarea>';
|
| 63 |
-
$html .= '<input type="checkbox" name="epsilon-deactivate-tracking" checked="" id="allow-tracking" value="yes"> <label for="allow-tracking">' . esc_html__( 'Allow us to get more information in order to improve our plugin', 'sb-pack' ) . '</label><br>';
|
| 64 |
-
$html .= '</div><!-- .epsilon-deactivate-options -->';
|
| 65 |
-
}
|
| 66 |
-
$html .= '</div><!-- .epsilon-deactivate-form-body -->';
|
| 67 |
-
$html .= '<p class="deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'sb-pack' ) . '</p>';
|
| 68 |
-
$html .= '<div class="epsilon-deactivate-form-footer"><p><a id="epsilon-deactivate-plugin" href="#">' . __( 'Just Deactivate', 'sb-pack' ) . '</a><a id="epsilon-deactivate-submit-form" class="button button-primary" href="#">' . __( 'Submit and Deactivate', 'sb-pack' ) . '</a></p></div>'
|
| 69 |
-
?>
|
| 70 |
-
<div class="epsilon-deactivate-form-bg"></div>
|
| 71 |
-
<style type="text/css">
|
| 72 |
-
.epsilon-deactivate-form-active .epsilon-deactivate-form-bg {
|
| 73 |
-
background: rgba(0, 0, 0, .5);
|
| 74 |
-
position: fixed;
|
| 75 |
-
top: 0;
|
| 76 |
-
left: 0;
|
| 77 |
-
width: 100%;
|
| 78 |
-
height: 100%;
|
| 79 |
-
}
|
| 80 |
-
|
| 81 |
-
.epsilon-deactivate-form-wrapper {
|
| 82 |
-
position: relative;
|
| 83 |
-
z-index: 999;
|
| 84 |
-
display: none;
|
| 85 |
-
}
|
| 86 |
-
|
| 87 |
-
.epsilon-deactivate-form-active .epsilon-deactivate-form-wrapper {
|
| 88 |
-
display: block;
|
| 89 |
-
}
|
| 90 |
-
|
| 91 |
-
.epsilon-deactivate-form {
|
| 92 |
-
display: none;
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
.epsilon-deactivate-form-active .epsilon-deactivate-form {
|
| 96 |
-
position: absolute;
|
| 97 |
-
bottom: 30px;
|
| 98 |
-
left: 0;
|
| 99 |
-
max-width: 400px;
|
| 100 |
-
background: #fff;
|
| 101 |
-
white-space: normal;
|
| 102 |
-
}
|
| 103 |
-
|
| 104 |
-
.epsilon-deactivate-form-head {
|
| 105 |
-
background: #272754;
|
| 106 |
-
color: #fff;
|
| 107 |
-
padding: 8px 18px;
|
| 108 |
-
}
|
| 109 |
-
|
| 110 |
-
.epsilon-deactivate-form-body {
|
| 111 |
-
padding: 8px 18px;
|
| 112 |
-
color: #444;
|
| 113 |
-
}
|
| 114 |
-
|
| 115 |
-
.deactivating-spinner {
|
| 116 |
-
display: none;
|
| 117 |
-
}
|
| 118 |
-
|
| 119 |
-
.deactivating-spinner .spinner {
|
| 120 |
-
float: none;
|
| 121 |
-
margin: 4px 4px 0 18px;
|
| 122 |
-
vertical-align: bottom;
|
| 123 |
-
visibility: visible;
|
| 124 |
-
}
|
| 125 |
-
|
| 126 |
-
.epsilon-deactivate-form-footer {
|
| 127 |
-
padding: 8px 18px;
|
| 128 |
-
}
|
| 129 |
-
|
| 130 |
-
.epsilon-deactivate-form-footer p {
|
| 131 |
-
display: flex;
|
| 132 |
-
align-items: center;
|
| 133 |
-
justify-content: space-between;
|
| 134 |
-
}
|
| 135 |
-
|
| 136 |
-
.epsilon-deactivate-form.process-response .epsilon-deactivate-form-body,
|
| 137 |
-
.epsilon-deactivate-form.process-response .epsilon-deactivate-form-footer {
|
| 138 |
-
position: relative;
|
| 139 |
-
}
|
| 140 |
-
|
| 141 |
-
.epsilon-deactivate-form.process-response .epsilon-deactivate-form-body:after,
|
| 142 |
-
.epsilon-deactivate-form.process-response .epsilon-deactivate-form-footer:after {
|
| 143 |
-
content: "";
|
| 144 |
-
display: block;
|
| 145 |
-
position: absolute;
|
| 146 |
-
top: 0;
|
| 147 |
-
left: 0;
|
| 148 |
-
width: 100%;
|
| 149 |
-
height: 100%;
|
| 150 |
-
background-color: rgba(255, 255, 255, .5);
|
| 151 |
-
}
|
| 152 |
-
</style>
|
| 153 |
-
<script>
|
| 154 |
-
jQuery( document ).ready( function( $ ) {
|
| 155 |
-
var deactivateURL = $( "#epsilon-deactivate-link-<?php echo esc_attr( $this->plugin_name ); ?>" ),
|
| 156 |
-
formContainer = $( '#epsilon-deactivate-form-<?php echo esc_attr( $this->plugin_name ); ?>' ),
|
| 157 |
-
detailsStrings = {
|
| 158 |
-
'setup': '<?php echo __( 'What was the dificult part ?', 'sb-pack' ) ?>',
|
| 159 |
-
'documentation': '<?php echo __( 'What can we describe more ?', 'sb-pack' ) ?>',
|
| 160 |
-
'features': '<?php echo __( 'How could we improve ?', 'sb-pack' ) ?>',
|
| 161 |
-
'better-plugin': '<?php echo __( 'Can you mention it ?', 'sb-pack' ) ?>',
|
| 162 |
-
'incompatibility': '<?php echo __( 'With what plugin or theme is incompatible ?', 'sb-pack' ) ?>',
|
| 163 |
-
};
|
| 164 |
-
|
| 165 |
-
$( deactivateURL ).on( "click", function() {
|
| 166 |
-
// We'll send the user to this deactivation link when they've completed or dismissed the form
|
| 167 |
-
var url = deactivateURL.attr( 'href' );
|
| 168 |
-
$( 'body' ).toggleClass( 'epsilon-deactivate-form-active' );
|
| 169 |
-
formContainer.fadeIn();
|
| 170 |
-
formContainer.html( '<?php echo $html; ?>' );
|
| 171 |
-
|
| 172 |
-
formContainer.on( 'change', 'input[name="epsilon-deactivate-reason"]', function() {
|
| 173 |
-
var detailsLabel = formContainer.find( '#epsilon-deactivate-details-label strong' );
|
| 174 |
-
var value = formContainer.find( 'input[name="epsilon-deactivate-reason"]:checked' ).val();
|
| 175 |
-
detailsLabel.text( detailsStrings[ value ] );
|
| 176 |
-
} );
|
| 177 |
-
|
| 178 |
-
formContainer.on( 'click', '#epsilon-deactivate-submit-form', function( e ) {
|
| 179 |
-
var data = {
|
| 180 |
-
'action': 'epsilon_deactivate_plugin',
|
| 181 |
-
'security': "<?php echo wp_create_nonce( 'epsilon_deactivate_plugin' ); ?>",
|
| 182 |
-
'dataType': "json"
|
| 183 |
-
};
|
| 184 |
-
e.preventDefault();
|
| 185 |
-
// As soon as we click, the body of the form should disappear
|
| 186 |
-
formContainer.addClass( 'process-response' );
|
| 187 |
-
// Fade in spinner
|
| 188 |
-
formContainer.find( ".deactivating-spinner" ).fadeIn();
|
| 189 |
-
|
| 190 |
-
data[ 'reason' ] = formContainer.find( 'input[name="epsilon-deactivate-reason"]:checked' ).val();
|
| 191 |
-
data[ 'details' ] = formContainer.find( '#epsilon-deactivate-details' ).val();
|
| 192 |
-
data[ 'tracking' ] = formContainer.find( '#allow-tracking:checked' ).length;
|
| 193 |
-
|
| 194 |
-
$.post(
|
| 195 |
-
ajaxurl,
|
| 196 |
-
data,
|
| 197 |
-
function( response ) {
|
| 198 |
-
// Redirect to original deactivation URL
|
| 199 |
-
window.location.href = url;
|
| 200 |
-
}
|
| 201 |
-
);
|
| 202 |
-
} );
|
| 203 |
-
|
| 204 |
-
formContainer.on( 'click', '#epsilon-deactivate-plugin', function( e ) {
|
| 205 |
-
e.preventDefault();
|
| 206 |
-
window.location.href = url;
|
| 207 |
-
} );
|
| 208 |
-
|
| 209 |
-
// If we click outside the form, the form will close
|
| 210 |
-
$( '.epsilon-deactivate-form-bg' ).on( 'click', function() {
|
| 211 |
-
formContainer.fadeOut();
|
| 212 |
-
$( 'body' ).removeClass( 'epsilon-deactivate-form-active' );
|
| 213 |
-
} );
|
| 214 |
-
} );
|
| 215 |
-
} );
|
| 216 |
-
</script>
|
| 217 |
-
<?php }
|
| 218 |
-
|
| 219 |
-
/*
|
| 220 |
-
* Form text strings
|
| 221 |
-
* These are non-filterable and used as fallback in case filtered strings aren't set correctly
|
| 222 |
-
* @since 1.0.0
|
| 223 |
-
*/
|
| 224 |
-
public function get_form_info() {
|
| 225 |
-
$form = array();
|
| 226 |
-
$form['heading'] = __( 'Sorry to see you go', 'sb-pack' );
|
| 227 |
-
$form['body'] = __( 'Before you deactivate the plugin, would you quickly give us your reason for doing so?', 'sb-pack' );
|
| 228 |
-
$form['options'] = array(
|
| 229 |
-
'setup' => __( 'Set up is too difficult', 'sb-pack' ),
|
| 230 |
-
'documentation' => __( 'Lack of documentation', 'sb-pack' ),
|
| 231 |
-
'features' => __( 'Not the features I wanted', 'sb-pack' ),
|
| 232 |
-
'better-plugin' => __( 'Found a better plugin', 'sb-pack' ),
|
| 233 |
-
'incompatibility' => __( 'Incompatible with theme or plugin', 'sb-pack' ),
|
| 234 |
-
);
|
| 235 |
-
$form['details'] = __( 'How could we improve ?', 'sb-pack' );
|
| 236 |
-
|
| 237 |
-
return $form;
|
| 238 |
-
}
|
| 239 |
-
|
| 240 |
-
public function epsilon_deactivate_plugin_callback() {
|
| 241 |
-
|
| 242 |
-
check_ajax_referer( 'epsilon_deactivate_plugin', 'security' );
|
| 243 |
-
|
| 244 |
-
if ( isset( $_POST['reason'] ) && isset( $_POST['details'] ) && isset( $_POST['tracking'] ) ) {
|
| 245 |
-
require_once 'class-epsilon-plugin-request.php';
|
| 246 |
-
$args = array(
|
| 247 |
-
'reason' => $_POST['reason'],
|
| 248 |
-
'details' => $_POST['details'],
|
| 249 |
-
'tracking' => $_POST['tracking'],
|
| 250 |
-
);
|
| 251 |
-
$request = new Epsilon_Plugin_Request( $this->plugin_file, $args );
|
| 252 |
-
if ( $request->request_successful ) {
|
| 253 |
-
echo json_encode( array(
|
| 254 |
-
'status' => 'ok',
|
| 255 |
-
) );
|
| 256 |
-
} else {
|
| 257 |
-
echo json_encode( array(
|
| 258 |
-
'status' => 'nok',
|
| 259 |
-
) );
|
| 260 |
-
}
|
| 261 |
-
} else {
|
| 262 |
-
echo json_encode( array(
|
| 263 |
-
'status' => 'ok',
|
| 264 |
-
) );
|
| 265 |
-
}
|
| 266 |
-
|
| 267 |
-
die();
|
| 268 |
-
|
| 269 |
-
}
|
| 270 |
-
|
| 271 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
feedback/class-epsilon-plugin-request.php
DELETED
|
@@ -1,225 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Epsilon_Plugin_Request {
|
| 4 |
-
|
| 5 |
-
/**
|
| 6 |
-
* Url for the request
|
| 7 |
-
*
|
| 8 |
-
* @var string
|
| 9 |
-
*/
|
| 10 |
-
private $url = 'https://tamewp.com/';
|
| 11 |
-
/**
|
| 12 |
-
* Api endpoint
|
| 13 |
-
*
|
| 14 |
-
* @var string
|
| 15 |
-
*/
|
| 16 |
-
private $endpoint = 'wp-json/epsilon/v1/add-tracking-data';
|
| 17 |
-
/**
|
| 18 |
-
* Private data
|
| 19 |
-
*
|
| 20 |
-
* @var array
|
| 21 |
-
*/
|
| 22 |
-
private $data = array(
|
| 23 |
-
'server' => array(),
|
| 24 |
-
'user' => array(),
|
| 25 |
-
'wordpress' => array(
|
| 26 |
-
'deactivated_plugin' => array(),
|
| 27 |
-
),
|
| 28 |
-
);
|
| 29 |
-
/**
|
| 30 |
-
* Plugin file
|
| 31 |
-
*
|
| 32 |
-
* @var string
|
| 33 |
-
*/
|
| 34 |
-
private $plugin_file = '';
|
| 35 |
-
|
| 36 |
-
private $allow_tracking = 0;
|
| 37 |
-
|
| 38 |
-
public $request_successful = false;
|
| 39 |
-
|
| 40 |
-
function __construct( $_plugin_file, $args ) {
|
| 41 |
-
|
| 42 |
-
// Set variables
|
| 43 |
-
$this->allow_tracking = $args['tracking'];
|
| 44 |
-
$this->plugin_file = $_plugin_file;
|
| 45 |
-
$this->data['unique'] = md5( home_url() . get_bloginfo( 'admin_email' ) );
|
| 46 |
-
$this->data['wordpress']['deactivated_plugin']['uninstall_reason'] = $args['reason'];
|
| 47 |
-
$this->data['wordpress']['deactivated_plugin']['uninstall_details'] = $args['details'];
|
| 48 |
-
|
| 49 |
-
// Start collecting data
|
| 50 |
-
$this->_collect_data();
|
| 51 |
-
$this->_generate_url();
|
| 52 |
-
$this->request_successful = $this->_send_request();
|
| 53 |
-
}
|
| 54 |
-
|
| 55 |
-
/**
|
| 56 |
-
* Collect all data for the request.
|
| 57 |
-
*
|
| 58 |
-
*/
|
| 59 |
-
private function _collect_data() {
|
| 60 |
-
|
| 61 |
-
$current_plugin = get_plugin_data( $this->plugin_file );
|
| 62 |
-
|
| 63 |
-
// Plugin data
|
| 64 |
-
$this->data['wordpress']['deactivated_plugin']['slug'] = $current_plugin['TextDomain'];
|
| 65 |
-
$this->data['wordpress']['deactivated_plugin']['name'] = $current_plugin['Name'];
|
| 66 |
-
$this->data['wordpress']['deactivated_plugin']['version'] = $current_plugin['Version'];
|
| 67 |
-
$this->data['wordpress']['deactivated_plugin']['author'] = $current_plugin['AuthorName'];
|
| 68 |
-
|
| 69 |
-
if ( $this->allow_tracking ) {
|
| 70 |
-
$this->_collect_wordpress_data();
|
| 71 |
-
$this->_collect_server_data();
|
| 72 |
-
$this->_collect_user_data();
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
-
}
|
| 76 |
-
|
| 77 |
-
/**
|
| 78 |
-
* Collect WordPress data.
|
| 79 |
-
*
|
| 80 |
-
*/
|
| 81 |
-
private function _collect_wordpress_data() {
|
| 82 |
-
$this->data['wordpress']['locale'] = ( get_bloginfo( 'version' ) >= 4.7 ) ? get_user_locale() : get_locale();
|
| 83 |
-
$this->data['wordpress']['wp_version'] = get_bloginfo( 'version' );
|
| 84 |
-
$this->data['wordpress']['multisite'] = is_multisite();
|
| 85 |
-
|
| 86 |
-
$this->data['wordpress']['themes'] = $this->get_themes();
|
| 87 |
-
$this->data['wordpress']['plugins'] = $this->get_plugins();
|
| 88 |
-
}
|
| 89 |
-
|
| 90 |
-
/**
|
| 91 |
-
* Collect server data.
|
| 92 |
-
*
|
| 93 |
-
*/
|
| 94 |
-
private function _collect_server_data() {
|
| 95 |
-
$this->data['server']['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
|
| 96 |
-
$this->data['server']['php_version'] = phpversion();
|
| 97 |
-
$this->data['server']['url'] = home_url();
|
| 98 |
-
}
|
| 99 |
-
|
| 100 |
-
/**
|
| 101 |
-
* Collect user data.
|
| 102 |
-
*
|
| 103 |
-
*/
|
| 104 |
-
private function _collect_user_data() {
|
| 105 |
-
$admin = get_user_by( 'email', get_bloginfo( 'admin_email' ) );
|
| 106 |
-
if ( ! $admin ) {
|
| 107 |
-
$this->data['user']['email'] = '';
|
| 108 |
-
$this->data['user']['first_name'] = '';
|
| 109 |
-
$this->data['user']['last_name'] = '';
|
| 110 |
-
}else{
|
| 111 |
-
$this->data['user']['email'] = get_bloginfo( 'admin_email' );
|
| 112 |
-
$this->data['user']['first_name'] = $admin->first_name;
|
| 113 |
-
$this->data['user']['last_name'] = $admin->last_name;
|
| 114 |
-
}
|
| 115 |
-
}
|
| 116 |
-
|
| 117 |
-
/**
|
| 118 |
-
* Get current themes
|
| 119 |
-
*
|
| 120 |
-
* @return array
|
| 121 |
-
*/
|
| 122 |
-
private function get_themes() {
|
| 123 |
-
$theme = wp_get_theme();
|
| 124 |
-
|
| 125 |
-
return array(
|
| 126 |
-
'installed' => $this->_get_installed_themes(),
|
| 127 |
-
'active' => array(
|
| 128 |
-
'slug' => get_stylesheet(),
|
| 129 |
-
'name' => $theme->get( 'Name' ),
|
| 130 |
-
'version' => $theme->get( 'Version' ),
|
| 131 |
-
'author' => $theme->get( 'Author' ),
|
| 132 |
-
),
|
| 133 |
-
);
|
| 134 |
-
}
|
| 135 |
-
|
| 136 |
-
/**
|
| 137 |
-
* Get an array of installed themes
|
| 138 |
-
*/
|
| 139 |
-
private function _get_installed_themes() {
|
| 140 |
-
$installed = wp_get_themes();
|
| 141 |
-
$theme = get_stylesheet();
|
| 142 |
-
$arr = array();
|
| 143 |
-
|
| 144 |
-
foreach ( $installed as $slug => $info ) {
|
| 145 |
-
if ( $slug === $theme ) {
|
| 146 |
-
continue;
|
| 147 |
-
}
|
| 148 |
-
$arr[ $slug ] = array(
|
| 149 |
-
'slug' => $slug,
|
| 150 |
-
'name' => $info->get( 'Name' ),
|
| 151 |
-
'version' => $info->get( 'Version' ),
|
| 152 |
-
'author' => $info->get( 'Author' )
|
| 153 |
-
);
|
| 154 |
-
};
|
| 155 |
-
|
| 156 |
-
return $arr;
|
| 157 |
-
}
|
| 158 |
-
|
| 159 |
-
/**
|
| 160 |
-
* Get a list of installed plugins
|
| 161 |
-
*/
|
| 162 |
-
private function get_plugins() {
|
| 163 |
-
if ( ! function_exists( 'get_plugins' ) ) {
|
| 164 |
-
include ABSPATH . '/wp-admin/includes/plugin.php';
|
| 165 |
-
}
|
| 166 |
-
|
| 167 |
-
$plugins = get_plugins();
|
| 168 |
-
$option = get_option( 'active_plugins', array() );
|
| 169 |
-
$active = array();
|
| 170 |
-
$installed = array();
|
| 171 |
-
foreach ( $plugins as $id => $info ) {
|
| 172 |
-
if ( in_array( $id, $active ) ) {
|
| 173 |
-
continue;
|
| 174 |
-
}
|
| 175 |
-
|
| 176 |
-
$id = explode( '/', $id );
|
| 177 |
-
$id = ucwords( str_replace( '-', ' ', $id[0] ) );
|
| 178 |
-
|
| 179 |
-
$installed[] = $id;
|
| 180 |
-
}
|
| 181 |
-
|
| 182 |
-
foreach ( $option as $id ) {
|
| 183 |
-
$id = explode( '/', $id );
|
| 184 |
-
$id = ucwords( str_replace( '-', ' ', $id[0] ) );
|
| 185 |
-
|
| 186 |
-
$active[] = $id;
|
| 187 |
-
}
|
| 188 |
-
|
| 189 |
-
return array(
|
| 190 |
-
'installed' => $installed,
|
| 191 |
-
'active' => $active,
|
| 192 |
-
);
|
| 193 |
-
}
|
| 194 |
-
|
| 195 |
-
/**
|
| 196 |
-
* Generate the url
|
| 197 |
-
*/
|
| 198 |
-
protected function _generate_url() {
|
| 199 |
-
$this->url = $this->url . $this->endpoint;
|
| 200 |
-
}
|
| 201 |
-
|
| 202 |
-
/**
|
| 203 |
-
* Send dat to server.
|
| 204 |
-
*
|
| 205 |
-
*/
|
| 206 |
-
private function _send_request() {
|
| 207 |
-
|
| 208 |
-
$request = wp_remote_post( $this->url, array(
|
| 209 |
-
'method' => 'POST',
|
| 210 |
-
'timeout' => 20,
|
| 211 |
-
'redirection' => 5,
|
| 212 |
-
'httpversion' => '1.1',
|
| 213 |
-
'blocking' => true,
|
| 214 |
-
'body' => $this->data,
|
| 215 |
-
'user-agent' => 'MT/EPSILON-CUSTOMER-TRACKING/' . esc_url( home_url() )
|
| 216 |
-
) );
|
| 217 |
-
|
| 218 |
-
if ( is_wp_error( $request ) ) {
|
| 219 |
-
return false;
|
| 220 |
-
}
|
| 221 |
-
|
| 222 |
-
return true;
|
| 223 |
-
|
| 224 |
-
}
|
| 225 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
|
@@ -2,9 +2,9 @@
|
|
| 2 |
Contributors: machothemes, silkalns
|
| 3 |
Tags: speed, optimization, performance, scripts to the footer, google libraries, font awesome cdn, defer parsing of javascript, remove query strings, gtmetrix, google pageSpeed, yslow, compression, render-blocking css
|
| 4 |
Requires at least: 3.6
|
| 5 |
-
Tested up to:
|
| 6 |
Requires PHP: 5.6
|
| 7 |
-
Stable tag: 3.7.
|
| 8 |
License: GPLv3 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
|
@@ -78,6 +78,9 @@ We are a young team of WordPress aficionados who love building WordPress plugins
|
|
| 78 |
|
| 79 |
== Changelog ==
|
| 80 |
|
|
|
|
|
|
|
|
|
|
| 81 |
= 3.7.4 =
|
| 82 |
* minor backend tweaks - notice
|
| 83 |
* added language files
|
| 2 |
Contributors: machothemes, silkalns
|
| 3 |
Tags: speed, optimization, performance, scripts to the footer, google libraries, font awesome cdn, defer parsing of javascript, remove query strings, gtmetrix, google pageSpeed, yslow, compression, render-blocking css
|
| 4 |
Requires at least: 3.6
|
| 5 |
+
Tested up to: 5.0
|
| 6 |
Requires PHP: 5.6
|
| 7 |
+
Stable tag: 3.7.5
|
| 8 |
License: GPLv3 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
| 78 |
|
| 79 |
== Changelog ==
|
| 80 |
|
| 81 |
+
= 3.7.5 =
|
| 82 |
+
* removed uninstall feedback
|
| 83 |
+
|
| 84 |
= 3.7.4 =
|
| 85 |
* minor backend tweaks - notice
|
| 86 |
* added language files
|
speed-booster-pack.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
* Description: Speed Booster Pack allows you to improve your page loading speed and get a higher score on the major
|
| 6 |
* speed testing services such as <a href="http://gtmetrix.com/">GTmetrix</a>, <a
|
| 7 |
* href="http://developers.google.com/speed/pagespeed/insights/">Google PageSpeed</a> or other speed testing tools.
|
| 8 |
-
* Version: 3.7.
|
| 9 |
* Author: Macho Themes
|
| 10 |
* Author URI: https://www.machothemes.com/
|
| 11 |
* License: GPLv3
|
|
@@ -67,7 +67,7 @@ $sbp_options = get_option( 'sbp_settings', (array) $sbp_defaults ); // retrie
|
|
| 67 |
-----------------------------------------------------------------------------------------------------------*/
|
| 68 |
|
| 69 |
define( 'SPEED_BOOSTER_PACK_PATH', plugin_dir_path( __FILE__ ) ); // Defining plugin dir path
|
| 70 |
-
define( 'SPEED_BOOSTER_PACK_VERSION', '3.7.
|
| 71 |
define( 'SBP_FOOTER', 10 ); // Defining css position
|
| 72 |
define( 'SBP_FOOTER_LAST', 99999 ); // Defining css last position
|
| 73 |
|
|
@@ -120,10 +120,6 @@ if ( ! class_exists( 'Speed_Booster_Pack' ) ) {
|
|
| 120 |
$this->path = plugin_basename( __FILE__ );
|
| 121 |
add_filter( "plugin_action_links_$this->path", array( $this, 'sbp_settings_link' ) );
|
| 122 |
|
| 123 |
-
// load the uninstall feedback class
|
| 124 |
-
require_once 'feedback/class-epsilon-feedback.php';
|
| 125 |
-
new Epsilon_Feedback( __FILE__ );
|
| 126 |
-
|
| 127 |
} // END public function __construct
|
| 128 |
|
| 129 |
|
| 5 |
* Description: Speed Booster Pack allows you to improve your page loading speed and get a higher score on the major
|
| 6 |
* speed testing services such as <a href="http://gtmetrix.com/">GTmetrix</a>, <a
|
| 7 |
* href="http://developers.google.com/speed/pagespeed/insights/">Google PageSpeed</a> or other speed testing tools.
|
| 8 |
+
* Version: 3.7.5
|
| 9 |
* Author: Macho Themes
|
| 10 |
* Author URI: https://www.machothemes.com/
|
| 11 |
* License: GPLv3
|
| 67 |
-----------------------------------------------------------------------------------------------------------*/
|
| 68 |
|
| 69 |
define( 'SPEED_BOOSTER_PACK_PATH', plugin_dir_path( __FILE__ ) ); // Defining plugin dir path
|
| 70 |
+
define( 'SPEED_BOOSTER_PACK_VERSION', '3.7.5' ); // Defining plugin version
|
| 71 |
define( 'SBP_FOOTER', 10 ); // Defining css position
|
| 72 |
define( 'SBP_FOOTER_LAST', 99999 ); // Defining css last position
|
| 73 |
|
| 120 |
$this->path = plugin_basename( __FILE__ );
|
| 121 |
add_filter( "plugin_action_links_$this->path", array( $this, 'sbp_settings_link' ) );
|
| 122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
} // END public function __construct
|
| 124 |
|
| 125 |
|
