PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.3
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.3
4.9.3 4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 All 201 releases
← All changes | views/templates/parts/social.php +17 -10 3.4.2 → 4.9.3 View file →
@@ -1,24 +1,31 @@
1 1 <?php
2 -do_action( 'betterdocs_docs_before_social' );
2 +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- view template receives variables via extract(); prefixing is impractical.
3 3
4 +if ( ! defined( 'ABSPATH' ) ) {
5 + exit;
6 +}
4 7 $mods = betterdocs()->customizer->defaults->generate_defaults();
5 8
6 9 if ( ! $mods['betterdocs_post_social_share'] ) {
7 - return;
10 + return;
8 11 }
9 12
10 13 $social_sharing_text = $mods['betterdocs_social_sharing_text'];
14 +$social_sharing_title_tag = $mods['betterdocs_social_share_title_tag'];
11 15 $facebook_sharing = $mods['betterdocs_post_social_share_facebook'];
12 16 $twitter_sharing = $mods['betterdocs_post_social_share_twitter'];
13 17 $linkedin_sharing = $mods['betterdocs_post_social_share_linkedin'];
14 18 $pinterest_sharing = $mods['betterdocs_post_social_share_pinterest'];
15 19
16 -$attributes = betterdocs()->template_helper->get_html_attributes( [
17 - 'title' => "{$social_sharing_text}",
18 - 'facebook' => "{$facebook_sharing}",
19 - 'twitter' => "{$twitter_sharing}",
20 - 'linkedin' => "{$linkedin_sharing}",
21 - 'pinterest' => "{$pinterest_sharing}"
22 -] );
20 +$attributes = betterdocs()->template_helper->get_html_attributes(
21 + [
22 + 'title' => "{$social_sharing_text}",
23 + 'title_tag' => "{$social_sharing_title_tag}",
24 + 'facebook' => "{$facebook_sharing}",
25 + 'twitter' => "{$twitter_sharing}",
26 + 'linkedin' => "{$linkedin_sharing}",
27 + 'pinterest' => "{$pinterest_sharing}"
28 + ]
29 +);
23 30
24 -echo do_shortcode( "[betterdocs_social_share " . $attributes . "]" );
31 +echo do_shortcode( '[betterdocs_social_share ' . $attributes . ']' );