Version Description
- add
ADVANCED_ADS_DISABLE_SHORTCODE_BUTTON
constant to wp-config.php in order to remove the shortcode button from the TinyMCE interface - dont move ads into hidden elements
- set license key fields to readonly after updated
- show "reserve ad space" only for ad types where it makes sense
- using WordPress Filesystem to create ad block disguise folder
- disable page level ads on pages where all ads are disabled
- hide double compatibility warning with cache-busting in Advanced Ads Pro
- hide warning about unexcaped
&
in urls
Download this release
Release Info
Developer | webzunft |
Plugin | Advanced Ads |
Version | 1.7.17 |
Comparing to | |
See all releases |
Code changes from version 1.7.16 to 1.7.17
- admin/assets/js/admin.js +118 -19
- admin/includes/class-ad-type.php +9 -5
- admin/includes/class-shortcode-creator.php +1 -1
- admin/views/ad-parameters-metabox.php +0 -1
- admin/views/ad-parameters-size.php +4 -2
- admin/views/ad-parameters-warnings.php +0 -16
- admin/views/settings.php +2 -0
- advanced-ads.php +2 -2
- classes/ad_ajax_callbacks.php +2 -2
- classes/ad_placements.php +7 -2
- classes/ad_type_content.php +4 -1
- classes/ad_type_plain.php +1 -1
- classes/filesystem.php +127 -0
- modules/ad-blocker/admin/admin.php +31 -82
- modules/ad-blocker/admin/views/rebuild_form.php +1 -1
- modules/gadsense/public/public.php +1 -1
- public/assets/js/advanced.js +1 -1
- public/assets/js/advanced.orig.js +4 -1
- readme.txt +13 -2
- vendor/autoload_52.php +1 -1
- vendor/composer/ClassLoader.php +4 -4
- vendor/composer/LICENSE +1 -1
- vendor/composer/autoload_classmap.php +75 -0
- vendor/composer/autoload_real.php +20 -18
- vendor/composer/autoload_real_52.php +3 -3
- vendor/composer/autoload_static.php +2 -0
admin/assets/js/admin.js
CHANGED
@@ -302,7 +302,7 @@ jQuery( document ).ready(function ($) {
|
|
302 |
button.siblings('.advads-license-deactivate').show();
|
303 |
button.fadeOut();
|
304 |
button.siblings('.advads-license-activate-active').fadeIn();
|
305 |
-
button.siblings('input').prop('
|
306 |
} else if( r === 'ex' ){
|
307 |
button.siblings('.advads-license-activate-error').remove();
|
308 |
button.siblings('.advads-license-expired-error').show();
|
@@ -344,13 +344,13 @@ jQuery( document ).ready(function ($) {
|
|
344 |
button.siblings('.advads-license-activate-error').hide();
|
345 |
button.siblings('.advads-license-activate-active').hide();
|
346 |
button.siblings('.advads-license-activate').show();
|
347 |
-
button.siblings('input').prop('
|
348 |
button.fadeOut();
|
349 |
} else if( r === 'ex' ){
|
350 |
button.siblings('.advads-license-activate-error').hide();
|
351 |
button.siblings('.advads-license-activate-active').hide();
|
352 |
button.siblings('.advads-license-expired-error').show();
|
353 |
-
button.siblings('input').prop('
|
354 |
button.fadeOut();
|
355 |
} else {
|
356 |
button.siblings('.advads-license-activate-error').show().text( r );
|
@@ -443,30 +443,39 @@ jQuery( document ).ready(function ($) {
|
|
443 |
$( '#advanced-ads-use-adblocker' ).change( function() {
|
444 |
advads_toggle_box( this, '#advads-adblocker-wrapper' );
|
445 |
});
|
|
|
446 |
// processing of the rebuild asset form and the FTP/SSH credentials form
|
447 |
var $advads_adblocker_wrapper = $( '#advads-adblocker-wrapper' );
|
448 |
$advads_adblocker_wrapper.find( 'input[type="submit"]' ).prop( 'disabled', false );
|
449 |
$advads_adblocker_wrapper.on( 'submit', 'form', function( event ) {
|
450 |
-
|
451 |
-
|
452 |
-
|
|
|
453 |
|
454 |
-
|
455 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
|
457 |
-
$.
|
458 |
-
|
459 |
-
url: ajaxurl,
|
460 |
-
action: 'advads-adblock-rebuild-assets',
|
461 |
-
data: data
|
462 |
-
}).done( function( data ) {
|
463 |
-
$advads_adblocker_wrapper.html( data );
|
464 |
-
}).fail( function( jqXHR, textStatus, errorThrown ) {
|
465 |
-
$that.before( '<div class="error"><p>' + textStatus + ': ' + errorThrown + '</p></div>' );
|
466 |
-
$that.find( 'input[type="submit"]' ).prop( 'disabled', false ).next( '.advads-spinner' ).remove();
|
467 |
});
|
468 |
|
469 |
-
|
470 |
});
|
471 |
|
472 |
// process "reserve this space" checkbox
|
@@ -799,3 +808,93 @@ var advads_use_ui_buttonset = ( function() {
|
|
799 |
})();
|
800 |
|
801 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
button.siblings('.advads-license-deactivate').show();
|
303 |
button.fadeOut();
|
304 |
button.siblings('.advads-license-activate-active').fadeIn();
|
305 |
+
button.siblings('input').prop('readonly', 'readonly');
|
306 |
} else if( r === 'ex' ){
|
307 |
button.siblings('.advads-license-activate-error').remove();
|
308 |
button.siblings('.advads-license-expired-error').show();
|
344 |
button.siblings('.advads-license-activate-error').hide();
|
345 |
button.siblings('.advads-license-activate-active').hide();
|
346 |
button.siblings('.advads-license-activate').show();
|
347 |
+
button.siblings('input').prop('readonly', false);
|
348 |
button.fadeOut();
|
349 |
} else if( r === 'ex' ){
|
350 |
button.siblings('.advads-license-activate-error').hide();
|
351 |
button.siblings('.advads-license-activate-active').hide();
|
352 |
button.siblings('.advads-license-expired-error').show();
|
353 |
+
button.siblings('input').prop('readonly', false);
|
354 |
button.fadeOut();
|
355 |
} else {
|
356 |
button.siblings('.advads-license-activate-error').show().text( r );
|
443 |
$( '#advanced-ads-use-adblocker' ).change( function() {
|
444 |
advads_toggle_box( this, '#advads-adblocker-wrapper' );
|
445 |
});
|
446 |
+
|
447 |
// processing of the rebuild asset form and the FTP/SSH credentials form
|
448 |
var $advads_adblocker_wrapper = $( '#advads-adblocker-wrapper' );
|
449 |
$advads_adblocker_wrapper.find( 'input[type="submit"]' ).prop( 'disabled', false );
|
450 |
$advads_adblocker_wrapper.on( 'submit', 'form', function( event ) {
|
451 |
+
event.preventDefault();
|
452 |
+
var $form = $( '#advanced-ads-rebuild-assets-form' );
|
453 |
+
$form.prev( '.error' ).remove();
|
454 |
+
$form.find( 'input[type="submit"]' ).prop( 'disabled', true ).after( '<span class="spinner advads-spinner"></span>' );
|
455 |
|
456 |
+
var args = {
|
457 |
+
data: {
|
458 |
+
action: 'advads-adblock-rebuild-assets',
|
459 |
+
},
|
460 |
+
done: function( data, textStatus, jqXHR ) {
|
461 |
+
var $advads_adblocker_wrapper = $( '#advads-adblocker-wrapper' );
|
462 |
+
$advads_adblocker_wrapper.html( data );
|
463 |
+
},
|
464 |
+
fail: function( jqXHR, textStatus, errorThrown ) {
|
465 |
+
$form.before( '<div class="error"><p>' + textStatus + ': ' + errorThrown + '</p></div>' );
|
466 |
+
$form.find( 'input[type="submit"]' ).prop( 'disabled', false ).next( '.advads-spinner' ).remove();
|
467 |
+
},
|
468 |
+
on_modal_close: function() {
|
469 |
+
var $form = $( '#advanced-ads-rebuild-assets-form' );
|
470 |
+
$form.find( 'input[type="submit"]' ).prop( 'disabled', false ).next( '.advads-spinner' ).remove();
|
471 |
+
}
|
472 |
+
}
|
473 |
|
474 |
+
$.each( $form.serializeArray(), function( i, o ) {
|
475 |
+
args.data[ o.name ] = o.value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
});
|
477 |
|
478 |
+
advanced_ads_admin.filesystem.ajax( args );
|
479 |
});
|
480 |
|
481 |
// process "reserve this space" checkbox
|
808 |
})();
|
809 |
|
810 |
|
811 |
+
|
812 |
+
window.advanced_ads_admin = window.advanced_ads_admin || {};
|
813 |
+
advanced_ads_admin.filesystem = {
|
814 |
+
/**
|
815 |
+
* Holds the current job while the user writes data in the 'Connection Information' modal.
|
816 |
+
*
|
817 |
+
* @type {obj}
|
818 |
+
*/
|
819 |
+
_locked_job: false,
|
820 |
+
|
821 |
+
/**
|
822 |
+
* Toggle the 'Connection Information' modal.
|
823 |
+
*/
|
824 |
+
_requestForCredentialsModalToggle: function() {
|
825 |
+
this.$filesystemModal.toggle();
|
826 |
+
jQuery( 'body' ).toggleClass( 'modal-open' );
|
827 |
+
},
|
828 |
+
|
829 |
+
_init: function() {
|
830 |
+
this._init = function() {}
|
831 |
+
var self = this;
|
832 |
+
|
833 |
+
self.$filesystemModal = jQuery( '#request-filesystem-credentials-dialog' );
|
834 |
+
/**
|
835 |
+
* Sends saved job.
|
836 |
+
*/
|
837 |
+
self.$filesystemModal.on( 'submit', 'form', function( event ) {
|
838 |
+
event.preventDefault();
|
839 |
+
|
840 |
+
self.ajax( self._locked_job, true );
|
841 |
+
self._requestForCredentialsModalToggle()
|
842 |
+
} );
|
843 |
+
|
844 |
+
/**
|
845 |
+
* Closes the request credentials modal when clicking the 'Cancel' button.
|
846 |
+
*/
|
847 |
+
self.$filesystemModal.on( 'click', '[data-js-action="close"]', function() {
|
848 |
+
if ( jQuery.isPlainObject( self._locked_job ) && self._locked_job.on_modal_close ) {
|
849 |
+
self._locked_job.on_modal_close();
|
850 |
+
}
|
851 |
+
|
852 |
+
self._locked_job = false;
|
853 |
+
self._requestForCredentialsModalToggle();
|
854 |
+
} );
|
855 |
+
},
|
856 |
+
|
857 |
+
/**
|
858 |
+
* Sends AJAX request. Shows 'Connection Information' modal if needed.
|
859 |
+
*
|
860 |
+
* @param {object} args
|
861 |
+
* @param {bool} skip_modal
|
862 |
+
*/
|
863 |
+
ajax: function( args, skip_modal ) {
|
864 |
+
this._init();
|
865 |
+
|
866 |
+
if ( ! skip_modal && this.$filesystemModal.length > 0 ) {
|
867 |
+
this._requestForCredentialsModalToggle();
|
868 |
+
this.$filesystemModal.find( 'input:enabled:first' ).focus();
|
869 |
+
|
870 |
+
// Do not send request.
|
871 |
+
this._locked_job = args;
|
872 |
+
return;
|
873 |
+
}
|
874 |
+
|
875 |
+
var options = {
|
876 |
+
method: 'POST',
|
877 |
+
url: window.ajaxurl,
|
878 |
+
data: {
|
879 |
+
username: jQuery( '#username' ).val(),
|
880 |
+
password: jQuery( '#password' ).val(),
|
881 |
+
hostname: jQuery( '#hostname' ).val(),
|
882 |
+
connection_type: jQuery( 'input[name="connection_type"]:checked' ).val(),
|
883 |
+
public_key: jQuery( '#public_key' ).val(),
|
884 |
+
private_key: jQuery( '#private_key' ).val()
|
885 |
+
}
|
886 |
+
};
|
887 |
+
|
888 |
+
options.data = jQuery.extend( options.data, args.data );
|
889 |
+
var request = jQuery.ajax( options );
|
890 |
+
|
891 |
+
if ( args.done ) {
|
892 |
+
request.done( args.done );
|
893 |
+
}
|
894 |
+
|
895 |
+
if ( args.fail ) {
|
896 |
+
request.fail( args.fail );
|
897 |
+
}
|
898 |
+
}
|
899 |
+
}
|
900 |
+
|
admin/includes/class-ad-type.php
CHANGED
@@ -542,7 +542,7 @@ class Advanced_Ads_Admin_Ad_Type {
|
|
542 |
* Check if an ad is not valid for 'Post Content' placement
|
543 |
*
|
544 |
* @param obj $ad Advanced_Ads_Ad object
|
545 |
-
* @return string with error if not valid,
|
546 |
*/
|
547 |
public static function check_ad_dom_is_not_valid( Advanced_Ads_Ad $ad ) {
|
548 |
$adContent = ( isset( $ad->content ) ) ? $ad->content : '';
|
@@ -559,13 +559,17 @@ class Advanced_Ads_Admin_Ad_Type {
|
|
559 |
// source for this regex: http://stackoverflow.com/questions/17852537/preg-replace-only-specific-part-of-string
|
560 |
$adContent = preg_replace('#(document.write.+)</(.*)#', '$1<\/$2', $adContent); // escapes all closing html tags
|
561 |
$adDom->loadHtml('<!DOCTYPE html><html><meta http-equiv="Content-Type" content="text/html; charset=' . $wpCharset . '" /><body>' . $adContent);
|
562 |
-
|
563 |
-
|
564 |
-
|
|
|
|
|
|
|
|
|
565 |
}
|
566 |
|
567 |
libxml_use_internal_errors( $libxml_previous_state );
|
568 |
-
return
|
569 |
}
|
570 |
|
571 |
}
|
542 |
* Check if an ad is not valid for 'Post Content' placement
|
543 |
*
|
544 |
* @param obj $ad Advanced_Ads_Ad object
|
545 |
+
* @return string with error if not valid, empty string if valid
|
546 |
*/
|
547 |
public static function check_ad_dom_is_not_valid( Advanced_Ads_Ad $ad ) {
|
548 |
$adContent = ( isset( $ad->content ) ) ? $ad->content : '';
|
559 |
// source for this regex: http://stackoverflow.com/questions/17852537/preg-replace-only-specific-part-of-string
|
560 |
$adContent = preg_replace('#(document.write.+)</(.*)#', '$1<\/$2', $adContent); // escapes all closing html tags
|
561 |
$adDom->loadHtml('<!DOCTYPE html><html><meta http-equiv="Content-Type" content="text/html; charset=' . $wpCharset . '" /><body>' . $adContent);
|
562 |
+
|
563 |
+
$errors = '';
|
564 |
+
foreach( libxml_get_errors() as $_error ) {
|
565 |
+
// continue, if there is '&' symbol, but not HTML entity
|
566 |
+
if ( false === stripos( $_error->message, 'htmlParseEntityRef:' ) ) {
|
567 |
+
$errors .= print_r( $_error, true );
|
568 |
+
}
|
569 |
}
|
570 |
|
571 |
libxml_use_internal_errors( $libxml_previous_state );
|
572 |
+
return $errors;
|
573 |
}
|
574 |
|
575 |
}
|
admin/includes/class-shortcode-creator.php
CHANGED
@@ -30,7 +30,7 @@ class Advanced_Ads_Shortcode_Creator {
|
|
30 |
}
|
31 |
|
32 |
public function init() {
|
33 |
-
if( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_place_ads') ) ) {
|
34 |
return;
|
35 |
}
|
36 |
|
30 |
}
|
31 |
|
32 |
public function init() {
|
33 |
+
if( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_place_ads') ) || defined( 'ADVANCED_ADS_DISABLE_SHORTCODE_BUTTON' ) ) {
|
34 |
return;
|
35 |
}
|
36 |
|
admin/views/ad-parameters-metabox.php
CHANGED
@@ -21,7 +21,6 @@ do_action( 'advanced-ads-ad-params-before', $ad, $types ); ?>
|
|
21 |
<?php $type = (isset($types[$ad->type])) ? $types[$ad->type] : current( $types );
|
22 |
$type->render_parameters( $ad );
|
23 |
|
24 |
-
include ADVADS_BASE_PATH . 'admin/views/ad-parameters-warnings.php';
|
25 |
include ADVADS_BASE_PATH . 'admin/views/ad-parameters-size.php'; ?>
|
26 |
</div>
|
27 |
<?php do_action( 'advanced-ads-ad-params-after', $ad, $types );
|
21 |
<?php $type = (isset($types[$ad->type])) ? $types[$ad->type] : current( $types );
|
22 |
$type->render_parameters( $ad );
|
23 |
|
|
|
24 |
include ADVADS_BASE_PATH . 'admin/views/ad-parameters-size.php'; ?>
|
25 |
</div>
|
26 |
<?php do_action( 'advanced-ads-ad-params-after', $ad, $types );
|
admin/views/ad-parameters-size.php
CHANGED
@@ -2,7 +2,9 @@
|
|
2 |
<div id="advanced-ads-ad-parameters-size">
|
3 |
<label><?php _e( 'width', 'advanced-ads' ); ?><input type="number" size="4" maxlength="4" value="<?php echo isset($ad->width) ? $ad->width : 0; ?>" name="advanced_ad[width]">px</label>
|
4 |
<label><?php _e( 'height', 'advanced-ads' ); ?><input type="number" size="4" maxlength="4" value="<?php echo isset($ad->height) ? $ad->height : 0; ?>" name="advanced_ad[height]">px</label>
|
5 |
-
<?php
|
6 |
-
|
|
|
|
|
7 |
</div>
|
8 |
<hr/>
|
2 |
<div id="advanced-ads-ad-parameters-size">
|
3 |
<label><?php _e( 'width', 'advanced-ads' ); ?><input type="number" size="4" maxlength="4" value="<?php echo isset($ad->width) ? $ad->width : 0; ?>" name="advanced_ad[width]">px</label>
|
4 |
<label><?php _e( 'height', 'advanced-ads' ); ?><input type="number" size="4" maxlength="4" value="<?php echo isset($ad->height) ? $ad->height : 0; ?>" name="advanced_ad[height]">px</label>
|
5 |
+
<?php
|
6 |
+
$show_reserve_space = in_array( $type->ID, array( 'plain', 'content', 'group', 'adsense' ) );
|
7 |
+
$enable_reserve_space = $show_reserve_space && ! empty( $ad->output['add_wrapper_sizes'] ); ?>
|
8 |
+
<label <?php if ( ! $show_reserve_space ) { echo 'style="display:none;"'; }?>><input type="checkbox" id="advads-wrapper-add-sizes" name="advanced_ad[output][add_wrapper_sizes]" value="true" <?php checked( $enable_reserve_space ); ?>><?php _e( 'reserve this space', 'advanced-ads' ); ?></label>
|
9 |
</div>
|
10 |
<hr/>
|
admin/views/ad-parameters-warnings.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if ( defined ( 'WP_DEBUG' ) && WP_DEBUG &&
|
3 |
-
( $error = Advanced_Ads_Admin_Ad_Type::check_ad_dom_is_not_valid( $ad ) ) ) : ?>
|
4 |
-
<p class="advads-error-message">
|
5 |
-
<?php _e( 'The code of this ad might not work properly with the <em>Content</em> placement.', 'advanced-ads' );
|
6 |
-
?> <?php printf(__( 'Reach out to <a href="%s">support</a> to get help.', 'advanced-ads' ), admin_url('admin.php?page=advanced-ads-support') );
|
7 |
-
if ( true === WP_DEBUG ) : ?>
|
8 |
-
<span style="white-space:pre-wrap"><?php echo $error; ?></span>
|
9 |
-
<?php endif;
|
10 |
-
?>
|
11 |
-
</p>
|
12 |
-
<?php endif;
|
13 |
-
|
14 |
-
if ( $message = Advanced_Ads_Ad_Debug::is_https_and_http( $ad ) ) : ?>
|
15 |
-
<p class="advads-error-message"><?php echo $message; ?></p>
|
16 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/views/settings.php
CHANGED
@@ -42,6 +42,8 @@ $setting_tabs = apply_filters('advanced-ads-setting-tabs', array(
|
|
42 |
<?php endforeach; ?>
|
43 |
<?php
|
44 |
do_action( 'advanced-ads-additional-settings-form' );
|
|
|
|
|
45 |
?>
|
46 |
<ul>
|
47 |
|
42 |
<?php endforeach; ?>
|
43 |
<?php
|
44 |
do_action( 'advanced-ads-additional-settings-form' );
|
45 |
+
// print the filesystem credentials modal if needed
|
46 |
+
Advanced_Ads_Filesystem::get_instance()->print_request_filesystem_credentials_modal();
|
47 |
?>
|
48 |
<ul>
|
49 |
|
advanced-ads.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
* Plugin Name: Advanced Ads
|
13 |
* Plugin URI: https://wpadvancedads.com
|
14 |
* Description: Manage and optimize your ads in WordPress
|
15 |
-
* Version: 1.7.
|
16 |
* Author: Thomas Maier
|
17 |
* Author URI: http://webgilde.com
|
18 |
* Text Domain: advanced-ads
|
@@ -39,7 +39,7 @@ define( 'ADVADS_BASE_DIR', dirname( ADVADS_BASE ) ); // directory of the plugin
|
|
39 |
// general and global slug, e.g. to store options in WP, textdomain
|
40 |
define( 'ADVADS_SLUG', 'advanced-ads' );
|
41 |
define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
|
42 |
-
define( 'ADVADS_VERSION', '1.7.
|
43 |
|
44 |
/*----------------------------------------------------------------------------*
|
45 |
* Autoloading, modules and functions
|
12 |
* Plugin Name: Advanced Ads
|
13 |
* Plugin URI: https://wpadvancedads.com
|
14 |
* Description: Manage and optimize your ads in WordPress
|
15 |
+
* Version: 1.7.17
|
16 |
* Author: Thomas Maier
|
17 |
* Author URI: http://webgilde.com
|
18 |
* Text Domain: advanced-ads
|
39 |
// general and global slug, e.g. to store options in WP, textdomain
|
40 |
define( 'ADVADS_SLUG', 'advanced-ads' );
|
41 |
define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
|
42 |
+
define( 'ADVADS_VERSION', '1.7.17' );
|
43 |
|
44 |
/*----------------------------------------------------------------------------*
|
45 |
* Autoloading, modules and functions
|
classes/ad_ajax_callbacks.php
CHANGED
@@ -55,9 +55,9 @@ class Advanced_Ads_Ad_Ajax_Callbacks {
|
|
55 |
$ad = new Advanced_Ads_Ad( $ad_id );
|
56 |
|
57 |
if ( ! empty($types[$type]) && method_exists( $types[$type], 'render_parameters' ) ) {
|
58 |
-
$types[$type]
|
|
|
59 |
|
60 |
-
include ADVADS_BASE_PATH . 'admin/views/ad-parameters-warnings.php';
|
61 |
include ADVADS_BASE_PATH . 'admin/views/ad-parameters-size.php';
|
62 |
}
|
63 |
|
55 |
$ad = new Advanced_Ads_Ad( $ad_id );
|
56 |
|
57 |
if ( ! empty($types[$type]) && method_exists( $types[$type], 'render_parameters' ) ) {
|
58 |
+
$type = $types[ $type ];
|
59 |
+
$type->render_parameters( $ad );
|
60 |
|
|
|
61 |
include ADVADS_BASE_PATH . 'admin/views/ad-parameters-size.php';
|
62 |
}
|
63 |
|
classes/ad_placements.php
CHANGED
@@ -440,8 +440,13 @@ class Advanced_Ads_Placements {
|
|
440 |
// $adContent = preg_replace('#(document.write[^<^)]+)</sc(.*)#', '$1<\/sc$2', $adContent); // too restrict, doesn’t work when beginning <script> tag is in the same line
|
441 |
$adDom->loadHtml('<!DOCTYPE html><html><meta http-equiv="Content-Type" content="text/html; charset=' . $wpCharset . '" /><body>' . $adContent);
|
442 |
// log errors
|
443 |
-
if ( defined ( 'WP_DEBUG' ) && WP_DEBUG && current_user_can( 'advanced_ads_manage_options')
|
444 |
-
|
|
|
|
|
|
|
|
|
|
|
445 |
}
|
446 |
|
447 |
// inject
|
440 |
// $adContent = preg_replace('#(document.write[^<^)]+)</sc(.*)#', '$1<\/sc$2', $adContent); // too restrict, doesn’t work when beginning <script> tag is in the same line
|
441 |
$adDom->loadHtml('<!DOCTYPE html><html><meta http-equiv="Content-Type" content="text/html; charset=' . $wpCharset . '" /><body>' . $adContent);
|
442 |
// log errors
|
443 |
+
if ( defined ( 'WP_DEBUG' ) && WP_DEBUG && current_user_can( 'advanced_ads_manage_options' ) ) {
|
444 |
+
foreach( libxml_get_errors() as $_error ) {
|
445 |
+
// continue, if there is '&' symbol, but not HTML entity
|
446 |
+
if ( false === stripos( $_error->message, 'htmlParseEntityRef:' ) ) {
|
447 |
+
Advanced_Ads::log( 'possible content injection error for placement "' . $placement_id . '": ' . print_r( $_error, true ) );
|
448 |
+
}
|
449 |
+
}
|
450 |
}
|
451 |
|
452 |
// inject
|
classes/ad_type_content.php
CHANGED
@@ -60,9 +60,12 @@ class Advanced_Ads_Ad_Type_Content extends Advanced_Ads_Ad_Type_Abstract{
|
|
60 |
* don’t build it when ajax is used; display message and buttons instead
|
61 |
*/
|
62 |
if ( defined( 'DOING_AJAX' ) ){ ?>
|
63 |
-
<textarea id="advads-ad-content-plain" style="display:none;" cols="40" rows="10" name="advanced_ad[content]"><?php echo $content; ?></textarea>
|
64 |
<?php
|
65 |
} else {
|
|
|
|
|
|
|
66 |
$args = array(
|
67 |
'textarea_name' => 'advanced_ad[content]',
|
68 |
'textarea_rows' => 10,
|
60 |
* don’t build it when ajax is used; display message and buttons instead
|
61 |
*/
|
62 |
if ( defined( 'DOING_AJAX' ) ){ ?>
|
63 |
+
<textarea id="advads-ad-content-plain" style="display:none;" cols="40" rows="10" name="advanced_ad[content]"><?php echo esc_textarea( $content ); ?></textarea>
|
64 |
<?php
|
65 |
} else {
|
66 |
+
if ( ! user_can_richedit() ) {
|
67 |
+
$content = esc_textarea( $content );
|
68 |
+
}
|
69 |
$args = array(
|
70 |
'textarea_name' => 'advanced_ad[content]',
|
71 |
'textarea_rows' => 10,
|
classes/ad_type_plain.php
CHANGED
@@ -50,7 +50,7 @@ class Advanced_Ads_Ad_Type_Plain extends Advanced_Ads_Ad_Type_Abstract{
|
|
50 |
$content = (isset($ad->content)) ? $ad->content : '';
|
51 |
|
52 |
?><p class="description"><?php _e( 'Insert plain text or code into this field.', 'advanced-ads' ); ?></p>
|
53 |
-
<textarea id="advads-ad-content-plain" cols="40" rows="10" name="advanced_ad[content]"><?php echo $content; ?></textarea>
|
54 |
<?php include ADVADS_BASE_PATH . 'admin/views/ad-info-after-textarea.php'; ?>
|
55 |
<input type="hidden" name="advanced_ad[output][allow_php]" value="0"/>
|
56 |
<?php $this->render_php_allow($ad);
|
50 |
$content = (isset($ad->content)) ? $ad->content : '';
|
51 |
|
52 |
?><p class="description"><?php _e( 'Insert plain text or code into this field.', 'advanced-ads' ); ?></p>
|
53 |
+
<textarea id="advads-ad-content-plain" cols="40" rows="10" name="advanced_ad[content]"><?php echo esc_textarea( $content ); ?></textarea>
|
54 |
<?php include ADVADS_BASE_PATH . 'admin/views/ad-info-after-textarea.php'; ?>
|
55 |
<input type="hidden" name="advanced_ad[output][allow_php]" value="0"/>
|
56 |
<?php $this->render_php_allow($ad);
|
classes/filesystem.php
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @since 1.7.17
|
4 |
+
*/
|
5 |
+
class Advanced_Ads_Filesystem {
|
6 |
+
/**
|
7 |
+
* Singleton instance of the class
|
8 |
+
*
|
9 |
+
* @var Advanced_Ads_Filesystem
|
10 |
+
*/
|
11 |
+
protected static $instance;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Return an instance of Advanced_Ads_Filesystem
|
15 |
+
*
|
16 |
+
* @return Advanced_Ads_Filesystem
|
17 |
+
*/
|
18 |
+
public static function get_instance() {
|
19 |
+
if ( null === self::$instance ) {
|
20 |
+
self::$instance = new self;
|
21 |
+
}
|
22 |
+
|
23 |
+
return self::$instance;
|
24 |
+
}
|
25 |
+
|
26 |
+
private function __construct() {}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Connect to the filesystem.
|
30 |
+
*
|
31 |
+
* @param array $directories A list of directories. If any of these do
|
32 |
+
* not exist, a WP_Error object will be returned.
|
33 |
+
* @return bool|WP_Error True if able to connect, false or a WP_Error otherwise.
|
34 |
+
*/
|
35 |
+
public function fs_connect( $directories = array() ) {
|
36 |
+
global $wp_filesystem;
|
37 |
+
$directories = ( is_array( $directories ) && count( $directories ) ) ? $directories : array( WP_CONTENT_DIR );
|
38 |
+
|
39 |
+
// This will output a credentials form in event of failure, We don't want that, so just hide with a buffer.
|
40 |
+
ob_start();
|
41 |
+
$credentials = request_filesystem_credentials( '', '', false, $directories[0] );
|
42 |
+
ob_end_clean();
|
43 |
+
|
44 |
+
if ( false === $credentials ) {
|
45 |
+
return false;
|
46 |
+
}
|
47 |
+
|
48 |
+
if ( ! WP_Filesystem( $credentials ) ) {
|
49 |
+
$error = true;
|
50 |
+
if ( is_object( $wp_filesystem ) && $wp_filesystem->errors->get_error_code() ) {
|
51 |
+
$error = $wp_filesystem->errors;
|
52 |
+
}
|
53 |
+
// Failed to connect, Error and request again.
|
54 |
+
ob_start();
|
55 |
+
request_filesystem_credentials( '', '', $error, $directories[0] );
|
56 |
+
ob_end_clean();
|
57 |
+
return false;
|
58 |
+
}
|
59 |
+
|
60 |
+
if ( ! is_object( $wp_filesystem) ) {
|
61 |
+
return new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.', 'advanced-ads' ) );
|
62 |
+
}
|
63 |
+
|
64 |
+
if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
|
65 |
+
return new WP_Error( 'fs_error', __( 'Filesystem error.' ), $wp_filesystem->errors);
|
66 |
+
}
|
67 |
+
|
68 |
+
foreach ( (array) $directories as $dir ) {
|
69 |
+
switch ( $dir ) {
|
70 |
+
case ABSPATH:
|
71 |
+
if ( ! $wp_filesystem->abspath() )
|
72 |
+
return new WP_Error( 'fs_no_root_dir', __( 'Unable to locate WordPress root directory.', 'advanced-ads' ) );
|
73 |
+
break;
|
74 |
+
case WP_CONTENT_DIR:
|
75 |
+
if ( ! $wp_filesystem->wp_content_dir() )
|
76 |
+
return new WP_Error( 'fs_no_content_dir', __( 'Unable to locate WordPress content directory (wp-content).', 'advanced-ads' ) );
|
77 |
+
break;
|
78 |
+
default:
|
79 |
+
if ( ! $wp_filesystem->find_folder( $dir ) )
|
80 |
+
return new WP_Error( 'fs_no_folder', sprintf( __( 'Unable to locate needed folder (%s).', 'advanced-ads' ) , esc_html( basename( $dir ) ) ) );
|
81 |
+
break;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
return true;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Replace the 'direct' absolute path with the Filesystem API path. Useful only when the 'direct' method is not used.
|
90 |
+
* Check https://codex.wordpress.org/Filesystem_API for info
|
91 |
+
*
|
92 |
+
* @param string existing path
|
93 |
+
* @return string normalized path
|
94 |
+
*/
|
95 |
+
public function normalize_path( $path ) {
|
96 |
+
global $wp_filesystem;
|
97 |
+
return str_replace( ABSPATH, $wp_filesystem->abspath(), $path );
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Print the filesystem credentials modal when needed.
|
102 |
+
*/
|
103 |
+
public function print_request_filesystem_credentials_modal() {
|
104 |
+
if ( function_exists( 'wp_print_request_filesystem_credentials_modal' ) ) {
|
105 |
+
return wp_print_request_filesystem_credentials_modal();
|
106 |
+
}
|
107 |
+
|
108 |
+
$filesystem_method = get_filesystem_method();
|
109 |
+
ob_start();
|
110 |
+
$filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() );
|
111 |
+
ob_end_clean();
|
112 |
+
$request_filesystem_credentials = ( $filesystem_method != 'direct' && ! $filesystem_credentials_are_stored );
|
113 |
+
if ( ! $request_filesystem_credentials ) {
|
114 |
+
return;
|
115 |
+
}
|
116 |
+
?>
|
117 |
+
<div id="request-filesystem-credentials-dialog" class="notification-dialog-wrap request-filesystem-credentials-dialog">
|
118 |
+
<div class="notification-dialog-background"></div>
|
119 |
+
<div class="notification-dialog" role="dialog" aria-labelledby="request-filesystem-credentials-title" tabindex="0">
|
120 |
+
<div class="request-filesystem-credentials-dialog-content">
|
121 |
+
<?php request_filesystem_credentials( site_url() ); ?>
|
122 |
+
</div>
|
123 |
+
</div>
|
124 |
+
</div>
|
125 |
+
<?php
|
126 |
+
}
|
127 |
+
}
|
modules/ad-blocker/admin/admin.php
CHANGED
@@ -118,23 +118,33 @@ class Advanced_Ads_Ad_Blocker_Admin
|
|
118 |
*
|
119 |
*/
|
120 |
public function add_asset_rebuild_form() {
|
|
|
121 |
$success = false;
|
122 |
$message = '';
|
123 |
-
|
124 |
-
if ( isset( $_POST['advads_ab_form_submit'] ) ) {
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
$success = false;
|
130 |
$message = $output->get_error_message();
|
131 |
} else {
|
132 |
$success = true;
|
133 |
$message = __( 'The asset folder was rebuilt successfully', 'advanced-ads' );
|
134 |
}
|
|
|
135 |
|
136 |
-
|
137 |
-
}
|
138 |
}
|
139 |
|
140 |
/**
|
@@ -143,23 +153,9 @@ class Advanced_Ads_Ad_Blocker_Admin
|
|
143 |
* @param str $form_url - URL of the page to display request form
|
144 |
* @return true on success, false in case of wrong credentials, WP_Error in case of error
|
145 |
**/
|
146 |
-
function process_form( $form_url ){
|
147 |
-
check_ajax_referer( 'advads_ab_form_nonce', 'security' );
|
148 |
-
|
149 |
-
//fields that should be preserved across screens (when ftp/ssh login screen appears)
|
150 |
-
$preserved_form_fields = array( 'advads_ab_form_submit', 'advads_ab_assign_new_folder', 'security', '_wp_http_referer' );
|
151 |
-
//leave this empty to perform test for 'direct' writing
|
152 |
-
$method = '';
|
153 |
-
//target folder
|
154 |
-
$context = $this->upload_dir['basedir'];
|
155 |
-
//page url with nonce value
|
156 |
-
$form_url = wp_nonce_url( $form_url, 'advads_ab_form_nonce', 'security' );
|
157 |
-
|
158 |
-
if ( ! $this->filesystem_init( $form_url, $method, $context, $preserved_form_fields ) ) {
|
159 |
-
return false; //stop further processing when request form is displaying
|
160 |
-
}
|
161 |
// at this point we do not need ftp/ssh credentials anymore
|
162 |
-
$form_post_fields = array_intersect_key( $_POST,
|
163 |
|
164 |
$this->create_dummy_plugin( $form_post_fields );
|
165 |
|
@@ -174,35 +170,6 @@ class Advanced_Ads_Ad_Blocker_Admin
|
|
174 |
return true;
|
175 |
}
|
176 |
|
177 |
-
/**
|
178 |
-
* Initialize Filesystem object
|
179 |
-
*
|
180 |
-
* @param str $form_url - URL of the page to display request form
|
181 |
-
* @param str $method - connection method
|
182 |
-
* @param str $context - destination folder
|
183 |
-
* @param array $fields - fileds of $_POST array that should be preserved between screens
|
184 |
-
* @return bool - false on failure, stored text on success
|
185 |
-
*
|
186 |
-
**/
|
187 |
-
function filesystem_init( $form_url, $method, $context, $fields = null ) {
|
188 |
-
global $wp_filesystem;
|
189 |
-
|
190 |
-
// first attempt to get credentials
|
191 |
-
if ( false === ( $creds = request_filesystem_credentials( $form_url, $method, false, $context, $fields ) ) ) {
|
192 |
-
// we don't have credentials, so the request for them is displaying, no need for further processing
|
193 |
-
return false;
|
194 |
-
}
|
195 |
-
|
196 |
-
// now we got some credentials - try to use them
|
197 |
-
if ( ! WP_Filesystem( $creds ) ) {
|
198 |
-
// incorrect connection data - ask for credentials again, now with error message
|
199 |
-
request_filesystem_credentials( $form_url, $method, true, $context, $fields );
|
200 |
-
return false;
|
201 |
-
}
|
202 |
-
|
203 |
-
return true; //filesystem object successfully initiated
|
204 |
-
}
|
205 |
-
|
206 |
/**
|
207 |
* Add settings to settings page
|
208 |
*
|
@@ -273,14 +240,14 @@ class Advanced_Ads_Ad_Blocker_Admin
|
|
273 |
if ( ! empty( $this->options['folder_name'] ) ) {
|
274 |
$new_options['folder_name'] = $new_options_error['folder_name'] = $this->options['folder_name'];
|
275 |
|
276 |
-
$old_folder_normalized =
|
277 |
|
278 |
if ( $wp_filesystem->exists( $old_folder_normalized ) ) {
|
279 |
|
280 |
if ( $need_assign_new_name ) {
|
281 |
$existing_files[] = (string) $new_options['folder_name'];
|
282 |
$new_folder_name = $this->generate_unique_name( $existing_files );
|
283 |
-
$new_folder_normalized =
|
284 |
|
285 |
if ( ! $wp_filesystem->move( $old_folder_normalized, $new_folder_normalized ) ) {
|
286 |
$message = sprintf( __( 'Unable to rename "%s" directory', 'advanced-ads' ), $old_folder_normalized );
|
@@ -352,7 +319,7 @@ class Advanced_Ads_Ad_Blocker_Admin
|
|
352 |
global $wp_filesystem;
|
353 |
|
354 |
// Are we completely rebuilding the assets folder?
|
355 |
-
$normalized_asset_path =
|
356 |
$asset_path = trailingslashit( $this->upload_dir['basedir'] ) . $folder_name ;
|
357 |
|
358 |
// already saved associations (original name => replaced name)
|
@@ -456,8 +423,8 @@ class Advanced_Ads_Ad_Blocker_Admin
|
|
456 |
}
|
457 |
}
|
458 |
|
459 |
-
$file =
|
460 |
-
$new_abs_file =
|
461 |
|
462 |
// Copy the file to our new magic directory
|
463 |
if ( ! $wp_filesystem->copy( $file, $new_abs_file, true, FS_CHMOD_FILE ) ) {
|
@@ -535,22 +502,16 @@ class Advanced_Ads_Ad_Blocker_Admin
|
|
535 |
*/
|
536 |
public function process_auto_update() {
|
537 |
$advads_options = Advanced_Ads::get_instance()->options();
|
538 |
-
if ( ! isset( $advads_options['use-adblocker'] )
|
539 |
-
|
540 |
-
}
|
541 |
|
542 |
//if module is working without errors and there are new assets
|
543 |
if ( ! empty( $this->options['module_can_work'] ) && count( $this->get_assets() ) ) {
|
544 |
-
|
545 |
-
// we can not update assets automatically. The user should visit the setting page and update assets manually
|
546 |
-
// disable module and show notice
|
547 |
-
unset( $this->options['module_can_work'] );
|
548 |
-
update_option( ADVADS_AB_SLUG, $this->options);
|
549 |
-
return;
|
550 |
-
}
|
551 |
|
552 |
-
$
|
553 |
-
|
554 |
// disable module and show notice
|
555 |
unset( $this->options['module_can_work'] );
|
556 |
update_option( ADVADS_AB_SLUG, $this->options);
|
@@ -569,18 +530,6 @@ class Advanced_Ads_Ad_Blocker_Admin
|
|
569 |
|
570 |
}
|
571 |
|
572 |
-
/**
|
573 |
-
* Replaces the 'direct' absolute path with the Filesystem API path. Useful only when the 'direct' method is not used.
|
574 |
-
* Check https://codex.wordpress.org/Filesystem_API for info
|
575 |
-
*
|
576 |
-
* @param string existing path
|
577 |
-
* @return string normalized path
|
578 |
-
*/
|
579 |
-
public function normalize_path( $path ) {
|
580 |
-
global $wp_filesystem;
|
581 |
-
return str_replace( ABSPATH, $wp_filesystem->abspath(), $path );
|
582 |
-
}
|
583 |
-
|
584 |
/**
|
585 |
* Renders the settings page for this module
|
586 |
*
|
118 |
*
|
119 |
*/
|
120 |
public function add_asset_rebuild_form() {
|
121 |
+
global $wp_filesystem;
|
122 |
$success = false;
|
123 |
$message = '';
|
124 |
+
|
125 |
+
if ( ! isset( $_POST['advads_ab_form_submit'] ) ) { return; }
|
126 |
+
check_ajax_referer( 'advads_ab_form_nonce', 'security' );
|
127 |
+
|
128 |
+
$fs_connect = Advanced_Ads_Filesystem::get_instance()->fs_connect( $this->upload_dir['basedir'] );
|
129 |
+
|
130 |
+
if ( false === $fs_connect || is_wp_error( $fs_connect ) ) {
|
131 |
+
$message = __( 'Unable to connect to the filesystem. Please confirm your credentials.', 'advanced-ads-pro' );
|
132 |
+
|
133 |
+
if ( $wp_filesystem instanceof WP_Filesystem_Base && is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
|
134 |
+
$message = esc_html( $wp_filesystem->errors->get_error_message() );
|
135 |
+
}
|
136 |
+
} else {
|
137 |
+
$output = $this->process_form();
|
138 |
+
if ( is_wp_error( $output ) ) {
|
139 |
$success = false;
|
140 |
$message = $output->get_error_message();
|
141 |
} else {
|
142 |
$success = true;
|
143 |
$message = __( 'The asset folder was rebuilt successfully', 'advanced-ads' );
|
144 |
}
|
145 |
+
}
|
146 |
|
147 |
+
include ADVADS_AB_BASE_PATH . 'admin/views/rebuild_form.php';
|
|
|
148 |
}
|
149 |
|
150 |
/**
|
153 |
* @param str $form_url - URL of the page to display request form
|
154 |
* @return true on success, false in case of wrong credentials, WP_Error in case of error
|
155 |
**/
|
156 |
+
private function process_form( $form_url = false ){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
// at this point we do not need ftp/ssh credentials anymore
|
158 |
+
$form_post_fields = array_intersect_key( $_POST, array( 'advads_ab_assign_new_folder' => false ) );
|
159 |
|
160 |
$this->create_dummy_plugin( $form_post_fields );
|
161 |
|
170 |
return true;
|
171 |
}
|
172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
/**
|
174 |
* Add settings to settings page
|
175 |
*
|
240 |
if ( ! empty( $this->options['folder_name'] ) ) {
|
241 |
$new_options['folder_name'] = $new_options_error['folder_name'] = $this->options['folder_name'];
|
242 |
|
243 |
+
$old_folder_normalized = Advanced_Ads_Filesystem::get_instance()->normalize_path( trailingslashit( $this->upload_dir['basedir'] ) . $this->options['folder_name'] );
|
244 |
|
245 |
if ( $wp_filesystem->exists( $old_folder_normalized ) ) {
|
246 |
|
247 |
if ( $need_assign_new_name ) {
|
248 |
$existing_files[] = (string) $new_options['folder_name'];
|
249 |
$new_folder_name = $this->generate_unique_name( $existing_files );
|
250 |
+
$new_folder_normalized = Advanced_Ads_Filesystem::get_instance()->normalize_path( trailingslashit( $this->upload_dir['basedir'] ) . $new_folder_name );
|
251 |
|
252 |
if ( ! $wp_filesystem->move( $old_folder_normalized, $new_folder_normalized ) ) {
|
253 |
$message = sprintf( __( 'Unable to rename "%s" directory', 'advanced-ads' ), $old_folder_normalized );
|
319 |
global $wp_filesystem;
|
320 |
|
321 |
// Are we completely rebuilding the assets folder?
|
322 |
+
$normalized_asset_path = Advanced_Ads_Filesystem::get_instance()->normalize_path( trailingslashit( $this->upload_dir['basedir'] ) . $folder_name );
|
323 |
$asset_path = trailingslashit( $this->upload_dir['basedir'] ) . $folder_name ;
|
324 |
|
325 |
// already saved associations (original name => replaced name)
|
423 |
}
|
424 |
}
|
425 |
|
426 |
+
$file = Advanced_Ads_Filesystem::get_instance()->normalize_path( $file );
|
427 |
+
$new_abs_file = Advanced_Ads_Filesystem::get_instance()->normalize_path( $new_abs_file );
|
428 |
|
429 |
// Copy the file to our new magic directory
|
430 |
if ( ! $wp_filesystem->copy( $file, $new_abs_file, true, FS_CHMOD_FILE ) ) {
|
502 |
*/
|
503 |
public function process_auto_update() {
|
504 |
$advads_options = Advanced_Ads::get_instance()->options();
|
505 |
+
if ( ! isset( $advads_options['use-adblocker'] )
|
506 |
+
|| ! $this->upload_dir
|
507 |
+
) { return; }
|
508 |
|
509 |
//if module is working without errors and there are new assets
|
510 |
if ( ! empty( $this->options['module_can_work'] ) && count( $this->get_assets() ) ) {
|
511 |
+
$fs_connect = Advanced_Ads_Filesystem::get_instance()->fs_connect( $this->upload_dir['basedir'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
512 |
|
513 |
+
if ( false === $fs_connect || is_wp_error( $fs_connect ) ) {
|
514 |
+
// we can not update assets automatically. The user should visit the setting page and update assets manually
|
515 |
// disable module and show notice
|
516 |
unset( $this->options['module_can_work'] );
|
517 |
update_option( ADVADS_AB_SLUG, $this->options);
|
530 |
|
531 |
}
|
532 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
533 |
/**
|
534 |
* Renders the settings page for this module
|
535 |
*
|
modules/ad-blocker/admin/views/rebuild_form.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
<p class="advads-error-message"><?php _e( 'Upload folder is not writable', 'advanced-ads' ); ?></p>
|
11 |
<?php
|
12 |
else: ?>
|
13 |
-
<form method="post" action="">
|
14 |
<input type="hidden" name="advads_ab_form_submit" value="true">
|
15 |
<?php wp_nonce_field( 'advads_ab_form_nonce', 'security' );
|
16 |
if ( ! empty( $this->options['folder_name'] ) && ! empty( $this->options['module_can_work'] ) ): ?>
|
10 |
<p class="advads-error-message"><?php _e( 'Upload folder is not writable', 'advanced-ads' ); ?></p>
|
11 |
<?php
|
12 |
else: ?>
|
13 |
+
<form id="advanced-ads-rebuild-assets-form" method="post" action="">
|
14 |
<input type="hidden" name="advads_ab_form_submit" value="true">
|
15 |
<?php wp_nonce_field( 'advads_ab_form_nonce', 'security' );
|
16 |
if ( ! empty( $this->options['folder_name'] ) && ! empty( $this->options['module_can_work'] ) ): ?>
|
modules/gadsense/public/public.php
CHANGED
@@ -27,7 +27,7 @@ class Advanced_Ads_AdSense_Public {
|
|
27 |
$options = $this->data->get_options();
|
28 |
$pub_id = trim( $this->data->get_adsense_id() );
|
29 |
|
30 |
-
if( $pub_id && isset( $options['page-level-enabled'] ) && $options['page-level-enabled'] ){
|
31 |
$pub_id = $this->data->get_adsense_id();
|
32 |
$client_id = 'ca-' . $pub_id;
|
33 |
include GADSENSE_BASE_PATH . 'public/templates/page-level.php';
|
27 |
$options = $this->data->get_options();
|
28 |
$pub_id = trim( $this->data->get_adsense_id() );
|
29 |
|
30 |
+
if( ! defined( 'ADVADS_ADS_DISABLED' ) && $pub_id && isset( $options['page-level-enabled'] ) && $options['page-level-enabled'] ){
|
31 |
$pub_id = $this->data->get_adsense_id();
|
32 |
$client_id = 'ca-' . $pub_id;
|
33 |
include GADSENSE_BASE_PATH . 'public/templates/page-level.php';
|
public/assets/js/advanced.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
advads={supports_localstorage:function(){try{return"localStorage"in window&&null!==window.localStorage}catch(
|
1 |
+
advads={supports_localstorage:function(){try{return"localStorage"in window&&null!==window.localStorage}catch(a){return!1}},max_per_session:function(a,b){var c=1;if(void 0!==b&&0!==parseInt(b)||(b=1),this.cookie_exists(a)){if(this.get_cookie(a)>=b)return!0;c+=parseInt(this.get_cookie(a))}return this.set_cookie(a,c),!1},count_up:function(a,b){var c=1;this.cookie_exists(a)&&(c+=parseInt(this.get_cookie(a))),this.set_cookie(a,c)},set_cookie_exists:function(a){return!!get_cookie(a)||(set_cookie(a,"",0),!1)},get_cookie:function(a){var b,c,d,e=document.cookie.split(";");for(b=0;b<e.length;b++)if(c=e[b].substr(0,e[b].indexOf("=")),d=e[b].substr(e[b].indexOf("=")+1),c=c.replace(/^\s+|\s+$/g,""),c===a)return unescape(d)},set_cookie:function(a,b,c,d,e,f){var g=24*c*60*60;this.set_cookie_sec(a,b,g,d,e,f)},set_cookie_sec:function(a,b,c,d,e,f){var g=new Date;g.setSeconds(g.getSeconds()+parseInt(c)),document.cookie=a+"="+escape(b)+(null==c?"":"; expires="+g.toUTCString())+(null==d?"; path=/":"; path="+d)+(null==e?"":"; domain="+e)+(null==f?"":"; secure")},cookie_exists:function(a){var b=this.get_cookie(a);return null!==b&&""!==b&&void 0!==b},move:function(a,b,c){var d=jQuery(a);if("undefined"==typeof c&&(c={}),"undefined"==typeof c.css&&(c.css={}),"undefined"==typeof c.method&&(c.method="prependTo"),""===b&&"undefined"!=typeof c.target)switch(c.target){case"wrapper":var e="left";"undefined"!=typeof c.offset&&(e=c.offset),b=this.find_wrapper(a,e)}switch(b=jQuery(b).filter(":visible"),c.method){case"insertBefore":d.insertBefore(b);break;case"insertAfter":d.insertAfter(b);break;case"appendTo":d.appendTo(b);break;case"prependTo":d.prependTo(b);break;default:d.prependTo(b)}},fix_element:function(a,b){var c=jQuery(a),d=c.parent();"static"!==d.css("position")&&""!==d.css("position")||d.css("position","relative"),"undefined"!=typeof b&&b.is_invisible&&c.show();var e=parseInt(c.offset().top),f=parseInt(c.offset().left);"undefined"!=typeof b&&b.is_invisible&&c.hide(),c.css("position","fixed").css("top",e+"px").css("left",f+"px")},find_wrapper:function(a,b){var c;return jQuery("body").children().each(function(d,e){if(e.id!==a.substring(1)){var f=jQuery(e);if("right"===b&&f.offset().left+jQuery(f).width()<jQuery(window).width()||"left"===b&&f.offset().left>0)return"static"!==f.css("position")&&""!==f.css("position")||f.css("position","relative"),c=e,!1}}),c},center_fixed_element:function(a){var b=jQuery(a),c=jQuery(window).width()/2-parseInt(b.css("width"))/2;b.css("left",c+"px")},center_vertically:function(a){var b=jQuery(a),c=jQuery(window).height()/2-parseInt(b.css("height"))/2;b.css("top",c+"px")},close:function(a){var b=jQuery(a);b.remove()}},jQuery(document).ready(function(){if(advads.supports_localstorage()&&localStorage.getItem("advads_frontend_picker")){var a,b=jQuery("<div id='advads-picker-overlay'>"),c=[document.body,document.documentElement,document];b.css({position:"absolute",border:"solid 2px #428bca",backgroundColor:"rgba(66,139,202,0.5)",boxSizing:"border-box",zIndex:1e6,pointerEvents:"none"}).prependTo("body"),jQuery(document).mousemove(function(d){if(d.target!==a){if(~c.indexOf(d.target))return a=null,void b.hide();var e=jQuery(d.target),f=e.offset(),g=e.outerWidth(),h=e.outerHeight();a=d.target,b.css({top:f.top,left:f.left,width:g,height:h}).show(),console.log(jQuery(a).getPath())}}),jQuery(document).click(function(b){var c=jQuery(a).getPath();localStorage.setItem("advads_frontend_element",c),window.location=localStorage.getItem("advads_prev_url")})}}),jQuery.fn.extend({getPath:function(a,b){if("undefined"==typeof a&&(a=""),"undefined"==typeof b&&(b=0),this.is("html"))return"html > "+a;if(3===b)return a;var c=this.get(0).nodeName.toLowerCase(),d=this.attr("id"),e=this.attr("class");return b+=1,"undefined"==typeof d||/\d/.test(d)?"undefined"!=typeof e&&(e=e.split(/[\s\n]+/),e=jQuery.grep(e,function(a,b){return!/\d/.test(a)}),e.length&&(c+="."+e.slice(0,2).join("."))):c+="#"+d,this.siblings(c).length&&(c+=":eq("+this.siblings(c).addBack().not("#advads-picker-overlay").index(this)+")"),""===a?this.parent().getPath(c,b):this.parent().getPath(c+" > "+a,b)}});
|
public/assets/js/advanced.orig.js
CHANGED
@@ -140,7 +140,7 @@ advads = {
|
|
140 |
{
|
141 |
|
142 |
var el = jQuery(element);
|
143 |
-
|
144 |
if( typeof options === 'undefined' ){
|
145 |
options = {};
|
146 |
}
|
@@ -163,6 +163,9 @@ advads = {
|
|
163 |
break;
|
164 |
}
|
165 |
}
|
|
|
|
|
|
|
166 |
|
167 |
// switch insert method
|
168 |
switch( options.method ){
|
140 |
{
|
141 |
|
142 |
var el = jQuery(element);
|
143 |
+
|
144 |
if( typeof options === 'undefined' ){
|
145 |
options = {};
|
146 |
}
|
163 |
break;
|
164 |
}
|
165 |
}
|
166 |
+
|
167 |
+
// use only visible elements
|
168 |
+
target = jQuery( target ).filter(':visible');
|
169 |
|
170 |
// switch insert method
|
171 |
switch( options.method ){
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: webzunft
|
|
3 |
Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5RRRCEBGN3UT2
|
4 |
Tags: ads, ad, ad inserter, ad injection, ad manager, ads manager, ad widget, adrotate, adsense, advertise, advertisements, advertising, adverts, advert, amazon, banner, banners, buysellads, chitika, clickbank, dfp, doubleclick, geotarget, geolocation, geo location, google dfp, monetization, widget
|
5 |
Requires at least: WP 4.2, PHP 5.3
|
6 |
-
Tested up to: 4.7
|
7 |
-
Stable tag: 1.7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -208,6 +208,17 @@ There is no revenue share. Advanced Ads doesn’t alter your ad codes in a way t
|
|
208 |
|
209 |
== Changelog ==
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
= 1.7.16 =
|
212 |
|
213 |
* added helpful links when download of an add-on failed
|
3 |
Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5RRRCEBGN3UT2
|
4 |
Tags: ads, ad, ad inserter, ad injection, ad manager, ads manager, ad widget, adrotate, adsense, advertise, advertisements, advertising, adverts, advert, amazon, banner, banners, buysellads, chitika, clickbank, dfp, doubleclick, geotarget, geolocation, geo location, google dfp, monetization, widget
|
5 |
Requires at least: WP 4.2, PHP 5.3
|
6 |
+
Tested up to: 4.7.2
|
7 |
+
Stable tag: 1.7.17
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
208 |
|
209 |
== Changelog ==
|
210 |
|
211 |
+
= 1.7.17 =
|
212 |
+
|
213 |
+
* add `ADVANCED_ADS_DISABLE_SHORTCODE_BUTTON` constant to wp-config.php in order to remove the shortcode button from the TinyMCE interface
|
214 |
+
* don’t move ads into hidden elements
|
215 |
+
* set license key fields to readonly after updated
|
216 |
+
* show "reserve ad space" only for ad types where it makes sense
|
217 |
+
* using WordPress Filesystem to create ad block disguise folder
|
218 |
+
* disable page level ads on pages where all ads are disabled
|
219 |
+
* hide double compatibility warning with cache-busting in Advanced Ads Pro
|
220 |
+
* hide warning about unexcaped `&` in urls
|
221 |
+
|
222 |
= 1.7.16 =
|
223 |
|
224 |
* added helpful links when download of an add-on failed
|
vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInite8d938e740fc662897f00c6b300999d2::getLoader();
|
vendor/composer/ClassLoader.php
CHANGED
@@ -13,9 +13,7 @@
|
|
13 |
namespace Composer\Autoload;
|
14 |
|
15 |
/**
|
16 |
-
* ClassLoader implements a PSR-0 class loader
|
17 |
-
*
|
18 |
-
* See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
|
19 |
*
|
20 |
* $loader = new \Composer\Autoload\ClassLoader();
|
21 |
*
|
@@ -39,6 +37,8 @@ namespace Composer\Autoload;
|
|
39 |
*
|
40 |
* @author Fabien Potencier <fabien@symfony.com>
|
41 |
* @author Jordi Boggiano <j.boggiano@seld.be>
|
|
|
|
|
42 |
*/
|
43 |
class ClassLoader
|
44 |
{
|
@@ -147,7 +147,7 @@ class ClassLoader
|
|
147 |
* appending or prepending to the ones previously set for this namespace.
|
148 |
*
|
149 |
* @param string $prefix The prefix/namespace, with trailing '\\'
|
150 |
-
* @param array|string $paths The PSR-
|
151 |
* @param bool $prepend Whether to prepend the directories
|
152 |
*
|
153 |
* @throws \InvalidArgumentException
|
13 |
namespace Composer\Autoload;
|
14 |
|
15 |
/**
|
16 |
+
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
|
|
|
|
17 |
*
|
18 |
* $loader = new \Composer\Autoload\ClassLoader();
|
19 |
*
|
37 |
*
|
38 |
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
+
* @see http://www.php-fig.org/psr/psr-0/
|
41 |
+
* @see http://www.php-fig.org/psr/psr-4/
|
42 |
*/
|
43 |
class ClassLoader
|
44 |
{
|
147 |
* appending or prepending to the ones previously set for this namespace.
|
148 |
*
|
149 |
* @param string $prefix The prefix/namespace, with trailing '\\'
|
150 |
+
* @param array|string $paths The PSR-4 base directories
|
151 |
* @param bool $prepend Whether to prepend the directories
|
152 |
*
|
153 |
* @throws \InvalidArgumentException
|
vendor/composer/LICENSE
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
|
2 |
-
Copyright (c)
|
3 |
|
4 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 |
of this software and associated documentation files (the "Software"), to deal
|
1 |
|
2 |
+
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
|
3 |
|
4 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 |
of this software and associated documentation files (the "Software"), to deal
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -26,6 +26,7 @@ return array(
|
|
26 |
'Advanced_Ads_Ajax' => $baseDir . '/classes/ad-ajax.php',
|
27 |
'Advanced_Ads_Checks' => $baseDir . '/classes/checks.php',
|
28 |
'Advanced_Ads_Display_Conditions' => $baseDir . '/classes/display-conditions.php',
|
|
|
29 |
'Advanced_Ads_Frontend_Checks' => $baseDir . '/classes/frontend_checks.php',
|
30 |
'Advanced_Ads_Group' => $baseDir . '/classes/ad_group.php',
|
31 |
'Advanced_Ads_Groups_List' => $baseDir . '/admin/includes/class-ad-groups-list.php',
|
@@ -39,5 +40,79 @@ return array(
|
|
39 |
'Advanced_Ads_Utils' => $baseDir . '/classes/utils.php',
|
40 |
'Advanced_Ads_Visitor_Conditions' => $baseDir . '/classes/visitor-conditions.php',
|
41 |
'Advanced_Ads_Widget' => $baseDir . '/classes/widget.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
'EDD_SL_Plugin_Updater' => $baseDir . '/classes/EDD_SL_Plugin_Updater.php',
|
|
|
|
|
43 |
);
|
26 |
'Advanced_Ads_Ajax' => $baseDir . '/classes/ad-ajax.php',
|
27 |
'Advanced_Ads_Checks' => $baseDir . '/classes/checks.php',
|
28 |
'Advanced_Ads_Display_Conditions' => $baseDir . '/classes/display-conditions.php',
|
29 |
+
'Advanced_Ads_Filesystem' => $baseDir . '/classes/filesystem.php',
|
30 |
'Advanced_Ads_Frontend_Checks' => $baseDir . '/classes/frontend_checks.php',
|
31 |
'Advanced_Ads_Group' => $baseDir . '/classes/ad_group.php',
|
32 |
'Advanced_Ads_Groups_List' => $baseDir . '/admin/includes/class-ad-groups-list.php',
|
40 |
'Advanced_Ads_Utils' => $baseDir . '/classes/utils.php',
|
41 |
'Advanced_Ads_Visitor_Conditions' => $baseDir . '/classes/visitor-conditions.php',
|
42 |
'Advanced_Ads_Widget' => $baseDir . '/classes/widget.php',
|
43 |
+
'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php',
|
44 |
+
'Composer\\Installers\\AimeosInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
|
45 |
+
'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
|
46 |
+
'Composer\\Installers\\AsgardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
|
47 |
+
'Composer\\Installers\\AttogramInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
|
48 |
+
'Composer\\Installers\\BaseInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
|
49 |
+
'Composer\\Installers\\BitrixInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
|
50 |
+
'Composer\\Installers\\BonefishInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
|
51 |
+
'Composer\\Installers\\CakePHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
|
52 |
+
'Composer\\Installers\\ChefInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
|
53 |
+
'Composer\\Installers\\ClanCatsFrameworkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
|
54 |
+
'Composer\\Installers\\CockpitInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
|
55 |
+
'Composer\\Installers\\CodeIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
|
56 |
+
'Composer\\Installers\\Concrete5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
|
57 |
+
'Composer\\Installers\\CraftInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
|
58 |
+
'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
|
59 |
+
'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
|
60 |
+
'Composer\\Installers\\DokuWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
|
61 |
+
'Composer\\Installers\\DolibarrInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
|
62 |
+
'Composer\\Installers\\DrupalInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
|
63 |
+
'Composer\\Installers\\ElggInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
|
64 |
+
'Composer\\Installers\\ExpressionEngineInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
|
65 |
+
'Composer\\Installers\\FuelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
|
66 |
+
'Composer\\Installers\\FuelphpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
|
67 |
+
'Composer\\Installers\\GravInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php',
|
68 |
+
'Composer\\Installers\\HuradInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
|
69 |
+
'Composer\\Installers\\ImageCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
|
70 |
+
'Composer\\Installers\\Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php',
|
71 |
+
'Composer\\Installers\\JoomlaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
|
72 |
+
'Composer\\Installers\\KirbyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
|
73 |
+
'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
|
74 |
+
'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
|
75 |
+
'Composer\\Installers\\LaravelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
|
76 |
+
'Composer\\Installers\\LithiumInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
|
77 |
+
'Composer\\Installers\\MODULEWorkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
|
78 |
+
'Composer\\Installers\\MODXEvoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
|
79 |
+
'Composer\\Installers\\MagentoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
|
80 |
+
'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
|
81 |
+
'Composer\\Installers\\MauticInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
|
82 |
+
'Composer\\Installers\\MediaWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
|
83 |
+
'Composer\\Installers\\MicroweberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
|
84 |
+
'Composer\\Installers\\MoodleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
|
85 |
+
'Composer\\Installers\\OctoberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
|
86 |
+
'Composer\\Installers\\OxidInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
|
87 |
+
'Composer\\Installers\\PPIInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
|
88 |
+
'Composer\\Installers\\PhiftyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
|
89 |
+
'Composer\\Installers\\PhpBBInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
|
90 |
+
'Composer\\Installers\\PimcoreInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
|
91 |
+
'Composer\\Installers\\PiwikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
|
92 |
+
'Composer\\Installers\\PlentymarketsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
|
93 |
+
'Composer\\Installers\\Plugin' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php',
|
94 |
+
'Composer\\Installers\\PrestashopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
|
95 |
+
'Composer\\Installers\\PuppetInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
|
96 |
+
'Composer\\Installers\\RadPHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
|
97 |
+
'Composer\\Installers\\ReIndexInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
|
98 |
+
'Composer\\Installers\\RedaxoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
|
99 |
+
'Composer\\Installers\\RoundcubeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
|
100 |
+
'Composer\\Installers\\SMFInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
|
101 |
+
'Composer\\Installers\\ShopwareInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
|
102 |
+
'Composer\\Installers\\SilverStripeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
|
103 |
+
'Composer\\Installers\\Symfony1Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
|
104 |
+
'Composer\\Installers\\TYPO3CmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
|
105 |
+
'Composer\\Installers\\TYPO3FlowInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
|
106 |
+
'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
|
107 |
+
'Composer\\Installers\\TuskInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
|
108 |
+
'Composer\\Installers\\VanillaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VanillaInstaller.php',
|
109 |
+
'Composer\\Installers\\WHMCSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
|
110 |
+
'Composer\\Installers\\WolfCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
|
111 |
+
'Composer\\Installers\\WordPressInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
|
112 |
+
'Composer\\Installers\\YawikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/YawikInstaller.php',
|
113 |
+
'Composer\\Installers\\ZendInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
|
114 |
+
'Composer\\Installers\\ZikulaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
|
115 |
'EDD_SL_Plugin_Updater' => $baseDir . '/classes/EDD_SL_Plugin_Updater.php',
|
116 |
+
'xrstf\\Composer52\\AutoloadGenerator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php',
|
117 |
+
'xrstf\\Composer52\\Generator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/Generator.php',
|
118 |
);
|
vendor/composer/autoload_real.php
CHANGED
@@ -23,19 +23,26 @@ class ComposerAutoloaderInitd24de3c06687d3cf4aad0b15c83747be
|
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
spl_autoload_unregister(array('ComposerAutoloaderInitd24de3c06687d3cf4aad0b15c83747be', 'loadClassLoader'));
|
25 |
|
26 |
-
$
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
$loader->register(true);
|
@@ -43,8 +50,3 @@ class ComposerAutoloaderInitd24de3c06687d3cf4aad0b15c83747be
|
|
43 |
return $loader;
|
44 |
}
|
45 |
}
|
46 |
-
|
47 |
-
function composerRequired24de3c06687d3cf4aad0b15c83747be($file)
|
48 |
-
{
|
49 |
-
require $file;
|
50 |
-
}
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
spl_autoload_unregister(array('ComposerAutoloaderInitd24de3c06687d3cf4aad0b15c83747be', 'loadClassLoader'));
|
25 |
|
26 |
+
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
|
27 |
+
if ($useStaticLoader) {
|
28 |
+
require_once __DIR__ . '/autoload_static.php';
|
29 |
+
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitd24de3c06687d3cf4aad0b15c83747be::getInitializer($loader));
|
31 |
+
} else {
|
32 |
+
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
+
foreach ($map as $namespace => $path) {
|
34 |
+
$loader->set($namespace, $path);
|
35 |
+
}
|
36 |
+
|
37 |
+
$map = require __DIR__ . '/autoload_psr4.php';
|
38 |
+
foreach ($map as $namespace => $path) {
|
39 |
+
$loader->setPsr4($namespace, $path);
|
40 |
+
}
|
41 |
+
|
42 |
+
$classMap = require __DIR__ . '/autoload_classmap.php';
|
43 |
+
if ($classMap) {
|
44 |
+
$loader->addClassMap($classMap);
|
45 |
+
}
|
46 |
}
|
47 |
|
48 |
$loader->register(true);
|
50 |
return $loader;
|
51 |
}
|
52 |
}
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit223487aae28f72b9160210202a3c9569 {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInite8d938e740fc662897f00c6b300999d2 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInite8d938e740fc662897f00c6b300999d2', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInite8d938e740fc662897f00c6b300999d2', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
vendor/composer/autoload_static.php
CHANGED
@@ -43,6 +43,7 @@ class ComposerStaticInitd24de3c06687d3cf4aad0b15c83747be
|
|
43 |
'Advanced_Ads_Ad_Type_Plain' => __DIR__ . '/../..' . '/classes/ad_type_plain.php',
|
44 |
'Advanced_Ads_Admin' => __DIR__ . '/../..' . '/admin/class-advanced-ads-admin.php',
|
45 |
'Advanced_Ads_Admin_Ad_Type' => __DIR__ . '/../..' . '/admin/includes/class-ad-type.php',
|
|
|
46 |
'Advanced_Ads_Admin_Menu' => __DIR__ . '/../..' . '/admin/includes/class-menu.php',
|
47 |
'Advanced_Ads_Admin_Meta_Boxes' => __DIR__ . '/../..' . '/admin/includes/class-meta-box.php',
|
48 |
'Advanced_Ads_Admin_Notices' => __DIR__ . '/../..' . '/admin/includes/class-notices.php',
|
@@ -50,6 +51,7 @@ class ComposerStaticInitd24de3c06687d3cf4aad0b15c83747be
|
|
50 |
'Advanced_Ads_Ajax' => __DIR__ . '/../..' . '/classes/ad-ajax.php',
|
51 |
'Advanced_Ads_Checks' => __DIR__ . '/../..' . '/classes/checks.php',
|
52 |
'Advanced_Ads_Display_Conditions' => __DIR__ . '/../..' . '/classes/display-conditions.php',
|
|
|
53 |
'Advanced_Ads_Frontend_Checks' => __DIR__ . '/../..' . '/classes/frontend_checks.php',
|
54 |
'Advanced_Ads_Group' => __DIR__ . '/../..' . '/classes/ad_group.php',
|
55 |
'Advanced_Ads_Groups_List' => __DIR__ . '/../..' . '/admin/includes/class-ad-groups-list.php',
|
43 |
'Advanced_Ads_Ad_Type_Plain' => __DIR__ . '/../..' . '/classes/ad_type_plain.php',
|
44 |
'Advanced_Ads_Admin' => __DIR__ . '/../..' . '/admin/class-advanced-ads-admin.php',
|
45 |
'Advanced_Ads_Admin_Ad_Type' => __DIR__ . '/../..' . '/admin/includes/class-ad-type.php',
|
46 |
+
'Advanced_Ads_Admin_Licenses' => __DIR__ . '/../..' . '/admin/includes/class-licenses.php',
|
47 |
'Advanced_Ads_Admin_Menu' => __DIR__ . '/../..' . '/admin/includes/class-menu.php',
|
48 |
'Advanced_Ads_Admin_Meta_Boxes' => __DIR__ . '/../..' . '/admin/includes/class-meta-box.php',
|
49 |
'Advanced_Ads_Admin_Notices' => __DIR__ . '/../..' . '/admin/includes/class-notices.php',
|
51 |
'Advanced_Ads_Ajax' => __DIR__ . '/../..' . '/classes/ad-ajax.php',
|
52 |
'Advanced_Ads_Checks' => __DIR__ . '/../..' . '/classes/checks.php',
|
53 |
'Advanced_Ads_Display_Conditions' => __DIR__ . '/../..' . '/classes/display-conditions.php',
|
54 |
+
'Advanced_Ads_Filesystem' => __DIR__ . '/../..' . '/classes/filesystem.php',
|
55 |
'Advanced_Ads_Frontend_Checks' => __DIR__ . '/../..' . '/classes/frontend_checks.php',
|
56 |
'Advanced_Ads_Group' => __DIR__ . '/../..' . '/classes/ad_group.php',
|
57 |
'Advanced_Ads_Groups_List' => __DIR__ . '/../..' . '/admin/includes/class-ad-groups-list.php',
|