phpdocs, phpcs
All checks were successful
PHP Code Checker / PHP Code Checker (pull_request) Successful in 39s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m10s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m9s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m4s

This commit is contained in:
André Menrath 2024-09-26 15:51:23 +02:00
parent 20f0ea2823
commit 3dbd3e21ee

View file

@ -260,6 +260,14 @@ abstract class Event extends Post {
return $summary;
}
/**
* Remove the permalink shortcode from a WordPress template.
*
* This used for the summary template, because the summary usually gets,
* used when converting a object, where the URL is usually appended anyway.
*
* @param string $template The template string.
*/
public static function remove_ap_permalink_from_template( $template ) {
$template = str_replace( '[ap_permalink]', '', $template );
$template = str_replace( '[ap_permalink type="html"]', '', $template );