From e1df1293551002436cbba6589c58105bacedeb88 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Mon, 23 Jan 2023 22:22:22 +0100 Subject: [PATCH] simplify inline help a bit --- includes/help.php | 46 ++++++++++++++++++++++++++++++++++++++++++ templates/settings.php | 25 ++++++----------------- 2 files changed, 52 insertions(+), 19 deletions(-) diff --git a/includes/help.php b/includes/help.php index f84ccaf..1f29119 100644 --- a/includes/help.php +++ b/includes/help.php @@ -1,5 +1,51 @@ add_help_tab( + array( + 'id' => 'template-tags', + 'title' => \__( 'Template Tags', 'activitypub' ), + 'content' => + '

' . __( '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' ) . '
+
[ap_excerpt lenght="400"]
+
' . \wp_kses( __( 'The post\'s excerpt (default 400 chars). length parameter is optional.', 'activitypub' ), 'default' ) . '
+
[ap_permalink type="url"]
+
' . \wp_kses( __( 'The post\'s permalink. Type can be either: url or html (an <a /> tag to the url).', 'activitypub' ), 'default' ) . '
+
[ap_shortlink type="url"]
+
' . \wp_kses( __( 'The post\'s shortlink. Type can be either url or html (an <a /> tag to the url). I can recommend Hum, to prettify the Shortlinks.', 'activitypub' ), 'default' ) . '
+
[ap_hashtags]
+
' . \wp_kses( __( 'The post\'s tags as hashtags.', 'activitypub' ), 'default' ) . '
+
[ap_hashcats]
+
' . \wp_kses( __( 'The post\'s categories as hashtags.', 'activitypub' ), 'default' ) . '
+
[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', 'activitypub' ), 'default' ) . '
+
[ap_author]
+
' . \wp_kses( __( 'The author\'s name.', 'activitypub' ), 'default' ) . '
+
[ap_authorurl]
+
' . \wp_kses( __( 'The URL to the author\'s profile page.', 'activitypub' ), 'default' ) . '
+
[ap_date]
+
' . \wp_kses( __( 'The post\'s date.', 'activitypub' ), 'default' ) . '
+
[ap_time]
+
' . \wp_kses( __( 'The post\'s time.', 'activitypub' ), 'default' ) . '
+
[ap_datetime]
+
' . \wp_kses( __( 'The post\'s date/time formated as "date @ time".', 'activitypub' ), 'default' ) . '
+
[ap_blogurl]
+
' . \wp_kses( __( 'The URL to the site.', 'activitypub' ), 'default' ) . '
+
[ap_blogname]
+
' . \wp_kses( __( 'The name of the site.', 'activitypub' ), 'default' ) . '
+
[ap_blogdesc]
+
' . \wp_kses( __( 'The description of the site.', 'activitypub' ), 'default' ) . '
+
' . + '

' . __( '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' ) . '

' . + '

' . \wp_kses( \__( 'Let me know if you miss a template pattern.', 'activitypub' ), 'activitypub' ) . '

', + ) +); + \get_current_screen()->add_help_tab( array( 'id' => 'glossar', diff --git a/templates/settings.php b/templates/settings.php index eb01128..24cd5c4 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -56,35 +56,22 @@

- +
-

-

  • [ap_title] -
  • [ap_content] -
  • -
  • [ap_excerpt lenght=400] -
  • -
  • [ap_permalink type=url] -
  • - -
  • [ap_shortlink type=url] - Hum, to prettify the Shortlinks. Type can be either: url (default, the escaped url), html (an a tag to the url).', 'activitypub' ), 'default' ); ?>
  • +
  • [ap_excerpt] -
  • +
  • [ap_permalink] -
  • +
  • [ap_shortlink] - Hum.', 'activitypub' ), 'default' ); ?>
  • [ap_hashtags] -
  • [ap_hashcats] -
  • -
  • [ap_image type=full] -
  • -
  • [ap_author] -
  • -
  • [ap_authorurl] -
  • -
  • [ap_date] -
  • -
  • [ap_time] -
  • -
  • [ap_datetime] -
  • -
  • [ap_blogurl] -
  • -
  • [ap_blogname] -
  • -
  • [ap_blogdesc] -
  • +
  • [ap_image] -
-

+

- -

Let me know if you miss a template pattern.', 'activitypub' ), 'activitypub' ); ?>