PHPackages                             wirelab/shares-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wirelab/shares-plugin

AbandonedArchivedStreams-addon[Utility &amp; Helpers](/categories/utility)

wirelab/shares-plugin
=====================

Plugin which provides users with a quick way of adding customizable share links.

2.0.0(7y ago)0109MITPHP

Since Mar 30Pushed 5y ago2 watchersCompare

[ Source](https://github.com/wirelab/shares-plugin)[ Packagist](https://packagist.org/packages/wirelab/shares-plugin)[ Docs](http://wirelab.nl/)[ RSS](/packages/wirelab-shares-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (12)Used By (0)

Shares plugin
=============

[](#shares-plugin)

⚠️ This repository has been deprecated ⚠️
-----------------------------------------

[](#️-this-repository-has-been-deprecated-️)

Plugin which provides users with a quick way of adding customizable share links with GA tracking. Works with any module that sets a `meta_title` and `meta_description`.

Installation
------------

[](#installation)

`composer require wirelab/shares-plugin`

Usage
-----

[](#usage)

1. Set your facebook app key in `settings > plugins > shares plugin` *(optional)*
2. Selects the networks that are enabled by default `settings > plugins > shares plugin` *(optional)*
3. put `{{ shares_scripts()|raw }}` in your theme to load all javascript files
4. call `{{ shares({title: '', url: '', description: '', networks: ['']|raw }}` in any twig file.

*All parameters are optional*

Parameters
----------

[](#parameters)

NameDescriptionOptionalDefault valueTypetitleThe title used in the sharesyestemplate.meta\_titleStringdescriptionThe description used in the sharesyestemplate.meta\_descriptionStringurlThe url that gets sharesyesthe current urlStringnetworksList of social media networks to returnyesall *(configurable in the settings)*ArrayEnable facebook shares
======================

[](#enable-facebook-shares)

Set the following cookie: `cconsent=isAccepted` using javascript. Then call `callCbIfConsentGiven(callback)`.

Examples
--------

[](#examples)

```
{{ shares() }} {# Guessing all data #}

{{ shares({'networks':['twitter','facebook']}) }} {# Limiting to certain networks #}

{# Manually setting data #}
{{
	shares({
		'title': 'Wirelab',
		'description': 'The website of Wirelab',
		'url': 'http:://www.wirelab.nl'
	})
}}

{{ shares_data() }} {# Get an array of all data instead of views #}
```

Adding google analytics
-----------------------

[](#adding-google-analytics)

Add the following code near the top of the `` tag. Replace `UA-XXXXX-Y` with the property ID (also called the "tracking ID") of the Google Analytics property you wish to track.

```

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview');

```

*For the most recent snippet please check [Google's documentation](https://developers.google.com/analytics/devguides/collection/analyticsjs/#the_javascript_tracking_snippet)*

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~43 days

Recently: every ~102 days

Total

11

Last Release

2894d ago

Major Versions

1.5.4 → 2.0.02018-06-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3fb6cd2f066c1047d17fe80fa30b780d35aec59b20d9eef3189c77309c3f02d?d=identicon)[Wirelab](/maintainers/Wirelab)

---

Top Contributors

[![ddnetters](https://avatars.githubusercontent.com/u/15140770?v=4)](https://github.com/ddnetters "ddnetters (35 commits)")

---

Tags

phppyropyrocmspyrocms-extenstionspyrocms-modulespyrocms3pluginpyrocmsshareswirelabpyrocms 3

### Embed Badge

![Health badge](/badges/wirelab-shares-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/wirelab-shares-plugin/health.svg)](https://phpackages.com/packages/wirelab-shares-plugin)
```

###  Alternatives

[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k37.3M2.1k](/packages/ergebnis-composer-normalize)[coldtrick/widget_manager

Manage your widgets

214.3k](/packages/coldtrick-widget-manager)[coldtrick/thewire_tools

Extend the functionality of The Wire

133.2k](/packages/coldtrick-thewire-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
