| @@ -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 . ']' ); | |