PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.8.2
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.8.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 3.5.1 3.5.2 All 199 releases
betterdocs / views / widgets / social-2.php

social-2.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.8.2, at views/widgets/social-2.php

41 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div
2 <?php
3 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- view template receives variables via extract(); prefixing is impractical.
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7 echo $wrapper_attr; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
8 <div class="betterdocs-social-share-heading layout-2">
9 <?php
10 if ( $title ) {
11 $title_tag = isset( $title_tag ) ? $title_tag : 'h4';
12 // Allow-list the tag name — esc_attr() does not stop a space/= from
13 // injecting an attribute in this tag-name position (stored XSS via
14 // the shortcode title_tag).
15 $title_tag = betterdocs()->template_helper->is_valid_tag( $title_tag );
16 echo wp_sprintf( '<%1$s class="betterdocs-social-share-title-tag">%2$s</%1$s>', esc_attr( $title_tag ), esc_html( $title ) );
17 }
18 ?>
19 </div>
20
21 <ul class="betterdocs-social-share-links layout-2">
22 <?php
23 echo wp_sprintf(
24 '<li><img src="%s" alt=""></li>',
25 esc_html( betterdocs()->assets->icon( 'social/share-icon.svg' ) )
26 );
27 if ( ! empty( $links ) ) {
28 foreach ( $links as $key => $social ) {
29 echo wp_sprintf(
30 '<li><a title="%s" href="%s" target="_blank"><img src="%s" alt="%s"></a></li>',
31 esc_attr( $social['alt'] ),
32 esc_url( $social['link'] ),
33 esc_html( $social['icon-2'] ),
34 esc_attr( $social['alt'] )
35 );
36 }
37 }
38 ?>
39 </ul>
40 </div>
41