Skip to content

Commit

Permalink
Version 5.13.2
Browse files Browse the repository at this point in the history
* [fix] Missing mimetype when uploading banner images
* [update] Rollback to v1.1 for clicktracker Javascript
adegans committed Jul 13, 2024
1 parent f0fd67f commit 821481a
Showing 13 changed files with 132 additions and 131 deletions.
29 changes: 16 additions & 13 deletions adrotate-admin-functions.php
Original file line number Diff line number Diff line change
@@ -258,11 +258,12 @@ function adrotate_ad_is_in_groups($id) {
Purpose: Clean up file names of files that are being uploaded.
-------------------------------------------------------------*/
function adrotate_sanitize_file_name($filename) {
$filename_raw = $filename;
$special_chars = array('?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', '"', '\'', '&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}');

$filename = str_replace($special_chars, '', $filename);
$filename = preg_replace('/[\s-]+/', '-', $filename);
$filename = strtolower(trim($filename, '.-_'));

return $filename;
}

@@ -365,8 +366,9 @@ function adrotate_dashboard_scripts() {
function adrotate_notifications_dashboard() {
global $current_user;

$displayname = (strlen($current_user->user_firstname) > 0) ? $current_user->user_firstname : $current_user->display_name;

if(current_user_can('adrotate_ad_manage')) {
$displayname = (strlen($current_user->user_firstname) > 0) ? $current_user->user_firstname : $current_user->display_name;
$page = (isset($_GET['page'])) ? $_GET['page'] : '';

// These only show on AdRotate pages
@@ -432,19 +434,20 @@ function adrotate_notifications_dashboard() {

if(current_user_can('update_plugins')) {
// Finish update
// Keep for manual updates
$adrotate_db_version = get_option("adrotate_db_version");
$adrotate_version = get_option("adrotate_version");
$adrotate_db_version = get_option('adrotate_db_version');
$adrotate_version = get_option('adrotate_version');

if($adrotate_db_version['current'] < ADROTATE_DB_VERSION OR $adrotate_version['current'] < ADROTATE_VERSION) {
$plugins = get_plugins();
$plugin_version = $plugins['adrotate/adrotate.php']['Version'];

$plugin_version = get_plugins();
$plugin_version = $plugin_version['adrotate/adrotate.php']['Version'];

// Do the update
adrotate_finish_upgrade();

// Thank user for updating
echo "<div class=\"ajdg-notification notice\">";
echo " <div class=\"ajdg-notification-logo\" style=\"background-image: url('".plugins_url('/images/notification.png', __FILE__)."');\"><span></span></div>";
echo " <div class=\"ajdg-notification-message\">Thanks for updating <strong>".$displayname."</strong>! You have almost completed updating <strong>AdRotate</strong> to version <strong>".$plugin_version."</strong>!<br />To complete the update <strong>click the button on the right</strong>. This may take a few seconds to complete!<br />For an overview of what has changed take a look at the <a href=\"https://ajdg.solutions/support/adrotate-development/?mtm_campaign=adrotate&mtm_keyword=finish_update_notification\" target=\"_blank\">development page</a> and usually there is an article on <a href=\"https://ajdg.solutions/blog/\" target=\"_blank\">the blog</a> with more information as well.</div>";
echo " <div class=\"ajdg-notification-cta\">";
echo " <a href=\"".wp_nonce_url('admin.php?page=adrotate-settings&tab=maintenance&action=update-db', 'nonce', 'adrotate-nonce')."\" class=\"ajdg-notification-act button-primary update-button\">Finish update</a>";
echo " </div>";
echo " <div class=\"ajdg-notification-logo\" style=\"background-image:url('".plugins_url('/images/notification.png', __FILE__)."');\"><span></span></div>";
echo " <div class=\"ajdg-notification-message\">Hi there <strong>".$displayname."</strong>! You have just updated <strong>AdRotate Professional</strong> to version <strong>".$plugin_version."</strong>!<br />Thanks for staying up-to-date! Your <strong>Database and settings</strong> have been updated to the latest version.<br />For an overview of what has changed take a look at the <a href=\"https://ajdg.solutions/support/adrotate-development/?mtm_campaign=adrotate&mtm_keyword=finish_update_notification\" target=\"_blank\">development page</a> and usually there is an article on <a href=\"https://ajdg.solutions/blog/\" target=\"_blank\">the blog</a> with more information as well.</div>";
echo "</div>";
}
}
49 changes: 29 additions & 20 deletions adrotate-admin-manage.php
Original file line number Diff line number Diff line change
@@ -416,56 +416,65 @@ function adrotate_insert_group() {
Purpose: Prepare input form on saving new or updated banners
-------------------------------------------------------------*/
function adrotate_insert_media() {
global $wpdb, $adrotate_config;
global $adrotate_config;

if(wp_verify_nonce($_POST['adrotate_nonce'], 'adrotate_save_media')) {
if(current_user_can('adrotate_ad_manage')) {

if($_FILES['adrotate_image']['size'] > 0 AND $_FILES['adrotate_image']['size'] <= 512000) {
$file_path = WP_CONTENT_DIR.'/'.esc_attr($_POST['adrotate_image_location']).'/';
$file = explode('.', adrotate_sanitize_file_name($_FILES['adrotate_image']['name']));
$file_name = implode('.', $file);
$file_extension = array_pop($file);
$file_mimetype = mime_content_type($_FILES['adrotate_image']['tmp_name']);
$file_path = WP_CONTENT_DIR."/".esc_attr($_POST['adrotate_image_location'])."/";

$file = pathinfo(adrotate_sanitize_file_name($_FILES['adrotate_image']['name']));
$file['mimetype'] = mime_content_type($_FILES['adrotate_image']['tmp_name']);

// Everyone can upload these
$allowed_extensions = array('jpg', 'jpeg', 'gif', 'png', 'svg', 'webp');
$allowed_mimetypes = array('image/jpg', 'image/pjpeg', 'image/jpeg', 'image/gif', 'image/png', 'image/svg', 'image/webp');
$allowed_mimetypes = array('image/jpg', 'image/jpeg', 'image/gif', 'image/png', 'image/svg', 'image/webp');

if(current_user_can('unfiltered_html')) {
// Higher level and enabled users can also upload these.
$allowed_extensions = array_merge($allowed_extensions, array('html', 'htm', 'js', 'zip'));
$allowed_mimetypes = array_merge($allowed_mimetypes, array('text/html', 'text/htm', 'application/x-javascript', 'application/javascript', 'text/javascript', 'application/zip'));
}

if(in_array($file_extension, $allowed_extensions) AND in_array($file_mimetype, $allowed_mimetypes)) {
if(in_array($file['extension'], $allowed_extensions) AND in_array($file['mimetype'], $allowed_mimetypes)) {
if ($_FILES['adrotate_image']['error'] > 0) {
if($_FILES['adrotate_image']['error'] == 1 OR $_FILES['adrotate_image']['error'] == 2) $errorcode = 511;
else if($_FILES['adrotate_image']['error'] == 3) $errorcode = 506;
else if($_FILES['adrotate_image']['error'] == 4) $errorcode = 506;
else if($_FILES['adrotate_image']['error'] == 6 OR $_FILES['adrotate_image']['error'] == 7) $errorcode = 506;
else $errorcode = '';
if($_FILES['adrotate_image']['error'] == 1 OR $_FILES['adrotate_image']['error'] == 2) {
$errorcode = 511;
} else if($_FILES['adrotate_image']['error'] == 3) {
$errorcode = 506;
} else if($_FILES['adrotate_image']['error'] == 4) {
$errorcode = 506;
} else if($_FILES['adrotate_image']['error'] == 6 OR $_FILES['adrotate_image']['error'] == 7) {
$errorcode = 506;
} else {
$errorcode = '';
}

adrotate_return('adrotate-media', $errorcode); // Other error
} else {
if(!move_uploaded_file($_FILES['adrotate_image']['tmp_name'], $file_path.$file_name)) {
if(!move_uploaded_file($_FILES['adrotate_image']['tmp_name'], $file_path.$file['basename'])) {
adrotate_return('adrotate-media', 506); // Upload error
}

if($file_mimetype == 'application/zip' AND $file_extension == 'zip') {
if(($file['mimetype'] == 'application/zip' OR $file['mimetype'] == 'application/zip-compressed' OR $file['mimetype'] == 'application/x-zip-compressed') AND $file['extension'] == 'zip') {
require_once(ABSPATH .'/wp-admin/includes/file.php');

$creds = request_filesystem_credentials(wp_nonce_url('admin.php?page=adrotate-media'), '', false, $file_path, null);
if(!WP_Filesystem($creds)) {
request_filesystem_credentials(wp_nonce_url('admin.php?page=adrotate-media'), '', true, $file_path, null);
$creds = request_filesystem_credentials(wp_nonce_url('admin.php?page=adrotate-media'), '', true, $file_path, null);
}

$unzipfile = unzip_file($file_path.$file_name.'.'.$file_extension, $file_path.$file_name);
$unzipfile = unzip_file($file_path.$file['basename'], $file_path.$file['filename']);
if(is_wp_error($unzipfile)) {
adrotate_return('adrotate-media', 512); // Can not unzip file
adrotate_return('adrotate-media', 512, array('error' => $unzipfile->get_error_message())); // Can not unzip file
}

// Delete unwanted files
adrotate_clean_folder_contents($file_path.$file_name);
adrotate_clean_folder_contents($file_path.$file['filename']);

// Delete the uploaded zip
adrotate_unlink($file_name.'.'.$file_extension);
adrotate_unlink($file['basename']);
}

adrotate_return('adrotate-media', 202); // Success
8 changes: 4 additions & 4 deletions adrotate-output.php
Original file line number Diff line number Diff line change
@@ -583,13 +583,13 @@ function adrotate_scripts() {
}

if(get_option('adrotate_dynamic_required') > 0) {
wp_enqueue_script('adrotate-dyngroup', plugins_url('/library/jquery.dyngroup.js', __FILE__), false, null, $in_footer);
wp_enqueue_script('adrotate-groups', plugins_url('/library/jquery.groups.js', __FILE__), false, null, $in_footer);
}

if($adrotate_config['stats'] == 1) {
wp_enqueue_script('adrotate-clicktracker', plugins_url('/library/clicker.js', __FILE__), false, null, $in_footer);
wp_localize_script('adrotate-clicktracker', 'click_object', array('ajax_url' => admin_url('admin-ajax.php')));
wp_localize_script('adrotate-dyngroup', 'impression_object', array('ajax_url' => admin_url( 'admin-ajax.php')));
wp_enqueue_script('adrotate-clicker', plugins_url('/library/jquery.clicker.js', __FILE__), false, null, $in_footer);
wp_localize_script('adrotate-clicker', 'click_object', array('ajax_url' => admin_url('admin-ajax.php')));
wp_localize_script('adrotate-groups', 'impression_object', array('ajax_url' => admin_url('admin-ajax.php')));
}

if(!$in_footer) {
10 changes: 5 additions & 5 deletions adrotate-setup.php
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ function adrotate_activate_setup() {
adrotate_database_install();
adrotate_dummy_data();
adrotate_check_config();
adrotate_check_cron_schedules();
adrotate_check_schedules();

// Set the capabilities for the administrator
$role = get_role('administrator');
@@ -211,10 +211,10 @@ function adrotate_uninstall_setup() {
}

/*-------------------------------------------------------------
Name: adrotate_check_cron_schedules
Name: adrotate_check_schedules
Purpose: Set or reset maintenance schedules for AdRotate
-------------------------------------------------------------*/
function adrotate_check_cron_schedules() {
function adrotate_check_schedules() {
$firstrun = adrotate_date_start('day');
if(!wp_next_scheduled('adrotate_empty_trackerdata')) { // Periodically clean trackerdata
wp_schedule_event($firstrun + 1800, 'twicedaily', 'adrotate_empty_trackerdata');
@@ -496,7 +496,7 @@ function adrotate_finish_upgrade() {
}

adrotate_check_config();
adrotate_check_cron_schedules();
adrotate_check_schedules();
adrotate_evaluate_ads();
}

@@ -627,7 +627,7 @@ function adrotate_core_upgrade() {

// 4.1
if($adrotate_version['current'] < 389) {
adrotate_check_cron_schedules();
adrotate_check_schedules();
}

// 4.4
77 changes: 32 additions & 45 deletions adrotate.php
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
Author URI: https://www.arnan.me/?mtm_campaign=adrotate&mtm_keyword=plugin_info
Description: Manage all your adverts with all the features you need while keeping things simple.
Text Domain: adrotate
Version: 5.13.1
Version: 5.13.2
License: GPLv3
*/

@@ -80,7 +80,6 @@
add_action('admin_menu', 'adrotate_dashboard');
add_action('admin_enqueue_scripts', 'adrotate_dashboard_scripts');
add_action('admin_notices','adrotate_notifications_dashboard');
add_action('upgrader_process_complete', 'adrotate_finish_upgrade', 10, 2); // Finish update in the background
add_filter('plugin_action_links_' . plugin_basename( __FILE__ ), 'adrotate_action_links');
/*--- Internal redirects ------------------------------------*/
if(isset($_POST['adrotate_generate_submit'])) add_action('init', 'adrotate_generate_input');
@@ -97,17 +96,15 @@
Purpose: Add pages to admin menus
-------------------------------------------------------------*/
function adrotate_dashboard() {
$adrotate_page = $adrotate_pro = $adrotate_adverts = $adrotate_groups = $adrotate_settings = '';

add_menu_page('AdRotate', 'AdRotate', 'adrotate_ad_manage', 'adrotate', 'adrotate_manage', plugins_url('/images/icon-menu.png', __FILE__), '25.8');
$adrotate_adverts = add_submenu_page('adrotate', 'AdRotate · '.__("Manage Adverts", 'adrotate'), __("Manage Adverts", 'adrotate'), 'adrotate_ad_manage', 'adrotate', 'adrotate_manage');
$adrotate_groups = add_submenu_page('adrotate', 'AdRotate · '.__("Manage Groups", 'adrotate'), __("Manage Groups", 'adrotate'), 'adrotate_group_manage', 'adrotate-groups', 'adrotate_manage_group');
$adrotate_schedules = add_submenu_page('adrotate', 'AdRotate · '.__("Manage Schedules", 'adrotate'), __("Manage Schedules", 'adrotate'), 'adrotate_ad_manage', 'adrotate-schedules', 'adrotate_manage_schedules');
$adrotate_media = add_submenu_page('adrotate', 'AdRotate · '.__("Manage Media", 'adrotate'), __("Manage Media", 'adrotate'), 'adrotate_ad_manage', 'adrotate-media', 'adrotate_manage_media');
$adrotate_statistics = add_submenu_page('adrotate', 'AdRotate · '.__("Statistics", 'adrotate'), __("Statistics", 'adrotate'), 'adrotate_ad_manage', 'adrotate-statistics', 'adrotate_statistics');
$adrotate_pro = add_submenu_page('adrotate', 'AdRotate · '.__("Get AdRotate Pro", 'adrotate'), __("Get AdRotate Pro", 'adrotate'), 'adrotate_ad_manage', 'adrotate-pro', 'adrotate_pro');
$adrotate_support = add_submenu_page('adrotate', 'AdRotate · '.__("Support", 'adrotate'), __("Support", 'adrotate'), 'manage_options', 'adrotate-support', 'adrotate_support');
$adrotate_settings = add_submenu_page('adrotate', 'AdRotate · '.__("Settings", 'adrotate'), __("Settings", 'adrotate'), 'manage_options', 'adrotate-settings', 'adrotate_options');
add_submenu_page('adrotate', 'AdRotate · '.__("Manage Adverts", 'adrotate'), __("Manage Adverts", 'adrotate'), 'adrotate_ad_manage', 'adrotate', 'adrotate_manage');
add_submenu_page('adrotate', 'AdRotate · '.__("Manage Groups", 'adrotate'), __("Manage Groups", 'adrotate'), 'adrotate_group_manage', 'adrotate-groups', 'adrotate_manage_group');
add_submenu_page('adrotate', 'AdRotate · '.__("Manage Schedules", 'adrotate'), __("Manage Schedules", 'adrotate'), 'adrotate_ad_manage', 'adrotate-schedules', 'adrotate_manage_schedules');
add_submenu_page('adrotate', 'AdRotate · '.__("Manage Media", 'adrotate'), __("Manage Media", 'adrotate'), 'adrotate_ad_manage', 'adrotate-media', 'adrotate_manage_media');
add_submenu_page('adrotate', 'AdRotate · '.__("Statistics", 'adrotate'), __("Statistics", 'adrotate'), 'adrotate_ad_manage', 'adrotate-statistics', 'adrotate_statistics');
add_submenu_page('adrotate', 'AdRotate · '.__("Get AdRotate Pro", 'adrotate'), __("Get AdRotate Pro", 'adrotate'), 'adrotate_ad_manage', 'adrotate-pro', 'adrotate_pro');
add_submenu_page('adrotate', 'AdRotate · '.__("Support", 'adrotate'), __("Support", 'adrotate'), 'manage_options', 'adrotate-support', 'adrotate_support');
add_submenu_page('adrotate', 'AdRotate · '.__("Settings", 'adrotate'), __("Settings", 'adrotate'), 'manage_options', 'adrotate-settings', 'adrotate_options');
}

/*-------------------------------------------------------------
@@ -135,11 +132,10 @@ function adrotate_pro() {
function adrotate_manage() {
global $wpdb, $userdata, $adrotate_config;

$status = $file = $view = $ad_edit_id = '';
if(isset($_GET['status'])) $status = sanitize_key($_GET['status']);
if(isset($_GET['file'])) $file = sanitize_file_name($_GET['file']);
if(isset($_GET['view'])) $view = sanitize_key($_GET['view']);
if(isset($_GET['ad'])) $ad_edit_id = sanitize_key($_GET['ad']);
$view = (isset($_GET['view'])) ? sanitize_key($_GET['view']) : '';
$status = (isset($_GET['status'])) ? sanitize_key($_GET['status']) : '';
$ad_edit_id =(isset($_GET['ad'])) ? sanitize_key($_GET['ad']) : '';
$file = (isset($_GET['file'])) ? sanitize_file_name($_GET['file']) : '';

if(!is_numeric($status)) $status = 0;
if(!is_numeric($ad_edit_id)) $ad_edit_id = 0;
@@ -230,18 +226,12 @@ function adrotate_manage() {

<?php

if (empty($view) OR $view == 'manage') {
// Show list of errorous ads if any
if (count($error) > 0) {
include('dashboard/publisher/adverts-error.php');
}
if(empty($view) OR $view == 'manage') {
if(count($error) > 0) include('dashboard/publisher/adverts-error.php');

include('dashboard/publisher/adverts-main.php');

// Show disabled ads, if any
if (count($disabled) > 0) {
include('dashboard/publisher/adverts-disabled.php');
}
if (count($disabled) > 0) include('dashboard/publisher/adverts-disabled.php');
} else if($view == 'addnew' OR $view == 'edit') {
include('dashboard/publisher/adverts-edit.php');
} else if($view == 'generator') {
@@ -263,10 +253,9 @@ function adrotate_manage() {
function adrotate_manage_group() {
global $wpdb, $adrotate_config;

$status = $view = $group_edit_id = '';
if(isset($_GET['status'])) $status = sanitize_key($_GET['status']);
if(isset($_GET['view'])) $view = sanitize_key($_GET['view']);
if(isset($_GET['group'])) $group_edit_id = sanitize_key($_GET['group']);
$status = (isset($_GET['status'])) ? sanitize_key($_GET['status']) : '';
$view = (isset($_GET['view'])) ? sanitize_key($_GET['view']) : '';
$group_edit_id =(isset($_GET['group'])) ? sanitize_key($_GET['group']) : '';

if(!is_numeric($status)) $status = 0;
if(!is_numeric($group_edit_id)) $group_edit_id = 0;
@@ -347,9 +336,8 @@ function adrotate_manage_schedules() {
function adrotate_manage_media() {
global $wpdb, $adrotate_config;

$status = $file = '';
if(isset($_GET['status'])) $status = sanitize_key($_GET['status']);
if(isset($_GET['file'])) $file = sanitize_file_name($_GET['file']);
$status = (isset($_GET['status'])) ? sanitize_key($_GET['status']) : '';
$file = (isset($_GET['file'])) ? sanitize_file_name($_GET['file']) : '';

if(!is_numeric($status)) $status = 0;

@@ -388,11 +376,10 @@ function adrotate_manage_media() {
function adrotate_statistics() {
global $wpdb, $adrotate_config;

$status = $view = $file = $id = '';
if(isset($_GET['status'])) $status = sanitize_key($_GET['status']);
if(isset($_GET['view'])) $view = sanitize_key($_GET['view']);
if(isset($_GET['id'])) $id = sanitize_key($_GET['id']);
if(isset($_GET['file'])) $file = sanitize_file_name($_GET['file']);
$view = (isset($_GET['view'])) ? sanitize_key($_GET['view']) : '';
$status = (isset($_GET['status'])) ? sanitize_key($_GET['status']) : '';
$id =(isset($_GET['id'])) ? sanitize_key($_GET['id']) : '';
$file = (isset($_GET['file'])) ? sanitize_file_name($_GET['file']) : '';

if(!is_numeric($status)) $status = 0;
if(!is_numeric($id)) $id = 0;
@@ -436,11 +423,12 @@ function adrotate_statistics() {
function adrotate_support() {
global $wpdb, $adrotate_config;

$status = $file = '';
if(isset($_GET['status'])) $status = sanitize_key($_GET['status']);
if(isset($_GET['file'])) $file = sanitize_file_name($_GET['file']);
$view = (isset($_GET['view'])) ? sanitize_key($_GET['view']) : '';
$status = (isset($_GET['status'])) ? sanitize_key($_GET['status']) : '';
$file = (isset($_GET['file'])) ? sanitize_file_name($_GET['file']) : '';

if(!is_numeric($status)) $status = 0;

$current_user = wp_get_current_user();

if(adrotate_is_networked()) {
@@ -470,13 +458,12 @@ function adrotate_support() {
function adrotate_options() {
global $wpdb, $wp_roles;

$active_tab = (isset($_GET['tab'])) ? sanitize_key($_GET['tab']) : 'general';
$active_tab = (isset($_GET['tab'])) ? sanitize_key($_GET['tab']) : 'general';
$status = (isset($_GET['status'])) ? sanitize_key($_GET['status']) : '';
$action =(isset($_GET['action'])) ? sanitize_key($_GET['action']) : '';

if(!is_numeric($status)) $status = 0;

$action = (isset($_GET['action'])) ? sanitize_key($_GET['action']) : '';

if(isset($_GET['adrotate-nonce']) AND wp_verify_nonce($_GET['adrotate-nonce'], 'maintenance')) {
if($action == 'check-all-ads') {
adrotate_evaluate_ads();
@@ -489,7 +476,7 @@ function adrotate_options() {
}

if($action == 'reset-tasks') {
adrotate_check_cron_schedules();
adrotate_check_schedules();
$status = 407;
}
}
27 changes: 18 additions & 9 deletions dashboard/support.php
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
<p><img src="<?php echo plugins_url('/images/icon-support.png', dirname(__FILE__)); ?>" class="alignleft pro-image" /><?php _e("Is something not working the way you expect it to? If you need help you can check the manuals and guides on my website. There is a lot of information on the support forum asked by other users. Chances are your question has already been asked and answered or if not, I am always happy to help!", 'adrotate'); ?></p>

<p><a href="https://ajdg.solutions/support/adrotate-manuals/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><strong><?php _e("AdRotate Banner Manager manuals and guides", 'adrotate'); ?></strong></a><br /><em><?php _e("Take a look at the AdRotate Manuals.", 'adrotate'); ?> <a href="https://ajdg.solutions/support/adrotate-manuals/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><?php _e("Find answers", 'adrotate'); ?> &raquo;</a></em></p>
<p><a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><strong><?php _e("AdRotate Banner Manager support forum", 'adrotate'); ?></strong></a><br /><em><?php _e("Ask anything about AdRotate Banner Manager on my support forum.", 'adrotate'); ?> <a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><?php _e("Ask your question", 'adrotate'); ?> &raquo;</a></em></p>
<p><a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><strong><?php _e("AdRotate support forum", 'adrotate'); ?></strong></a><br /><em><?php _e("Ask anything about AdRotate Banner Manager on my support forum.", 'adrotate'); ?> <a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><?php _e("Ask your question", 'adrotate'); ?> &raquo;</a></em></p>
<p><a href="https://ajdg.solutions/product/support-ticket/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><strong><?php _e("Premium ticket support", 'adrotate'); ?></strong></a><br /><em><?php _e("Buy a priority support ticket for private and quick assistance.", 'adrotate'); ?> <a href="https://ajdg.solutions/product/support-ticket/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><?php _e("More information", 'adrotate'); ?> &raquo;</a></em></p>
<p><a href="https://support.ajdg.net/" target="_blank"><strong><?php _e("Report security issues", 'adrotate'); ?></strong></a><br /><em><?php _e("Found a security flaw?", 'adrotate'); ?> <a href="https://support.ajdg.net/" target="_blank"><?php _e("Please report it", 'adrotate'); ?> &raquo;</a></em></p>
</div>
@@ -31,29 +31,38 @@
<div id="stats" class="ajdg-postbox-content">
<table width="100%">
<tr>
<td width="49.5%">
<div class="ajdg-sales-widget" style="display: inline-block; margin-right:2%;">
<td width="33.33%">
<div class="ajdg-sales-widget" style="display: inline-block;">
<a href="https://ajdg.solutions/product/adrotate-pro-single/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/offers/monetize-your-site.jpg", dirname(__FILE__)); ?>" alt="AdRotate Professional" width="228" height="120"></div></a>
<a href="https://ajdg.solutions/product/adrotate-pro-single/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><div class="title"><?php _e("AdRotate Professional", 'adrotate'); ?></div></a>
<div class="sub_title"><?php _e("All the features you need!", 'adrotate'); ?></div>
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/product/adrotate-pro-single/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank">Get started for only &euro; 49</a></div>
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/product/adrotate-pro-single/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><?php _e("Buy now", 'adrotate'); ?></a></div>
<hr>
<div class="description"><?php _e("Turn up your advertising management to 11 with AdRotate Pro and benefit from the many extra features and premium support.", 'adrotate'); ?></div>
<div class="description"><?php _e("Turn up your advertising management to 11 with AdRotate Pro and benefit from the many extra features.", 'adrotate'); ?></div>
</div>
</td>
<td width="33.33%">
<div class="ajdg-sales-widget" style="display: inline-block;">
<a href="https://ajdg.solutions/product/adrotate-html5-setup-service/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/offers/html5-service.jpg", dirname(__FILE__)); ?>" alt="HTML5 Advert setup" width="228" height="120"></div></a>
<a href="https://ajdg.solutions/product/adrotate-html5-setup-service/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><div class="title"><?php _e("HTML5 Advert setup", 'adrotate'); ?></div></a>
<div class="sub_title"><?php _e("Professional service", 'adrotate'); ?></div>
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/product/adrotate-html5-setup-service/?mtm_campaign=adrotatepro&mtm_keyword=info_page" target="_blank"><?php _e("Learn more", 'adrotate'); ?></a></div>
<hr>
<div class="description"><?php _e("Do you have a HTML5 advert but can’t get it to work in AdRotate Banner Manager? I’ll help you out!", 'adrotate'); ?></div>
</div>
</td>
<td>
<div class="ajdg-sales-widget" style="display: inline-block;">
<a href="https://ajdg.solutions/plugins/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/offers/more-plugins.jpg", dirname(__FILE__)); ?>" alt="AJdG Solutions Plugins" width="228" height="120"></div></a>
<a href="https://ajdg.solutions/plugins/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><div class="title"><?php _e("All my plugins", 'adrotate'); ?></div></a>
<div class="sub_title"><?php _e("WordPress and ClassicPress", 'adrotate'); ?></div>
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/plugins/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank">View all plugins</a></div>
<div class="sub_title"><?php _e("WordPress", 'adrotate'); ?></div>
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/plugins/?mtm_campaign=adrotate&mtm_keyword=adrotate_support_page" target="_blank"><?php _e("View all plugins", 'adrotate'); ?></a></div>
<hr>
<div class="description"><?php _e("Cool plugins that improve your websites security, deter spammers and fake accounts and increase your WooCommerce efficacy.", 'adrotate'); ?></div>
<div class="description"><?php _e("Cool plugins that improve WooCommerce online store; faster checkout, no checkout, payment stats and more!", 'adrotate'); ?></div>
</div>
</td>
</tr>
</table>
<center><em><small><?php _e("Prices shown in Euros, your bank will convert your local currency to Euros for free.", 'adrotate'); ?></small></em></center>
</div>
</div>

Binary file added images/offers/html5-service.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/offers/wordpress-maintenance.jpg
Binary file not shown.
21 changes: 0 additions & 21 deletions library/clicker.js

This file was deleted.

9 changes: 1 addition & 8 deletions library/dashboard.css
Original file line number Diff line number Diff line change
@@ -35,17 +35,10 @@

.icn-tg { position: relative; top: 2px; margin-right: 3px; display: inline-block; width: 14px; height: 14px; background: transparent 0 0 no-repeat; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkNhcGFfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCAyNC4zMzIgMjQuMzMyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNC4zMzIgMjQuMzMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPGcgaWQ9ImM0MF9yc3MiPgoJCTxwYXRoIGZpbGw9IiNmZmZmZmYiIGQ9Im05LjQxNyAxNS4xODEtLjM5NyA1LjU4NGMuNTY4IDAgLjgxNC0uMjQ0IDEuMTA5LS41MzdsMi42NjMtMi41NDUgNS41MTggNC4wNDFjMS4wMTIuNTY0IDEuNzI1LjI2NyAxLjk5OC0uOTMxbDMuNjIyLTE2Ljk3Mi4wMDEtLjAwMWMuMzIxLTEuNDk2LS41NDEtMi4wODEtMS41MjctMS43MTRsLTIxLjI5IDguMTUxYy0xLjQ1My41NjQtMS40MzEgMS4zNzQtLjI0NyAxLjc0MWw1LjQ0MyAxLjY5MyAxMi42NDMtNy45MTFjLjU5NS0uMzk0IDEuMTM2LS4xNzYuNjkxLjIxOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4='); }

/* Update button */
.update-button { -webkit-animation: glowing 1500ms infinite; -moz-animation: glowing 1500ms infinite; -o-animation: glowing 1500ms infinite; animation: glowing 1500ms infinite; }
@-webkit-keyframes glowing { 0% { -webkit-box-shadow: 0 0 3px #1fa4d1; } 50% { -webkit-box-shadow: 0 0 40px #466f82; } 100% { -webkit-box-shadow: 0 0 3px #1fa4d1; } }
@-moz-keyframes glowing { 0% { -moz-box-shadow: 0 0 3px #1fa4d1; } 50% { -moz-box-shadow: 0 0 40px #466f82; } 100% { -moz-box-shadow: 0 0 3px #1fa4d1; } }
@-o-keyframes glowing { 0% { box-shadow: 0 0 3px #1fa4d1; } 50% { box-shadow: 0 0 40px #466f82; } 100% { box-shadow: 0 0 3px #1fa4d1; } }
@keyframes glowing { 0% { box-shadow: 0 0 3px #1fa4d1; } 50% { box-shadow: 0 0 40px #466f82; } 100% { box-shadow: 0 0 3px #1fa4d1; } }

/* Dashboard styles */
.ajdg-postbox-container { width: 49.5%; float: left; }
.ajdg-postbox { margin: 0 8px; min-height: 100px; box-sizing: border-box; }
.ajdg-postbox-content { margin-bottom: 20px; padding: 10px 20px 20px 20px; min-height: 40px; min-width:255px; border:#dfdfdf 1px solid; background-color:#fff; -moz-box-shadow:inset 0 1px 0 #fff; -webkit-box-shadow:inset 0 1px 0 #fff; box-shadow:inset 0 1px 0 #fff; clear: both; position: relative; }
.ajdg-postbox-content { margin-bottom: 20px; padding: 10px 20px 20px 20px; min-height: 40px; min-width:255px; border:#dfdfdf 1px solid; background-color:#fff; clear: both; position: relative; }
.pro-image { padding:0px 10px 0px 0px; }
.ajdg-photo { border-radius: 5px; }
.ajdg-fullwidth { width: 100%; }
14 changes: 14 additions & 0 deletions library/jquery.clicker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
Track clicks from special elements
Version: 1.1
Original code: Arnan de Gans
With help from: Fraser Munro
Copyright: See notice in adrotate-pro.php
*/
(function($) {
$(document).ready(function() {
$(document).on('click', 'a.gofollow', function(){
$.post(click_object.ajax_url, {'action':'adrotate_click','track':$(this).attr("data-track")});
});
});
}(jQuery));
File renamed without changes.
19 changes: 13 additions & 6 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
=== AdRotate Banner Manager - The only ad manager you'll need ===
Contributors: adegans
Donate link: https://www.arnan.me/donate.html
Tags: ads, banner manager, adsense, advert, banners
Tags: ads, banner manager, adsense, affiliate, banners
Requires at least: 4.9
Requires PHP: 7.4
Tested up to: 6.6
Stable tag: 5.13.1
CP requires at least: 1.0
CP tested up to: 2.1.1
Requires PHP: 7.4
Stable tag: 5.13.2
License: GPLv3

Advertising made easy. Manage all your ads including Google Ads, Amazon banners and many more from your dashboard.
@@ -94,16 +96,21 @@ Available AdRotate Pro licenses [1 site license](https://ajdg.solutions/product/

== Installation ==

Installing AdRotate is super easy. Simply search for "AdRotate Arnan" or "AdRotate" in your plugin dashboard and click on the "Install" button for **AdRotate Banner Manager**.
Once activated, a new menu called "AdRotate" appears in the WordPress navigation.
From this menu you'll handle everything related to **AdRotate Banner Manager**.
Installing AdRotate is super easy.
- Search for "AdRotate Arnan" or "AdRotate" in your plugin dashboard and click on the "Install" button for **AdRotate Banner Manager**.
- A new menu called "AdRotate" appears in the WordPress navigation.
- From this menu you'll handle everything related to **AdRotate Banner Manager**.

For more detailed instructions check out the [installation steps](https://ajdg.solutions/support/adrotate-manuals/installing-adrotate-on-your-website/?mtm_campaign=adrotate&mtm_kwd=readme) on the AdRotate website.

== Changelog ==

For the full changelog check out the [development page](https://ajdg.solutions/support/adrotate-development/?mtm_campaign=adrotate&mtm_kwd=readme).

= AdRotate 5.13.2 =
* [fix] Missing mimetype when uploading banner images
* [update] Rollback to v1.1 for clicktracker Javascript

= AdRotate 5.13.1 =
* [fix] Unfiltered HTML indicator reversed in Maintenance
* [fix] Missing _nonce value for maintenance functions

0 comments on commit 821481a

Please sign in to comment.