Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.5 Changes #22

Merged
merged 17 commits into from
Apr 7, 2019
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

- If the bug is security related please do not submit a GitHub issue. Email hello@utm.codes with details and we will be in touch.

- All other bug should be [submitted via GitHub](https://github.com/christopherldotcom/utm.codes/issues) issues. Please follow the provided template and include as much detail as possible.
- All other bug should be [submitted via GitHub](https://github.com/asdfdotdev/utm.codes/issues) issues. Please follow the provided template and include as much detail as possible.
- Before submtiting a new issue please make sure it hasn't previously been reported by searching existing issues.

**Fix a bug, add something cool, or make a change?**

- [Submit a pull request](https://github.com/christopherldotcom/utm.codes/pulls) so we can add it!
- [Submit a pull request](https://github.com/asdfdotdev/utm.codes/pulls) so we can add it!
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**

A clear and concise description of what you expected to happen.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. macOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
- Node/NPM Versions [e.g 11.11.x/6.7.x]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Site Information**

- utm.codes version:
- WordPress version:
- PHP version:
- MySQL version:


**Additional context**

Add any other context about the problem here.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**

A clear and concise description of what you want to happen.

**Describe alternatives you've considered**

A clear and concise description of any alternative solutions or features you've considered.

**Additional context**

Add any other context or screenshots about the feature request here.
12 changes: 12 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="utm-dot-codes" xsi:noNamespaceSchemaLocation="phpcs.xsd">

<file>index.php</file>
<file>utm-dot-codes.php</file>
<file>classes/</file>

<rule ref="WordPress"/>
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPress-Extra"/>
</ruleset>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center" style="padding-bottom:20px"><img src="img/utm-dot-codes-logo.png" width="400"></p><p>&nbsp;</p>

[![Build Status](https://travis-ci.org/christopherldotcom/utm.codes.svg?branch=master)](https://travis-ci.org/christopherldotcom/utm.codes) [![codecov](https://codecov.io/gh/christopherldotcom/utm.codes/branch/master/graph/badge.svg)](https://codecov.io/gh/christopherldotcom/utm.codes) [![RIPS CodeRisk](https://coderisk.com/wp/plugin/utm-dot-codes/badge "RIPS CodeRisk")](https://coderisk.com/wp/plugin/utm-dot-codes) [![StackShare](https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/christopherl/utm-codes)
[![Build Status](https://travis-ci.org/asdfdotdev/utm.codes.svg?branch=master)](https://travis-ci.org/asdfdotdev/utm.codes) [![codecov](https://codecov.io/gh/asdfdotdev/utm.codes/branch/master/graph/badge.svg)](https://codecov.io/gh/asdfdotdev/utm.codes) [![RIPS CodeRisk](https://coderisk.com/wp/plugin/utm-dot-codes/badge "RIPS CodeRisk")](https://coderisk.com/wp/plugin/utm-dot-codes) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/5ed065c06159462cbd425fb39f9b7fd0)](https://app.codacy.com/app/chrislarrycarl/utm.codes)

Welcome to the developer repository for utm.codes, a WordPress plugin that makes creating analytics friendly marketing links quick and easy.

Expand Down
44 changes: 33 additions & 11 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
=== utm.codes ===
Contributors: chrislarrycarl
Donate link: https://utm.codes/pricing/
Tags: analytics, utm codes, google analytics, tracking links, campaign marketing, link generator
Tags: analytics, utm codes, analytics, google analytics, campaign marketing, link generator
Requires at least: 4.7.0
Tested up to: 5.1.0
Requires PHP: 5.6.0
Stable tag: 1.4.0
Stable tag: 1.5.0
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Easily create and manage your marketing tracking links in WordPress for better analytics.
Easily create and manage your campaign marketing links in WordPress for better analytics.

== Description ==

Make your campaign marketing easier and more effective with WordPress. utm.codes turns your WordPress admin into your marketing links repository by making it easier to create, organize, and use your links.
It's time to ditch the spreadsheets for a better way to create and manage your campaign marketing links.

utm.codes turns your WordPress admin into a link building powerhouse by making it easier to create, organize, and use your links.

For more information, videos, and helpful tips [visit the utm.codes website](https://utm.codes).

= Features =

- Easily create marketing links with UTM codes for better campaign analytics
- Easily create campaign marketing links with UTM codes for better campaign analytics
- Automatically format links in lowercase, remove spaces, and remove non alphanumeric characters for more consistent reporting
- Batch create links for all your social networks with just a click
- Search, filter, and easily find existing links using familiar WordPress admin controls
- Link builder automatically detects url error responses to prevent creating bad links
- One click shortening with Bitly for easier link sharing
- Save notes with link for team communication, usage context, future reference, and more
- Link element API for custom utm code formatting
- Link element API filter for custom utm code formatting
- Social network options API filter for custom batch link options
- Supports adding additional custom parameters to links for improved versatility
- Multi-user access to share creation and management responsibilities
- Multi-user access within WordPress to share creation and management responsibilities
- See your current link count in the admin dashboard "At a Glance"
- Works with PHP 5.6, 7.0, 7.1, and 7.2
- 100% Free and Open Source
Expand All @@ -39,19 +42,19 @@ Upload the utm.codes plugin to your WordPress site, activate it, and start creat

= Settings =

Configure your targeted social networks, and shortening API key, under Settings / utm.codes to enable batch creation and auto shorten when saving links.
Configure your formatting preferences, targeted social networks, link notes, and shortening API key, under Settings / utm.codes to enable batch creation and auto shorten when saving links.

= Documentation =

For additional details about installing, configuring, and using utm.codes [visit our GitHub wiki](https://github.com/christopherldotcom/utm.codes/wiki)
For additional details about installing, configuring, customizing, and using utm.codes [visit our GitHub wiki](https://github.com/asdfdotdev/utm.codes/wiki)

= Development Resources =

utm.codes is built using development code not included in the WordPress.org download because it isn't required for use. This code includes the webpack build used to create our minified CSS and JavaScript as well as PHPUnit tests to ensure support of new WordPress releases.

All source code associated with utm.codes is open source, free to use for any purpose, and released under the GPL v2.0 license. Development code, including instructions for running both the build and tests, is available at the [utm.codes GitHub repository](https://github.com/christopherldotcom/utm.codes).
All source code associated with utm.codes is open source, free to use for any purpose, and released under the GPL v2.0 license. Development code, including instructions for running both the build and tests, is available at the [utm.codes GitHub repository](https://github.com/asdfdotdev/utm.codes).

You can also [browse our build history at travis-ci.org](https://travis-ci.org/christopherldotcom/utm.codes).
You can also [browse our build history at travis-ci.org](https://travis-ci.org/asdfdotdev/utm.codes).

== Frequently Asked Questions ==

Expand All @@ -67,6 +70,18 @@ Batch social link creation requires selection of social networks. Select network

Simply add the parameter to your Link URL (e.g. https://example.com/?param=value) and utm.codes will append your utm code values to the end of the url when you save the link.

= What if I need custom parameter formats? =

Adding your own custom formatting is easy with an API filter. Visit our GitHub wiki for examples and more details.

= What if I want to share links on a social network your settings don't support? =

Adding your own custom social network options is easy with an API filter. Visit our GitHub wiki for examples and more details.

= I love this plugin. =

That isn't a question. But thank you.

== Screenshots ==

1. The links list provides easy access to search, filter, edit, and copy links
Expand All @@ -77,6 +92,13 @@ Simply add the parameter to your Link URL (e.g. https://example.com/?param=value

== Changelog ==

= 1.5.0 =

- New API filter for custom social network options (examples in the wiki)
- New unit tests
- Code quality updates
- Changes Publish button text to Save, remove quick edit (GitHub Issue #28)

= 1.4.0 =

- New API filter for custom link element formats (examples in the wiki)
Expand Down
14 changes: 7 additions & 7 deletions _build/javascript/editor/batch-toggle.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
;(function ($) {
(function ($) {

$(function () {

$('#utmdclink_batch').on('change', function(event){
$("#utmdclink_batch").on("change", function(event){
$(this)
.parents('#utmdc_link_meta_box')
.toggleClass('batch-active', $(this).is(':checked'))
.find('#utmdclink_source')
.attr('required', !$(this).is(':checked'));
.parents("#utmdc_link_meta_box")
.toggleClass("batch-active", $(this).is(":checked"))
.find("#utmdclink_source")
.attr("required", !$(this).is(":checked"));
});

});

})(jQuery);
}(jQuery));
8 changes: 4 additions & 4 deletions _build/javascript/editor/textarea-size.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
;(function ($) {
(function ($) {

$(function () {

if($('#utmdclink_notes').length) {
$('#utmdclink_notes').height( $('#utmdclink_notes')[0].scrollHeight );
if($("#utmdclink_notes").length) {
$("#utmdclink_notes").height( $("#utmdclink_notes")[0].scrollHeight );
}

});

})(jQuery);
}(jQuery));
62 changes: 31 additions & 31 deletions _build/javascript/editor/url-tester.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
;(function ($) {
(function ($) {

$(function () {
var feedback_ele = $('label.utmdclink_url span');
var feedbackElement = $("label.utmdclink_url span");

$('#utmdclink_url').on('blur', function(event){
feedback_ele.removeClass();
function processResponse(status) {
switch (status) {
case 200:
feedbackElement.addClass("valid");
break;

if ($(this).val() != '') {
case 400:
case 401:
case 403:
case 404:
case 500:
case 502:
feedbackElement.addClass("invalid");
break;

default:
feedbackElement.addClass("unknown");
break;
}
}

$("#utmdclink_url").on("blur", function(event){
feedbackElement.removeClass();

if ($(this).val() !== "") {
$.ajax({
url: ajaxurl,
data: {
key: utmdc_rest_api.action_key,
action: 'utmdc_check_url_response',
key: utmdcRestApi.actionKey,
action: "utmdc_check_url_response",
url: $(this).val()
}
}).done(
function (response) {
process_response(response.status);
processResponse(response.status);
}
).fail(
function (response) {
process_response(response.status);
processResponse(response.status);
}
);
}
});

function process_response(status) {
switch (status) {
case 200:
feedback_ele.addClass('valid');
break;

case 400:
case 401:
case 403:
case 404:
case 500:
case 502:
feedback_ele.addClass('invalid');
break;

default:
feedback_ele.addClass('unknown');
break;
}
}
});

})(jQuery);
}(jQuery));
10 changes: 5 additions & 5 deletions _build/javascript/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import './editor/batch-toggle'
import './editor/textarea-size'
import './editor/url-tester'
import './postlist/link-copy'
import './settings/slider'
import "./editor/batch-toggle";
import "./editor/textarea-size";
import "./editor/url-tester";
import "./postlist/link-copy";
import "./settings/slider";
6 changes: 3 additions & 3 deletions _build/javascript/postlist/link-copy.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
;(function ($) {
(function ($) {

$(function () {

$('.utmdclinks-copy').on('click', function(event){
$(".utmdclinks-copy").on("click", function(event){
$(this).select();
});

});

})(jQuery);
}(jQuery));
Loading