Compare commits

...

2 commits

Author SHA1 Message Date
6819366b85 Merge branch 'dev/extendable-transformers' of ssh://code.event-federation.eu:2222/Event-Federation/wordpress-activitypub into dev/extendable-transformers
Some checks failed
PHP_CodeSniffer / phpcs (push) Failing after 4m39s
Unit Testing / phpunit (5.6, 6.2) (push) Failing after 4m38s
Unit Testing / phpunit (7.0) (push) Failing after 4m55s
Unit Testing / phpunit (7.2) (push) Failing after 5m4s
Unit Testing / phpunit (7.3) (push) Failing after 5m57s
Unit Testing / phpunit (7.4) (push) Failing after 5m28s
Unit Testing / phpunit (8.0) (push) Failing after 6m2s
Unit Testing / phpunit (8.1) (push) Failing after 5m53s
Unit Testing / phpunit (8.2) (push) Failing after 5m45s
Unit Testing / phpunit (latest) (push) Failing after 5m36s
2023-12-12 17:10:54 +01:00
b58452b43c Merge branch 'master' of github.com:Automattic/wordpress-activitypub into dev/extendable-transformers 2023-12-12 17:10:52 +01:00

View file

@ -314,19 +314,24 @@ abstract class Base { // todo renmae to Base_tranformer
* @return string The Template.
*/
protected function get_post_content_template() {
if ( 'excerpt' === \get_option( 'activitypub_post_content_type', 'content' ) ) {
return "[ap_excerpt]\n\n[ap_permalink type=\"html\"]";
$type = \get_option( 'activitypub_post_content_type', 'content' );
switch ( $type ) {
case 'excerpt':
$template = "[ap_excerpt]\n\n[ap_permalink type=\"html\"]";
break;
case 'title':
$template = "[ap_title]\n\n[ap_permalink type=\"html\"]";
break;
case 'content':
$template = "[ap_content]\n\n[ap_permalink type=\"html\"]\n\n[ap_hashtags]";
break;
default:
$template = \get_option( 'activitypub_custom_post_content', ACTIVITYPUB_CUSTOM_POST_CONTENT );
break;
}
if ( 'title' === \get_option( 'activitypub_post_content_type', 'content' ) ) {
return "[ap_title]\n\n[ap_permalink type=\"html\"]";
}
if ( 'content' === \get_option( 'activitypub_post_content_type', 'content' ) ) {
return "[ap_content]\n\n[ap_permalink type=\"html\"]\n\n[ap_hashtags]";
}
return \get_option( 'activitypub_custom_post_content', ACTIVITYPUB_CUSTOM_POST_CONTENT );
return apply_filters( 'activitypub_object_content_template', $template, $this->wp_post );
}
/**