PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.2
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.2
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 3.5.1 All 200 releases
← All changes | includes/Shortcodes/SocialShare.php +36 -29 3.4.04.9.2 View file →
@@ -5,39 +5,46 @@
5 5 use WPDeveloper\BetterDocs\Core\Shortcode;
6 6 use WPDeveloper\BetterDocs\Traits\SocialShare as SocialShareTrait;
7 7
8 8 class SocialShare extends Shortcode {
9 - use SocialShareTrait;
9 + use SocialShareTrait;
10 10
11 - protected $deprecated_attributes = [
12 - 'facebook_sharing' => 'facebook',
13 - 'pinterest_sharing' => 'pinterest',
14 - 'twitter_sharing' => 'twitter',
15 - 'linkedin_sharing' => 'linkedin'
16 - ];
11 + protected $deprecated_attributes = [
12 + 'facebook_sharing' => 'facebook',
13 + 'pinterest_sharing' => 'pinterest',
14 + 'twitter_sharing' => 'twitter',
15 + 'linkedin_sharing' => 'linkedin'
16 + ];
17 17
18 - public function get_name() {
19 - return 'betterdocs_social_share';
20 - }
18 + public function get_name() {
19 + return 'betterdocs_social_share';
20 + }
21 21
22 - public function get_style_depends() {
23 - return ['betterdocs-social-share'];
24 - }
22 + public function get_style_depends() {
23 + return [ 'betterdocs-social-share' ];
24 + }
25 25
26 - /**
27 - * Summary of default_attributes
28 - * @return array
29 - */
30 - public function default_attributes() {
31 - return [
32 - 'title' => __( 'Share This Article :', 'betterdocs' ),
33 - 'facebook' => '1',
34 - 'twitter' => '1',
35 - 'linkedin' => '1',
36 - 'pinterest' => '1'
37 - ];
38 - }
26 + /**
27 + * Summary of default_attributes
28 + * @return array
29 + */
30 + public function default_attributes() {
31 + return [
32 + 'layout' => 'layout-1',
33 + 'title' => __( 'Share This Article :', 'betterdocs' ),
34 + 'title_tag' => 'h5',
35 + 'facebook' => '1',
36 + 'twitter' => '1',
37 + 'linkedin' => '1',
38 + 'pinterest' => '1',
39 + 'instagram' => '1',
40 + ];
41 + }
39 42
40 - public function render( $atts, $content = null ) {
41 - $this->views( 'widgets/social' );
42 - }
43 + public function render( $atts, $content = null ) {
44 + if ( isset( $atts['layout'] ) && $atts['layout'] == 'layout-2' ) {
45 + $this->views( 'widgets/social-2' );
46 + } else {
47 + $this->views( 'widgets/social' );
48 + }
49 + }
43 50 }