Skip to content

Commit

Permalink
Cher 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwalter committed Jan 19, 2017
1 parent 6653a2a commit 1188212
Show file tree
Hide file tree
Showing 11 changed files with 1,146 additions and 402 deletions.
21 changes: 18 additions & 3 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# Cher

WordPress plugin for adding simple, lightweight social sharing buttons
WordPress plugin for central management of your website's social network profiles.

Add the share buttons to templates using the tag `<?php if (function_exists('share_buttons')) { share_buttons(); } ?>`. You can also use the shortcode `[share-buttons]` in the editor.
## Usage

![](http://news.sagacom.com/wp-content/blogs.dir/3/files/2014/08/cher-620x400.jpg)
Refer to plugin settings pages for instructions.

## Features
### Global Social Profile URLs
Manage your profile URLs in one place and print them into your templates with a simple tag.

![Customizing profile URLs](http://i.imgur.com/JQVPpkJ.png)

### Customizable Share Links
Lightweight, bare-bones share links that you can customize and style to your heart's content.

![Customizing share links](http://i.imgur.com/Ad40hBy.png)

## I got you babe.

![Cher](http://i.imgur.com/exbh6aF.jpg)
8 changes: 8 additions & 0 deletions assets/css/cher-admin.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.settings_page_cher_settings .checkbox_multi {
margin-right: 1.5em;
}

.settings_page_cher_settings .description-bottom {
display: block;
margin-top: 0.75em;
}
58 changes: 58 additions & 0 deletions assets/js/cher-frontend.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
(function() {
var links;

/**
* Open share link popup
*/
function openPopup(event) {
var width, height,
id = this.id,
url = this.href;

switch (id) {

case 'cher-link-twitter':
width = 500;
height = 442;
break;

case 'cher-link-linkedin':
width = 500;
height = 516;
break;

case 'cher-link-googleplus':
width = 400;
height = 600;
break;

case 'cher-link-pinterest':
width = 752;
height = 620;
break;

default:
width = 550;
height = 330;
}

if (id !== 'cher-link-email') {
event.preventDefault();
window.open(url, id, 'status=no,height=' + height + ',width=' + width + ',resizable=yes,toolbar=no,menubar=no,scrollbars=no,location=no,directories=no');
}
}

function onDocumentReady() {

// Click event for share links
links = document.querySelectorAll('.cher-link');
for (var i = 0; i < links.length; i++) {
links[i].addEventListener('click', openPopup);
}
}

document.addEventListener('DOMContentLoaded', function() {
onDocumentReady();
});

})();
90 changes: 0 additions & 90 deletions cher.css

This file was deleted.

Loading

0 comments on commit 1188212

Please sign in to comment.