Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ This project is licensed under the GPL3 License.

Release pending.

* Added: TootPress Afterloop Filter
* Added: Caching of ActivityPub Endpoints in WP REST API
* Added: Fade out WB REST CACHE Icon @ Admin Bar
* Added: Disable UpdraftPlus @ Admin Bar
Expand Down
1 change: 1 addition & 0 deletions unmus.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
require_once('unmus_widgets.php');
require_once('unmus_visibility.php');
require_once('unmus_cache.php');
require_once('unmus_tootpress.php');

// Ensure that all required functions are available during setup
require_once( ABSPATH . 'wp-admin/includes/upgrade.php');
Expand Down
32 changes: 32 additions & 0 deletions unmus_tootpress.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

/**
* TootPress
*
* @package unmus
* @since 0.9
*/

// Security: Stops code execution if WordPress is not loaded
if (!defined('ABSPATH')) { exit; }

/**
* Afterloop Filter
*
* @since 0.9
*
*/

function tootpress_afterloop_add( $content ) {

$domain=get_site_url();
$path='/tweets/';

$content='<div class="tootpress-afterloop-filter"><p>Vor Mastodon war Twitter.<br/><a style="padding-top:7px;" href="'.$domain.$path.'">Tweets lesen</a></p></div>';

return $content;

}
add_filter( 'tootpress_afterloop_filter', 'tootpress_afterloop_add', 99, 1 );

?>