跳至内容
WordPress.org

China 简体中文

  • 主题
  • 插件
  • 新闻
    • 文档
    • 论坛
  • 关于
  • 获取 WordPress
获取 WordPress
WordPress.org

Plugin Directory

Social Sharing (by Danny)

  • 提交插件
  • 我的收藏
  • 登录
  • 提交插件
  • 我的收藏
  • 登录

该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

Social Sharing (by Danny)

作者:Danny van Kooten
下载
  • 详情
  • 评价
  • 安装
  • 开发进展
支持

描述

Social Sharing By Danny

The simplest sharing links possible for Twitter, Facebook and LinkedIn.

Most WordPress plugins that add social sharing functionality are too ugly, heavy, complicated or poorly coded for my liking. This plugin aims to be better: simple, efficient and flexible.

No script dependencies

From itself, the buttons are actually plain text links which require no external scripts. It makes no sense to load over 50 kilobytes of scripts and styles for a functionality 95% of your users will not use.

Simple, yet pretty and user-friendly

You can have the plugin load two very small files to add icons and a pop-up functionality to the sharing links. This way, users do not have to leave your website after clicking a sharing option. Both files are optional and you are free to craft your own styles.

Features

  • Sharing links for Twitter, Facebook and LinkedIn
  • Simple icon styles with a hover effect
  • Simple script of just 426 bytes (with no additional dependencies) which will make the various sharing links open in a pop-up window.
  • A shortcode and a template function to display the buttons anywhere you want.
  • An overridable filter to customize when and where to display the sharing links.
  • Translation ready

Translations

Is the plugin not translated into your language? You can contribute your translations using the translation editor here on WordPress.org.

About the author

Danny van Kooten has been developing plugins for WordPress since version 3.0, all the way back in 2010. You can read more about him on his personal website or check out his other WordPress plugins.

屏幕截图

  • Simple but beautiful sharing links add the end of your posts.
  • Disable the default plugin CSS to create your own styles.
  • The settings page of the plugin.

安装

Installing the plugin

  1. In your WordPress admin panel, go to Plugins > New Plugin, search for Social Sharing by Danny and click “Install now”
  2. Alternatively, download the plugin and upload the contents of dvk-social-sharing.zip to your plugins directory, which usually is /wp-content/plugins/.
  3. Activate the plugin.

Additional Customization

Have a look at the frequently asked questions section for some examples of additional customization.

常见问题

Can I display the sharing buttons using a shortcode?

Yes, you can use the following shortcode (eg. inside posts or pages).

[dvk_social_sharing]

Can I display the sharing buttons using a template function?

Yes, you can use the following PHP function from your template files.

<?php echo dvk_social_sharing(); ?>

I want more control over when to show the sharing options

Use the dvkss_display filter to show the links in more places.

Example 1: will add the sharing links to everything possible

add_filter('dvkss_display', '__return_true');

Example 2: will add the sharing links to all single posts, pages and other post types.

function my_display_condition() {
    return is_singular();
}

add_filter('dvkss_display', 'my_display_condition');

Shortcode and function arguments

element (string)

The element to use as the wrapping element. Defaults to p, a paragraph element.

twitter_username (string)

The Twitter username to add to tweets. This will override the value from the settings page.

social_options (comma separated string)

The social media buttons to show. You can also use this to change the order of the buttons. Defaults to twitter, facebook, googleplus, which are the only 3 possible values.

before_text (string)

The text to show before the links. This will override the value in the settings page.

twitter_text (string)
facebook_text (string)
googleplus_text (string)
linkedin_text (string)

The texts for the different links. Defaults to the string set in the translation file.

评价

I would kiss the author

ijkleban 2020 年 6 月 4 日
Lightweight, elegent, non obtrusive custom styling ready. If light, fast and simple is your game this plugin is fot you. I would really kiss people behind this plugin.

Love the Plugin

lifestylermary 2018 年 11 月 6 日
I am enjoying playing with WordPress.

Fast and Minimal

limitcracker 2018 年 5 月 6 日
Great plugin. Fast and minimal. Worked just great.

Great plugin

Nick Krastev 2018 年 1 月 19 日
Great plugin

Just what I was looking for!

Toronto SEO Guy 2017 年 10 月 31 日
I’d been looking high and low for a simple, minimalist social sharing plugin and finally found it in Social Sharing by Danny! Unlike the vast majority of the other social sharing plugins out there, Danny’s frees you of the unwanted bells and & whistles that just needlessly suck up resources and complicate things. This plugin is reliable, flexible, beautiful, and super-easy to implement. Best of all, the developer, Danny, is incredibly responsive and receptive to new ideas. In fact, I recently suggested a new feature and boom – literally within hours Danny had it integrated into the plugin and working perfectly. Thank you Danny!

Awesome plugin

chekmate 2017 年 9 月 2 日
Finally a plugin that doesn’t use the wrong image for posting to Facebook and keeps all the options on facebook available. I can chose my page or my profile to post to. Love it.
阅读所有69条评价

贡献者及开发者

「Social Sharing (by Danny)」是开源软件。 以下人员对此插件做出了贡献。

贡献者
  • Danny van Kooten
  • ibericode

「Social Sharing (by Danny)」插件已被翻译至 6 种本地化语言。 感谢所有译者为本插件所做的贡献。

帮助将「Social Sharing (by Danny)」翻译成简体中文。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志。

更新日志

1.3.9 – Oct 16, 2024

  • Address PHP warning introduced by version 1.3.8.

1.3.8 – Oct 11, 2024

  • Escape shortcode arguments before outputting to prevent stored XSS from users with edit_post capability. Thanks to Peter Thaleikis for the responsible disclosure.

1.3.7 – Oct 1, 2024

  • Remove Google Plus as an option, since it has long been shut down.
  • Add defer attribute to pop-up script tag.
  • Improved sanitization of settings.
  • Disallow the use of <a> elements in the before_text setting if user lacks unfiltered_html capability.
  • Get rid of ES6 code in JavaScript files, to support older browsers.

1.3.4 – Dec 23, 2022

  • Rewrite admin JavaScript to no longer require jQuery.
  • Minor PHP improvements.
  • Improved minification of all CSS and JS assets.

1.3.3 – Dec 31, 2019

  • Remove unused LinkedIn parameters.
  • Switch to WordPress.org managed translations.

1.3.2 – March 23, 2018

  • Minor code optimisations
  • Added linkedin_text shortcode argument to FAQ.

1.3.1 – October 26, 2017

Misc. textual improvements.

1.3 – October 4, 2017

Additions

  • Added LinkedIn.

1.2.7 – January 6, 2017

Improvements

  • Use https:// protocol for sharing links.
  • Use SVG icons.

Additions

  • Add “large” icon size option.
  • Choose social network options from settings page.
  • Added Italian translations, thanks to Alessandro Guidi.

1.2.6 – March 29, 2016

Fixes

  • Apostrophes in titles not properly escaped in sharing URL’s. Thanks Robin Aldenhoven!

1.2.5 – January 26, 2015

Improvements

  • Minor improvements to pop-up script

Additions

  • Added Finnish (fi_FI) translations, thanks to Ari-Pekka Koponen

1.2.4 – November 17, 2014

Improvements

  • Wrapped link text in element so it can be hidden using CSS
  • Improvements to pop-up JavaScript

1.2.3 – September 4, 2014

Improvements

  • Added minified scripts and option to load minified version
  • Some textual improvements

1.2.2 – April 30, 2014

Fixes

  • Fixed not being able to save all “auto add to ..” checkboxes unchecked

1.2.1 – April 29, 2014

Additions

  • Added German translations, thanks Andreas Kuhl!

Improvements

  • Wrapped non-translatable strings in translation calls.
  • Updated Dutch translations

1.2 – March 19, 2014

Additions

  • Added option to automatically add sharing options to all registered post types
  • Added Spanish translations, props to Luciano A. Ferrer.

Improvements

  • Disabled Pop-up JS by default until we figure out a cross-browser compatibility fix.

1.1 – February 19, 2014

  • Added: Slovenian translations, thanks to Domen Hrabar, Viking Marketing
  • Improved: direct file access security

1.0.9 – December 30, 2013

  • Added: Danish translation, thanks to Finn Hoelgaard!
  • Added: Russian translation, thanks to Nikita!
  • Improved: Pop-up script now waits for full page load.

1.0.6 – December 20, 2013

  • Improved: Pop-up JS now used addEventListener to enable multiple event listeners (like a Google Analytics plugin) attaching to the sharing links.

1.0.5 – December 9, 2013

  • Added: French translations, thanks to Said
  • Improved: All backend strings are now translatable
  • Improved: Prevented direct access or search engine indexing of plugin files
  • Improved: Facebook URL sharing parameters

1.0.4 – December 2, 2013

  • Improved: Minified pop-up script to 480 bytes.
  • Improved: Removed image attribute from Facebook Share URL. FB will now pick up og:image meta tags.

1.0.3 – November 25, 2013

  • Fixed: undefined index notice when saving options.

1.0.2 – November 20, 2013

  • Added: Dutch translation
  • Added: Option to change the text that shows before the sharing links.

1.0.1 – November 20, 2013

  • Fixed: Added settings link to plugins overview page
  • Fixed: “tweet about” option in admin now tweets about the correct plugin.

1.0 – November 17, 2013

  • Initial release.

额外信息

  • 版本 1.3.9
  • 最后更新:1 年前
  • 活跃安装数量 3,000+
  • WordPress 版本 3.7 或更高版本
  • 已测试的最高版本为 6.6.4
  • PHP 版本 7.2 或更高版本
  • 语言

    Dutch 、 English (UK) 、 English (US) 、 German 、 Spanish (Chile) 、 Spanish (Spain) 和 Swedish.

    翻译成简体中文

  • 标签
    facebookLinkedInsocialsocial sharingtwitter
  • 高级视图

评级

5 星(最高 5 星)。
  • 66 条 5 星评价 5 星 66
  • 2 条 4 星评价 4 星 2
  • 0 条 3 星评价 3 星 0
  • 0 条 2 星评价 2 星 0
  • 0 条 1 星评价 1 星 0

添加我的评价

查看全部评论

贡献者

  • Danny van Kooten
  • ibericode

支持

有话要说吗?是否需要帮助?

查看支持论坛

捐助

您愿意支持这个插件的发展吗?

捐助此插件

  • 关于
  • 新闻
  • 主机
  • 隐私
  • 陈列窗
  • 主题
  • 插件
  • 区块样板
  • 学习
  • 支持
  • 开发者
  • WordPress.tv ↗︎
  • 参与
  • 活动
  • 捐赠 ↗
  • 未来五分计划
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

China 简体中文

  • 关注我们的 X(原 Twitter)账号
  • 访问我们的 Bluesky 账号
  • 关注我们的 Mastodon 账号
  • 访问我们的 Threads 账号
  • 访问我们的 Facebook 公共主页
  • 关注我们的 Instagram 账号
  • 关注我们的 LinkedIn 主页
  • 访问我们的 TikTok 账号
  • 访问我们的 YouTube 频道
  • 访问我们的 Tumblr 账号
代码如诗