AdRotate Pro 5.10.5 – Tweaks and fixes.

AdRotate Pro header

This version includes a number of tweaks to improve PHP8 compatibility and fixes some minor issues with Post Injection – Tweaks if you will.
A few variables were calculated as a double, this is now fixed and everything is a proper integer.
And when saving groups, a few empty variables are now defined as empty when they need to be.

PHP is getting real nitpicky… 🙄

Anyway, this has all been fixed. Thanks everyone for reporting these issues. And if you find more, let me know.

Changes in AdRotate Professional 5.10.5

  • [fix] Some variables being the wrong type
  • [fix] Undefined variable for some post injection choices
  • [tweak] Better handling of saving group settings

Download

Grab your update today, available through automatic updates in your dashboard or via direct download in your dashboard. Or if you do not have AdRotate Pro yet, get your copy today through the product pages below.

Update to AdRotate Professional 5.10.4 – Fixing Post Injection!

AdRotate Pro header

This version further improves Post Injection yet again and enables multiple groups in the same post or page to work reliably. While I thought I fixed this in the last update. A conflict in the logic prevented multiple groups from working. In the process I also redid how the post content is handled making it more efficient. It now loops less through the content for faster results.

Thanks everyone for helping test this new release over the last 2 days! 🥳

Updating to AdRotate Pro 5.10.4 via (s)FTP

If you’re still ‘stuck’ on 5.10.1 or 5.10.2 you may need to update manually to the latest version. This can be done quite easily by following the manual steps on the update guide here: Upgrade AdRotate Pro to a newer version.
If you need help with this please let me know in a support ticket and we’ll take it from there.

Changes in AdRotate Professional 5.10.4

  • [fix] Missing $wpdb value for multisite output
  • [fix] Post Injection multiple groups for ‘inside’ options
  • [fix] Post Injection no redundant looping through post_content

Download

Grab your update today, available through automatic updates in your dashboard or via direct download in your dashboard. Or if you do not have AdRotate Pro yet, get your copy today through the product pages below.

AdRotate Banner Manager 5.10.2 – Available now!

AdRotate Banner Manager 5.10.2 fixes the logic for Post Injection even more. If you have multiple groups injecting ads in the same categories or pages that should no longer cause missing adverts. To make it so in the new code I’ve added a sort of exclusion list.

Meanwhile someone reported an issue with uninstalling the plugin. This has been fixed too.

Changes in AdRotate 5.10.2

  • [fix] Post Injection multiple groups for ‘inside’ options
  • [fix] Post Injection no redundant looping through post_content
  • [fix] Faulty function call when uninstalling the plugin

Download

Grab your update today, available through automatic updates in your dashboard or via direct download in your dashboard. Or if you do not have AdRotate Banner Manager or AdRotate Professional yet, get your copy today through the product pages below.

AdRotate Banner Manager 5.10.1 – Available now!

AdRotate Banner Manager 5.10.1 fixes the logic for Post Injection like the 5.10.3 update for AdRotate Professional did. Several fixes are included to make Post Injection more useful and functional. As introduced in the previous update, AdRotate Banner Manager now supports Post Injection up to 20 paragraphs. And this now actually works too. yay!

The database updater has been fixed and now properly applies the update to the database. This should get rid of the annoying error on the Groups dashboard.

Several components of the dashbaord have been updated, texts and links and such as well as the AdRotate Pro page to better reflect the current features of AdRotate pro. And due to these changes all relevant strings in various translations have been updates and translated as well.
If you find any grammar errors or silly translations in that, please let me know. I use an auto-translator for most languages.

Changes in AdRotate 5.10.1

  • [fix] Dashboard error when adding new group
  • [fix] Blocks not working for Post Injection
  • [fix] Post Injection not always showing every advert
  • [fix] Post Injection sometimes selecting the wrong ads
  • [fix] Missing nonce value in maintenance link

Download

Grab your update today, available through automatic updates in your dashboard or via direct download in your dashboard. Or if you do not have AdRotate Banner Manager or AdRotate Professional yet, get your copy today through the product pages below.

Format your toots on Mastodon when using Share on Mastodon

I’ve been using Jan Boddez his Share on Mastodon plugin and really like how it works. Simple and clean. But the toots are not formatted very well. Poking through his code I found he added a filter for it so you can make your own format. Excellent.

Grab a copy of the plugin here: https://wordpress.org/plugins/share-on-mastodon/. It’s a super simple plugin to install and use.

Over the past few days I’ve been making test posts and settled on a format for toots like so: https://home.social/@arnandegans/109684410554812887.
Clean, simple, easy to read.

If you want this layout as well, add the following code to your themes functions.php file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Reformat the toot format/template for Share to Mastodon
function ajdg_share_on_mastodon($status, $post) {
$formatted_status  = wp_strip_all_tags(html_entity_decode(get_the_title($post->ID), ENT_QUOTES | ENT_HTML5, get_bloginfo('charset'))) . "\n\n";
$formatted_status .= mb_substr(wp_strip_all_tags(html_entity_decode(get_the_excerpt($post->ID))), 0, 199, get_bloginfo('charset')) . "[…]\n";
$formatted_status .= esc_url_raw(get_permalink($post->ID)) . "\n\n";
 
$toot_tags = get_the_tags($post->ID);
if($toot_tags) {
foreach($toot_tags as $tag) {
$tags[] = "#" . preg_replace("/[^a-z0-9]/i", '', $tag->name);
}
$formatted_status .= implode(" ", $tags);
unset($tags, $toot_tags);
}
 
return $formatted_status;
}
add_filter( 'share_on_mastodon_status', 'ajdg_share_on_mastodon', 10, 2);

This basically does the same as the plugin does by default. But adds the except of the post (or a snippet if the excerpt doesn’t exist) and adds the tags. Tags with spaces do not work on Mastodon, so spaces are stripped out. And a few new lines are added for readability.

Enjoy!