這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Ruven Themes: Sharing Links

外掛說明

This plugin provides a function to output links to share a post to Facebook, Twitter, and Google+.

Selected themes by Ruven will display the links automatically when the plugin is activated.
In other themes you will have to edit the templates in your theme in order to output the links.

Here an example of outputting the links in as list:

<?php
if(function_exists('ruven_sharing_links')) {
    echo '<ul class="sharing-list">';
    $sharing_links = ruven_sharing_links();
    foreach($sharing_links as $sharing_link) {
      echo "<li>$sharing_link</li>";
    }
    echo '</ul>';
}
?>

Usage

$sharing_links = ruven_sharing_links( $get_array, $include, $open_in_new_tab, $class );

Parameters

$get_array
(bool) (optional) If you want the return value to be an associative array (title, URL) or an array of HTML links. By getting an associative array, you are able to customize the output more.

Default: false

$include
(array) (optional) If you don’t want all platforms (Facebook, Twitter, and Google+) included, you can specify here which you want specifically to be returned. E.g. array('Twitter', 'Facebook') would only return Twitter and Facebook links.

Default: array()

$open_in_new_tab
(bool) (optional) If you want the sharing dialog to be opened in a new tab/window or not.

Default: true

$class
(array) (optional) Classes you want to add to the links. E.g. array('sharing-button', 'big-button')

Default: array()

Return Value

If the value of $get_array is false (default), the function returns an array of HTML links.

If the value of $get_array is true, the function returns an associative array of the title (e.g. “Twitter”) and the URL to share the post.

安裝方式

This plugin can be installed directly from your site.

  1. Log in and navigate to Plugins → Add New.
  2. Type “Ruven Themes: Sharing Links” into the Search input and click the “Search Plugins” button.
  3. Locate the Ruven Themes: Sharing Links in the list of search results and click “Install Now”.
  4. Click the “Activate Plugin” link at the bottom of the install screen.

It can also be installed manually.

  1. Download the “Ruven Themes: Sharing Links” plugin from WordPress.org.
  2. Unzip the package and move it into your plugins directory.
  3. Log into WordPress and navigate to the “Plugins” screen.
  4. Locate “Ruven Themes: Sharing Links” in the list and click the “Activate” link.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Ruven Themes: Sharing Links〉的開發相關工作。

參與者

將〈Ruven Themes: Sharing Links〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

v1.1

  • Minor code improvements.

v1.0

  • Initial Release.