Skip to content

Commit

Permalink
Version 5.13.4
Browse files Browse the repository at this point in the history
  • Loading branch information
adegans committed Sep 4, 2024
1 parent 2341e52 commit fa5bd3d
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 47 deletions.
6 changes: 3 additions & 3 deletions adrotate-admin-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -622,16 +622,16 @@ function adrotate_credits() {
echo "<thead>";
echo "<tr valign=\"top\">";
echo " <th width=\"70%\"><strong>".__("Get more features with AdRotate Professional", 'adrotate')."</strong></th>";
echo " <th><strong>".__("Starting at &euro; 49.00", 'adrotate')." - <a href=\"https://ajdg.solutions/product-category/adrotate-pro/?mtm_campaign=adrotate&mtm_keyword=credits\" target=\"_blank\">".__("Compare Licenses", 'adrotate')." &raquo;</a></strong></th>";
echo " <th><strong>".__("Starting at &euro; 49.00", 'adrotate')." - <a href=\"https://ajdg.solutions/product-category/adrotate-pro/?mtm_campaign=adrotate&mtm_keyword=credits_license\" target=\"_blank\">".__("Compare Licenses", 'adrotate')." &raquo;</a></strong></th>";
echo "</tr>";
echo "</thead>";

echo "<tbody>";
echo "<tr>";

echo "<td><a href=\"https://ajdg.solutions/plugins/adrotate-for-wordpress/?mtm_campaign=adrotate&mtm_keyword=credits\" target=\"_blank\"><img src=\"".plugins_url('/images/logo-60x60.png', __FILE__)."\" class=\"alignleft pro-image\" /></a><p>".__("<strong>AdRotate Professional</strong> has a lot more to offer for even better advertising management and premium support. Enjoy features like <strong>Geo Targeting</strong>, <strong>Schedules</strong>, more advanced <strong>Post Injection</strong> and much more. Check out the feature comparison tab on any of the product pages to see what AdRotate Pro has to offer for you! When you upgrade to <strong>AdRotate Professional</strong> make sure you use coupon <strong>GETADROTATEPRO</strong> on checkout for 10 percent off on any license.", 'adrotate')." <a href=\"https://ajdg.solutions/product-category/adrotate-pro/?mtm_campaign=adrotate&mtm_keyword=credits\" target=\"_blank\">".__("Compare Licenses", 'adrotate')." &raquo;</a></p></td>";
echo "<td><a href=\"https://ajdg.solutions/plugins/adrotate-for-wordpress/?mtm_campaign=adrotate&mtm_keyword=credits_license\" target=\"_blank\"><img src=\"".plugins_url('/images/logo-60x60.png', __FILE__)."\" class=\"alignleft pro-image\" /></a><p>".__("<strong>AdRotate Professional</strong> has a lot more to offer for even better advertising management and premium support. Enjoy features like <strong>Geo Targeting</strong>, <strong>Schedules</strong>, more advanced <strong>Post Injection</strong> and much more. Check out the feature comparison tab on any of the product pages to see what AdRotate Pro has to offer for you! When you upgrade to <strong>AdRotate Professional</strong> make sure you use coupon <strong>GETADROTATEPRO</strong> on checkout for 10 percent off on any license.", 'adrotate')." <a href=\"https://ajdg.solutions/product-category/adrotate-pro/?mtm_campaign=adrotate&mtm_keyword=credits_license\" target=\"_blank\">".__("Compare Licenses", 'adrotate')." &raquo;</a></p></td>";

echo "<td><p><a href=\"https://ajdg.solutions/product/adrotate-pro-single/?mtm_campaign=adrotate&mtm_keyword=credits\" target=\"_blank\"><strong>".__("Get a Single License", 'adrotate')."</strong></a><br /><em>".__("One year of updates for one WordPress website.", 'adrotate')."</em></p>"."<p><a href=\"https://ajdg.solutions/product/adrotate-pro-multi/?mtm_campaign=adrotate&mtm_keyword=credits\" target=\"_blank\"><strong>".__("Go big with the Multi License", 'adrotate')."</strong></a><br /><em>".__("One year of updates for up-to five WordPress websites.", 'adrotate')."</em></p></td>";
echo "<td><p><a href=\"https://ajdg.solutions/product/adrotate-pro-single/?mtm_campaign=adrotate&mtm_keyword=credits_license\" target=\"_blank\"><strong>".__("Get a Single License", 'adrotate')."</strong></a><br /><em>".__("One year of updates for one WordPress website.", 'adrotate')."</em></p>"."<p><a href=\"https://ajdg.solutions/product/adrotate-pro-multi/?mtm_campaign=adrotate&mtm_keyword=credits_license\" target=\"_blank\"><strong>".__("Go big with the Multi License", 'adrotate')."</strong></a><br /><em>".__("One year of updates for up-to five WordPress websites.", 'adrotate')."</em></p></td>";

echo "</tr>";

Expand Down
16 changes: 5 additions & 11 deletions adrotate-admin-manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@ function adrotate_generate_input() {
$id = '';
if(isset($_POST['adrotate_id'])) $id = sanitize_key($_POST['adrotate_id']);

$fullsize_image = $targeturl = $nofollow = $basic_dropdown = $adwidth = $adheight = '';
$fullsize_image = $targeturl = $new_window = $portability = $nofollow = $adwidth = $adheight = '';
if(isset($_POST['adrotate_fullsize_dropdown'])) $fullsize_image = strip_tags(trim($_POST['adrotate_fullsize_dropdown']));
if(isset($_POST['adrotate_targeturl'])) $targeturl = strip_tags(trim($_POST['adrotate_targeturl']));

$new_window = '';
if(isset($_POST['adrotate_newwindow'])) $new_window = strip_tags(trim($_POST['adrotate_newwindow']));

$portability = '';
if(isset($_POST['adrotate_portability'])) $portability = strip_tags(trim($_POST['adrotate_portability']));

if(current_user_can('adrotate_ad_manage')) {
Expand All @@ -37,20 +33,16 @@ function adrotate_generate_input() {
if($fullsize_size){
$adwidth = " width=\"".$fullsize_size[0]."\"";
$adheight = " height=\"".$fullsize_size[1]."\"";
} else {
$adwidth = $adheight = "";
}

// Open in a new window?
if(isset($new_window) AND strlen($new_window) != 0) {
$new_window = " target=\"_blank\"";
} else {
$new_window = "";
}

// Determine image settings
$imagetype = 'dropdown';
$image = WP_CONTENT_URL."/%folder%/".$fullsize_image;
$image = WP_CONTENT_URL."/banners/".$fullsize_image;
$asset = "<img src=\"%asset%\"".$adwidth.$adheight." />";

// Generate code
Expand Down Expand Up @@ -219,7 +211,9 @@ function adrotate_insert_advert() {
}
unset($value);

// Verify ad
// Verify ads
adrotate_evaluate_ads();

if($type == 'empty') {
$action = 'new';
} else {
Expand Down
2 changes: 1 addition & 1 deletion adrotate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.3
Version: 5.13.4
License: GPLv3
*/

Expand Down
5 changes: 2 additions & 3 deletions dashboard/adrotatepro.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@
</div>

<div style="text-align: center;">
<p style="font-size: 175%;"><a href="https://ajdg.solutions/contact/?mtm_campaign=adrotate&mtm_keyword=adrotatepro_page" target="_blank">Let me know</a> if you have any questions!
<br />I'm looking forward to your and message!</p>
<p style="font-size: 175%;"><a href="https://ajdg.solutions/contact/?mtm_campaign=adrotate&mtm_keyword=adrotatepro_page" target="_blank">Let me know</a> if you have any questions.<br />I'm looking forward to hearing from you!</p>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion dashboard/publisher/adverts-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,4 @@
} else {
echo adrotate_error('error_loading_item');
}
?>
?>
33 changes: 17 additions & 16 deletions dashboard/publisher/adverts-generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* liability that might arise from its use.
------------------------------------------------------------------------------------ */

if(!$ad_edit_id) {
if(!$ad_edit_id) {
$edit_id = $wpdb->get_var("SELECT `id` FROM `{$wpdb->prefix}adrotate` WHERE `type` = 'generator' ORDER BY `id` DESC LIMIT 1;");
if($edit_id == 0) {
$wpdb->insert($wpdb->prefix."adrotate", array('title' => '', 'bannercode' => '', 'thetime' => $now, 'updated' => $now, 'author' => $userdata->user_login, 'imagetype' => 'dropdown', 'image' => '', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'os_ios' => 'Y', 'os_android' => 'Y', 'type' => 'generator', 'weight' => 6, 'autodelete' => 'N', 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
Expand All @@ -28,28 +28,29 @@
wp_enqueue_media();
wp_enqueue_script('uploader-hook', plugins_url().'/adrotate/library/uploader-hook.js', array('jquery'));
?>

<form method="post" action="admin.php?page=adrotate">
<?php wp_nonce_field('adrotate_generate_ad','adrotate_nonce'); ?>
<input type="hidden" name="adrotate_id" value="<?php echo $edit_banner->id;?>" />

<h2><?php _e("Generate Advert Code", 'adrotate'); ?></h2>
<table class="widefat" style="margin-top: .5em">

<thead>
<tr>
<th colspan="2"><strong><?php _e("Required", 'adrotate'); ?></strong></th>
</tr>
</thead>

<tbody>
<tr>
<th valign="top"><?php _e("Banner image", 'adrotate'); ?></th>
<td>
<select tabindex="1" id="adrotate_fullsize_dropdown" name="adrotate_fullsize_dropdown" style="min-width: 300px;">
<option value=""><?php _e("Select advert image", 'adrotate'); ?></option>
<option value=""><?php _e("Select advert image", 'adrotate'); ?></option>
<?php
foreach(adrotate_dropdown_folder_contents(WP_CONTENT_DIR."/".$adrotate_config['banner_folder'], array('jpg', 'jpeg', 'gif', 'png')) as $key => $option) {
$assets = adrotate_dropdown_folder_contents(WP_CONTENT_DIR."/".$adrotate_config['banner_folder'], array('jpg', 'jpeg', 'gif', 'png', 'webp'));
foreach($assets as $key => $option) {
echo "<option value=\"$option\">$option</option>";
}
?>
Expand All @@ -63,13 +64,13 @@
</td>
</tr>
</tbody>

<thead>
<tr>
<th colspan="2"><strong><?php _e("Viewports", 'adrotate'); ?> - <?php _e("Available in AdRotate Pro", 'adrotate'); ?></strong></th>
</tr>
</thead>

<tbody>
<tr>
<th valign="top"><?php _e("Smaller Devices", 'adrotate'); ?></th>
Expand Down Expand Up @@ -98,13 +99,13 @@
<tr>
<td colspan="2"><strong><?php _e("Important:", 'adrotate'); ?></strong> <?php _e("All sizes are optional, but it is highly recommended to use at least the small and medium size. Devices with viewports greater than 1280px will use the full sized banner.", 'adrotate'); ?><br /><?php _e("Are your files not listed? Upload them via the AdRotate Media Manager. For your convenience, use easy to use filenames.", 'adrotate'); ?></td>
</tr>

<thead>
<tr>
<th colspan="2"><strong><?php _e("Optional", 'adrotate'); ?></strong></th>
</tr>
</thead>

<tbody>
<tr>
<th valign="top"><?php _e("Target window", 'adrotate'); ?></th>
Expand All @@ -125,13 +126,13 @@
</td>
</tr>
</tbody>

<thead>
<tr>
<th colspan="2"><strong><?php _e("Portability", 'adrotate'); ?></strong></th>
</tr>
</thead>

<tbody>
<tr>
<th valign="top"><?php _e("Advert hash", 'adrotate'); ?></th>
Expand All @@ -142,16 +143,16 @@
</tbody>

</table>

<p class="submit">
<input tabindex="8" type="submit" name="adrotate_generate_submit" class="button-primary" value="<?php _e("Generate and Configure Advert", 'adrotate'); ?>" />
<a href="admin.php?page=adrotate&view=manage" class="button"><?php _e("Cancel", 'adrotate'); ?></a> <?php _e("Always test your adverts before activating them.", 'adrotate'); ?>
</p>

<p><em><strong><?php _e("CAUTION:", 'adrotate'); ?></strong> <?php _e("While the Code Generator has been tested and works, code generation, as always, is a interpretation of user input. If you provide the correct bits and pieces, a working advert may be generated. If you leave fields empty or insert the wrong info you probably end up with a broken advert.", 'adrotate'); ?><br /><strong><?php _e("NOTE:", 'adrotate'); ?></strong> <?php _e("If you insert an Advert Hash, all other fields are ignored.", 'adrotate'); ?></em></p>
</form>
<?php
} else {
echo adrotate_error('error_loading_item');
}
?>
?>
20 changes: 10 additions & 10 deletions dashboard/publisher/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
if(array_key_exists('contents', $level_one)) {
echo "<option value=\"".$adrotate_config['banner_folder']."/".$asset['basename']."/".$level_one['basename']."\">&mdash; &mdash; ".$level_one['basename']."</option>";
}
}
}
}
}
}
?>
</select>
<label for="adrotate_image"><input tabindex="1" type="file" name="adrotate_image" /><br /><em><strong><?php _e("Accepted files:", 'adrotate'); ?></strong> jpg, jpeg, gif, png, svg, html, js and zip<sup>*</sup>. <?php _e("Maximum size is 512Kb per file.", 'adrotate'); ?></em><br /><em><strong><?php _e("Important:", 'adrotate'); ?></strong> <?php _e("Make sure your file has no spaces or special characters in the name. Replace spaces with a - or _.", 'adrotate'); ?><br /><?php _e("Zip files are automatically extracted in the location where they are uploaded and the original zip file will be deleted once extracted.", 'adrotate'); ?><br /><?php _e("You can create top-level folders below. Folder names can between 1 and 100 characters long. Any special characters are stripped out.", 'adrotate'); ?></em></label>
<label for="adrotate_image"><input tabindex="1" type="file" name="adrotate_image" /><br /><em><strong><?php _e("Accepted files:", 'adrotate'); ?></strong> jpg, jpeg, gif, png, webp, svg, html, js and zip<sup>*</sup>. <?php _e("Maximum size is 512Kb per file.", 'adrotate'); ?></em><br /><em><strong><?php _e("Important:", 'adrotate'); ?></strong> <?php _e("Make sure your file has no spaces or special characters in the name. Replace spaces with a - or _.", 'adrotate'); ?><br /><?php _e("Zip files are automatically extracted in the location where they are uploaded and the original zip file will be deleted once extracted.", 'adrotate'); ?><br /><?php _e("You can create top-level folders below. Folder names can between 1 and 100 characters long. Any special characters are stripped out.", 'adrotate'); ?></em></label>

<p class="submit">
<input tabindex="2" type="submit" name="adrotate_upload_media" class="button-primary" value="<?php _e("Upload file", 'adrotate'); ?>" /> <em><?php _e("Click only once per file!", 'adrotate'); ?></em>
Expand All @@ -55,13 +55,13 @@
<input tabindex="3" id="adrotate_folder" name="adrotate_folder" type="text" size="20" class="ajdg-inputfield" value="" autocomplete="off" /> <input tabindex="4" type="submit" name="adrotate_create_folder" class="button-secondary" value="<?php _e("Create folder", 'adrotate'); ?>" />
</td>
</tr>

<?php
if(count($assets) > 0) {
$class = '';
foreach($assets as $asset) {
$class = ($class != 'alternate') ? 'alternate' : '';

echo "<tr class=\"$class\">";
echo "<td>";
echo $asset['basename'];
Expand All @@ -75,13 +75,13 @@
foreach($level_one['contents'] as $level_two) {
echo "<br />&mdash;&mdash; ".$level_two['basename'];
echo "<span style=\"float:right;\"><a href=\"".admin_url('/admin.php?page=adrotate-media&file='.$asset['basename'].'/'.$level_one['basename'].'/'.$level_two['basename'])."&_wpnonce=".wp_create_nonce('adrotate_delete_media_'.$asset['basename'].'/'.$level_one['basename'].'/'.$level_two['basename'])."\" title=\"".__("Delete", 'adrotate')."\">".__("Delete", 'adrotate')."</a></span>";

unset($level_two);
}
}
}

unset($level_one);
}
}
echo "</small>";
}
echo "</td>";
Expand All @@ -100,5 +100,5 @@
</form>
<p><center><small>
<?php _e("Make sure the banner images are not in use by adverts when you delete them!", 'adrotate'); ?> <?php _e("Deleting a folder deletes everything inside that folder as well!", 'adrotate'); ?><br />
<?php _e("Certain files such as html, js and zip can only be uploaded by Editors and Administrators. This is a security restriction to prevent XSS attacks.", 'adrotate'); ?>
</small></center></p>
<?php _e("Certain files such as html, js and zip can only be uploaded by Editors and Administrators. This is a security restriction to prevent XSS attacks.", 'adrotate'); ?>
</small></center></p>
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Tested up to: 6.6.1
CP requires at least: 1.0
CP tested up to: 2.1.1
Requires PHP: 7.4
Stable tag: 5.13.3
Stable tag: 5.13.4
License: GPLv3

Advertising made easy. Manage all your ads including Google Ads, Amazon banners and many more from your dashboard.
Expand Down Expand Up @@ -80,7 +80,7 @@ As a result **AdRotate Banner Manager** is trusted by tens of thousands of busin
* Option to either track clicks or impressions, or both
* Same day ticket support accessible from your dashboard

Learn all about [AdRotate Banner Manager](https://ajdg.solutions/product/adrotate-banner-manager/) and [AdRotate Pro](https://ajdg.solutions/product/adrotate-pro-single/) on my website! \
Learn all about [AdRotate Banner Manager](https://ajdg.solutions/product/adrotate-banner-manager/) and [AdRotate Pro](https://ajdg.solutions/product/adrotate-pro-single/) on my website!
Available AdRotate Pro licenses [1 site license](https://ajdg.solutions/product/adrotate-pro-single/) [2 sites license](https://ajdg.solutions/product/adrotate-pro-duo/) [5 sites license](https://ajdg.solutions/product/adrotate-pro-multi/) [100 sites license](https://ajdg.solutions/product/adrotate-pro-developer/)

= Translations =
Expand All @@ -107,6 +107,10 @@ For more detailed instructions check out the [installation steps](https://ajdg.s

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

= AdRotate 5.13.4 =
* [fix] Image selection not kept when using the advert generator
* [fix] webp images are now listed in the advert generator

= AdRotate 5.13.3 =
* [change] Use WordPress native function when uploading files
* [change] Use WordPress native function when creating folders
Expand Down

0 comments on commit fa5bd3d

Please sign in to comment.