From 77873d12b3ed55bf66536d081a2a0f20a52009ec Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Thu, 11 May 2023 14:20:35 +0200 Subject: [PATCH 1/5] sanitize output --- includes/class-shortcodes.php | 44 +++++++++++++++-------------------- includes/class-webfinger.php | 2 +- includes/help.php | 4 ++-- 3 files changed, 22 insertions(+), 28 deletions(-) diff --git a/includes/class-shortcodes.php b/includes/class-shortcodes.php index 7289808..f0f8e22 100644 --- a/includes/class-shortcodes.php +++ b/includes/class-shortcodes.php @@ -42,8 +42,8 @@ class Shortcodes { foreach ( $tags as $tag ) { $hash_tags[] = \sprintf( '', - \get_tag_link( $tag ), - $tag->slug + \esc_url( \get_tag_link( $tag ) ), + \esc_html( $tag->slug ) ); } @@ -66,7 +66,7 @@ class Shortcodes { return ''; } - return \get_the_title( $post_id ); + return \esc_html( \get_the_title( $post_id ) ); } @@ -170,7 +170,7 @@ class Shortcodes { } } - return \apply_filters( 'the_excerpt', $excerpt ); + return $excerpt; } /** @@ -189,21 +189,11 @@ class Shortcodes { return ''; } - $atts = shortcode_atts( - array( 'apply_filters' => 'yes' ), - $atts, - $tag - ); - $content = \get_post_field( 'post_content', $post ); - if ( 'yes' === $atts['apply_filters'] ) { - $content = \apply_filters( 'the_content', $content ); - } else { - $content = do_blocks( $content ); - $content = wptexturize( $content ); - $content = wp_filter_content_tags( $content ); - } + $content = do_blocks( $content ); + $content = wptexturize( $content ); + $content = wp_filter_content_tags( $content ); // replace script and style elements $content = \preg_replace( '@<(script|style)[^>]*?>.*?@si', '', $content ); @@ -343,7 +333,11 @@ class Shortcodes { $hash_tags = array(); foreach ( $categories as $category ) { - $hash_tags[] = \sprintf( '', \get_category_link( $category ), $category->slug ); + $hash_tags[] = \sprintf( + '', + \esc_url( \get_category_link( $category ) ), + \esc_html( $category->slug ) + ); } return \implode( ' ', $hash_tags ); @@ -365,13 +359,13 @@ class Shortcodes { return ''; } - $name = \get_the_author_meta( 'display_name', $post->post_author ); + $name = \esc_html( \get_the_author_meta( 'display_name', $post->post_author ) ); if ( ! $name ) { return ''; } - return $name; + return \esc_html( $name ); } /** @@ -422,7 +416,7 @@ class Shortcodes { * @return string */ public static function blogname( $atts, $content, $tag ) { - return \get_bloginfo( 'name' ); + return \esc_html( \get_bloginfo( 'name' ) ); } /** @@ -435,7 +429,7 @@ class Shortcodes { * @return string */ public static function blogdesc( $atts, $content, $tag ) { - return \get_bloginfo( 'description' ); + return \esc_html( \get_bloginfo( 'description' ) ); } /** @@ -464,7 +458,7 @@ class Shortcodes { return ''; } - return $date; + return \esc_html( $date ); } /** @@ -493,7 +487,7 @@ class Shortcodes { return ''; } - return $date; + return \esc_html( $date ); } /** @@ -522,6 +516,6 @@ class Shortcodes { return ''; } - return $date; + return \esc_html( $date ); } } diff --git a/includes/class-webfinger.php b/includes/class-webfinger.php index 1581853..679f8a1 100644 --- a/includes/class-webfinger.php +++ b/includes/class-webfinger.php @@ -51,7 +51,7 @@ class Webfinger { } // try to access author URL - $response = \wp_remote_get( + $response = \wp_safe_remote_get( $url, array( 'headers' => array( 'Accept' => 'application/activity+json' ), diff --git a/includes/help.php b/includes/help.php index 58339fb..ccf61cc 100644 --- a/includes/help.php +++ b/includes/help.php @@ -9,8 +9,8 @@ '
' . '
[ap_title]
' . '
' . \wp_kses( __( 'The post\'s title.', 'activitypub' ), 'default' ) . '
' . - '
[ap_content apply_filters="yes"]
' . - '
' . \wp_kses( __( 'The post\'s content. With apply_filters you can decide if filters should be applied or not (default is yes). The values can be yes or no. apply_filters attribute is optional.', 'activitypub' ), 'default' ) . '
' . + '
[ap_content]
' . + '
' . \wp_kses( __( 'The post\'s content.', 'activitypub' ), 'default' ) . '
' . '
[ap_excerpt lenght="400"]
' . '
' . \wp_kses( __( 'The post\'s excerpt (default 400 chars). length attribute is optional.', 'activitypub' ), 'default' ) . '
' . '
[ap_permalink type="url"]
' . From 677d507fe9f6512dc7083e0def8a9893568b5f21 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Tue, 23 May 2023 11:10:05 +0200 Subject: [PATCH 2/5] Revorked "sanitize output" This reverts commit 77873d12b3ed55bf66536d081a2a0f20a52009ec. --- includes/class-shortcodes.php | 63 +++++++++++++++++++++++------------ includes/class-webfinger.php | 2 +- includes/model/class-post.php | 10 ++++-- 3 files changed, 49 insertions(+), 26 deletions(-) diff --git a/includes/class-shortcodes.php b/includes/class-shortcodes.php index f0f8e22..7a0dd64 100644 --- a/includes/class-shortcodes.php +++ b/includes/class-shortcodes.php @@ -43,7 +43,7 @@ class Shortcodes { $hash_tags[] = \sprintf( '', \esc_url( \get_tag_link( $tag ) ), - \esc_html( $tag->slug ) + \wp_strip_all_tags( $tag->slug ) ); } @@ -66,7 +66,7 @@ class Shortcodes { return ''; } - return \esc_html( \get_the_title( $post_id ) ); + return \wp_strip_all_tags( \get_the_title( $post_id ), true ); } @@ -170,7 +170,7 @@ class Shortcodes { } } - return $excerpt; + return \apply_filters( 'the_excerpt', $excerpt ); } /** @@ -183,23 +183,36 @@ class Shortcodes { * @return string */ public static function content( $atts, $content, $tag ) { + // prevent inception + remove_shortcode( 'ap_content' ); + $post = get_post(); if ( ! $post || \post_password_required( $post ) ) { return ''; } + $atts = shortcode_atts( + array( 'apply_filters' => 'yes' ), + $atts, + $tag + ); + $content = \get_post_field( 'post_content', $post ); - $content = do_blocks( $content ); - $content = wptexturize( $content ); - $content = wp_filter_content_tags( $content ); - - // replace script and style elements - $content = \preg_replace( '@<(script|style)[^>]*?>.*?@si', '', $content ); + if ( 'yes' === $atts['apply_filters'] ) { + $content = \apply_filters( 'the_content', $content ); + } else { + $content = do_blocks( $content ); + $content = wptexturize( $content ); + $content = wp_filter_content_tags( $content ); + } + $content = strip_shortcodes( $content ); $content = \trim( \preg_replace( '/[\n\r\t]/', '', $content ) ); + add_shortcode( 'ap_content', array( 'Activitypub\Shortcodes', 'content' ) ); + return $content; } @@ -231,7 +244,10 @@ class Shortcodes { return \esc_url( \get_permalink( $post->ID ) ); } - return \sprintf( '%1$s', \esc_url( \get_permalink( $post->ID ) ) ); + return \sprintf( + '%1$s', + \esc_url( \get_permalink( $post->ID ) ) + ); } /** @@ -262,7 +278,10 @@ class Shortcodes { return \esc_url( \wp_get_shortlink( $post->ID ) ); } - return \sprintf( '%1$s', \esc_url( \wp_get_shortlink( $post->ID ) ) ); + return \sprintf( + '%1$s', + \esc_url( \wp_get_shortlink( $post->ID ) ) + ); } /** @@ -336,7 +355,7 @@ class Shortcodes { $hash_tags[] = \sprintf( '', \esc_url( \get_category_link( $category ) ), - \esc_html( $category->slug ) + \wp_strip_all_tags( $category->slug ) ); } @@ -359,13 +378,13 @@ class Shortcodes { return ''; } - $name = \esc_html( \get_the_author_meta( 'display_name', $post->post_author ) ); + $name = \get_the_author_meta( 'display_name', $post->post_author ); if ( ! $name ) { return ''; } - return \esc_html( $name ); + return wp_strip_all_tags( $name ); } /** @@ -416,7 +435,7 @@ class Shortcodes { * @return string */ public static function blogname( $atts, $content, $tag ) { - return \esc_html( \get_bloginfo( 'name' ) ); + return \wp_strip_all_tags( \get_bloginfo( 'name' ) ); } /** @@ -429,7 +448,7 @@ class Shortcodes { * @return string */ public static function blogdesc( $atts, $content, $tag ) { - return \esc_html( \get_bloginfo( 'description' ) ); + return \wp_strip_all_tags( \get_bloginfo( 'description' ) ); } /** @@ -458,7 +477,7 @@ class Shortcodes { return ''; } - return \esc_html( $date ); + return $date; } /** @@ -487,15 +506,15 @@ class Shortcodes { return ''; } - return \esc_html( $date ); + return $date; } /** * Generates output for the ap_datetime shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts shortcode attributes + * @param string $content shortcode content + * @param string $tag shortcode tag name * * @return string */ @@ -516,6 +535,6 @@ class Shortcodes { return ''; } - return \esc_html( $date ); + return $date; } } diff --git a/includes/class-webfinger.php b/includes/class-webfinger.php index 679f8a1..1581853 100644 --- a/includes/class-webfinger.php +++ b/includes/class-webfinger.php @@ -51,7 +51,7 @@ class Webfinger { } // try to access author URL - $response = \wp_safe_remote_get( + $response = \wp_remote_get( $url, array( 'headers' => array( 'Accept' => 'application/activity+json' ), diff --git a/includes/model/class-post.php b/includes/model/class-post.php index ccb161c..0c36f58 100644 --- a/includes/model/class-post.php +++ b/includes/model/class-post.php @@ -508,8 +508,12 @@ class Post { $content = do_shortcode( $content ); wp_reset_postdata(); - $content = \wpautop( \wp_kses( $content, $this->allowed_tags ) ); - $content = \trim( \preg_replace( '/[\n\r\t]/', '', $content ) ); + // replace script and style elements + $content = \preg_replace( '@<(script|style)[^>]*?>.*?@si', '', $content ); + $content = \wp_kses( $content, $this->allowed_tags ); + $content = \wpautop( $content ); + $content = \preg_replace( '/[\n\r\t]/', '', $content ); + $content = \trim( $content ); $content = \apply_filters( 'activitypub_the_content', $content, $post ); $content = \html_entity_decode( $content, \ENT_QUOTES, 'UTF-8' ); @@ -537,6 +541,6 @@ class Post { return "[ap_content]\n\n[ap_hashtags]\n\n[ap_permalink type=\"html\"]"; } - return $content; + return \get_option( 'activitypub_custom_post_content' ); } } From 3d1a0af6cb131045e94b776e2099ad6a5d2b8a8d Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Tue, 23 May 2023 11:13:17 +0200 Subject: [PATCH 3/5] moved strip style/script --- includes/class-shortcodes.php | 2 ++ includes/model/class-post.php | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-shortcodes.php b/includes/class-shortcodes.php index 7a0dd64..5387387 100644 --- a/includes/class-shortcodes.php +++ b/includes/class-shortcodes.php @@ -208,6 +208,8 @@ class Shortcodes { $content = wp_filter_content_tags( $content ); } + // replace script and style elements + $content = \preg_replace( '@<(script|style)[^>]*?>.*?@si', '', $content ); $content = strip_shortcodes( $content ); $content = \trim( \preg_replace( '/[\n\r\t]/', '', $content ) ); diff --git a/includes/model/class-post.php b/includes/model/class-post.php index 0c36f58..9d58068 100644 --- a/includes/model/class-post.php +++ b/includes/model/class-post.php @@ -508,8 +508,6 @@ class Post { $content = do_shortcode( $content ); wp_reset_postdata(); - // replace script and style elements - $content = \preg_replace( '@<(script|style)[^>]*?>.*?@si', '', $content ); $content = \wp_kses( $content, $this->allowed_tags ); $content = \wpautop( $content ); $content = \preg_replace( '/[\n\r\t]/', '', $content ); From d91eaeae725e94de9b1a8fb8283db3b819decdd3 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Tue, 23 May 2023 11:26:12 +0200 Subject: [PATCH 4/5] phpdoc --- includes/class-shortcodes.php | 160 +++++++++++++++++----------------- 1 file changed, 79 insertions(+), 81 deletions(-) diff --git a/includes/class-shortcodes.php b/includes/class-shortcodes.php index 5387387..010ef6d 100644 --- a/includes/class-shortcodes.php +++ b/includes/class-shortcodes.php @@ -3,9 +3,7 @@ namespace Activitypub; class Shortcodes { /** - * Class constructor, registering WordPress then shortcodes - * - * @param WP_Post $post A WordPress Post Object + * Class constructor, registering WordPress then Shortcodes */ public static function init() { foreach ( get_class_methods( 'Activitypub\Shortcodes' ) as $shortcode ) { @@ -16,13 +14,13 @@ class Shortcodes { } /** - * Generates output for the ap_hashtags shortcode + * Generates output for the 'ap_hashtags' shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The post tags as hashtags. */ public static function hashtags( $atts, $content, $tag ) { $post_id = get_the_ID(); @@ -51,13 +49,13 @@ class Shortcodes { } /** - * Generates output for the ap_title shortcode + * Generates output for the 'ap_title' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The post title. */ public static function title( $atts, $content, $tag ) { $post_id = get_the_ID(); @@ -71,13 +69,13 @@ class Shortcodes { } /** - * Generates output for the ap_excerpt shortcode + * Generates output for the 'ap_excerpt' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The post excerpt. */ public static function excerpt( $atts, $content, $tag ) { $post = get_post(); @@ -174,13 +172,13 @@ class Shortcodes { } /** - * Generates output for the ap_content shortcode + * Generates output for the 'ap_content' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The post content. */ public static function content( $atts, $content, $tag ) { // prevent inception @@ -219,13 +217,13 @@ class Shortcodes { } /** - * Generates output for the ap_permalink shortcode + * Generates output for the 'ap_permalink' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The post permalink. */ public static function permalink( $atts, $content, $tag ) { $post = get_post(); @@ -253,13 +251,13 @@ class Shortcodes { } /** - * Generates output for the ap_shortlink shortcode + * Generates output for the 'ap_shortlink' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The post shortlink. */ public static function shortlink( $atts, $content, $tag ) { $post = get_post(); @@ -287,11 +285,11 @@ class Shortcodes { } /** - * Generates output for the ap_image shortcode + * Generates output for the 'ap_image' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * * @return string */ @@ -330,13 +328,13 @@ class Shortcodes { } /** - * Generates output for the ap_hashcats shortcode + * Generates output for the 'ap_hashcats' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The post categories as hashtags. */ public static function hashcats( $atts, $content, $tag ) { $post_id = get_the_ID(); @@ -365,13 +363,13 @@ class Shortcodes { } /** - * Generates output for the ap_author shortcode + * Generates output for the 'ap_author' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The author name. */ public static function author( $atts, $content, $tag ) { $post = get_post(); @@ -390,13 +388,13 @@ class Shortcodes { } /** - * Generates output for the ap_authorurl shortcode + * Generates output for the 'ap_authorurl' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The author URL. */ public static function authorurl( $atts, $content, $tag ) { $post = get_post(); @@ -415,24 +413,24 @@ class Shortcodes { } /** - * Generates output for the ap_blogurl shortcode + * Generates output for the 'ap_blogurl' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The site URL. */ public static function blogurl( $atts, $content, $tag ) { return \esc_url( \get_bloginfo( 'url' ) ); } /** - * Generates output for the ap_blogname shortcode + * Generates output for the 'ap_blogname' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * * @return string */ @@ -441,26 +439,26 @@ class Shortcodes { } /** - * Generates output for the ap_blogdesc shortcode + * Generates output for the 'ap_blogdesc' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The site description. */ public static function blogdesc( $atts, $content, $tag ) { return \wp_strip_all_tags( \get_bloginfo( 'description' ) ); } /** - * Generates output for the ap_date shortcode + * Generates output for the 'ap_date' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The post date. */ public static function date( $atts, $content, $tag ) { $post = get_post(); @@ -483,13 +481,13 @@ class Shortcodes { } /** - * Generates output for the ap_time shortcode + * Generates output for the 'ap_time' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The post time. */ public static function time( $atts, $content, $tag ) { $post = get_post(); @@ -512,13 +510,13 @@ class Shortcodes { } /** - * Generates output for the ap_datetime shortcode + * Generates output for the 'ap_datetime' Shortcode * - * @param array $atts shortcode attributes - * @param string $content shortcode content - * @param string $tag shortcode tag name + * @param array $atts The Shortcode attributes. + * @param string $content The ActivityPub post-content. + * @param string $tag The tag/name of the Shortcode. * - * @return string + * @return string The post date/time. */ public static function datetime( $atts, $content, $tag ) { $post = get_post(); From 83991c0cd83e56c34e5937fcf8fb88381ed5c319 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Tue, 23 May 2023 12:14:39 +0200 Subject: [PATCH 5/5] fix #332 and some of the feedback of @mattwiebe --- includes/help.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/includes/help.php b/includes/help.php index ccf61cc..291162c 100644 --- a/includes/help.php +++ b/includes/help.php @@ -8,37 +8,37 @@ '

' . __( 'The following Template Tags are available:', 'activitypub' ) . '

' . '
' . '
[ap_title]
' . - '
' . \wp_kses( __( 'The post\'s title.', 'activitypub' ), 'default' ) . '
' . - '
[ap_content]
' . - '
' . \wp_kses( __( 'The post\'s content.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The post\'s title.', 'activitypub' ), array( 'code' => array() ) ) . '
' . + '
[ap_content apply_filters="yes"]
' . + '
' . \wp_kses( __( 'The post\'s content. With apply_filters you can decide if filters (apply_filters( \'the_content\', $content )) should be applied or not (default is yes). The values can be yes or no. apply_filters attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_excerpt lenght="400"]
' . - '
' . \wp_kses( __( 'The post\'s excerpt (default 400 chars). length attribute is optional.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The post\'s excerpt (default 400 chars). length attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_permalink type="url"]
' . - '
' . \wp_kses( __( 'The post\'s permalink. type can be either: url or html (an <a /> tag). type attribute is optional.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The post\'s permalink. type can be either: url or html (an <a /> tag). type attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_shortlink type="url"]
' . - '
' . \wp_kses( __( 'The post\'s shortlink. type can be either url or html (an <a /> tag). I can recommend Hum, to prettify the Shortlinks. type attribute is optional.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The post\'s shortlink. type can be either url or html (an <a /> tag). I can recommend Hum, to prettify the Shortlinks. type attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_hashtags]
' . - '
' . \wp_kses( __( 'The post\'s tags as hashtags.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The post\'s tags as hashtags.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_hashcats]
' . - '
' . \wp_kses( __( 'The post\'s categories as hashtags.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The post\'s categories as hashtags.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_image type=full]
' . - '
' . \wp_kses( __( 'The URL for the post\'s featured image, defaults to full size. The type attribute can be any of the following: thumbnail, medium, large, full. type attribute is optional.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The URL for the post\'s featured image, defaults to full size. The type attribute can be any of the following: thumbnail, medium, large, full. type attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_author]
' . - '
' . \wp_kses( __( 'The author\'s name.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The author\'s name.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_authorurl]
' . - '
' . \wp_kses( __( 'The URL to the author\'s profile page.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The URL to the author\'s profile page.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_date]
' . - '
' . \wp_kses( __( 'The post\'s date.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The post\'s date.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_time]
' . - '
' . \wp_kses( __( 'The post\'s time.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The post\'s time.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_datetime]
' . - '
' . \wp_kses( __( 'The post\'s date/time formated as "date @ time".', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The post\'s date/time formated as "date @ time".', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_blogurl]
' . - '
' . \wp_kses( __( 'The URL to the site.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The URL to the site.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_blogname]
' . - '
' . \wp_kses( __( 'The name of the site.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The name of the site.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
[ap_blogdesc]
' . - '
' . \wp_kses( __( 'The description of the site.', 'activitypub' ), 'default' ) . '
' . + '
' . \wp_kses( __( 'The description of the site.', 'activitypub' ), array( 'code' => array() ) ) . '
' . '
' . '

' . __( 'You may also use any Shortcode normally available to you on your site, however be aware that Shortcodes may significantly increase the size of your content depending on what they do.', 'activitypub' ) . '

' . '

' . __( 'Note: the old Template Tags are now deprecated and automatically converted to the new ones.', 'activitypub' ) . '

' . @@ -48,8 +48,8 @@ \get_current_screen()->add_help_tab( array( - 'id' => 'glossar', - 'title' => \__( 'Glossar', 'activitypub' ), + 'id' => 'glossary', + 'title' => \__( 'Glossary', 'activitypub' ), 'content' => '

' . \__( 'Fediverse', 'activitypub' ) . '

' . '

' . \__( 'The Fediverse is a new word made of two words: "federation" + "universe"', 'activitypub' ) . '

' .