Skip to content

Commit

Permalink
Merge pull request #7 from christopherldotcom/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
chrislarrycarl authored Apr 22, 2018
2 parents 2579923 + 9673804 commit 0447828
Show file tree
Hide file tree
Showing 28 changed files with 1,239 additions and 507 deletions.
26 changes: 26 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "50...100"

status:
project: yes
patch: yes
changes: no

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment:
layout: "header, diff"
behavior: default
require_changes: no
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Please describe the tests that you ran to verify your changes. Provide instructi

- [ ] TestUtmDotCodesUnit
- [ ] TestUtmDotCodesIntegration
- [ ] TestUtmDotCodesAjax

**Test Configuration**:

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea
**/.DS_Store
**/node_modules
**/config.inc.local.php
**/_test/build/**/*
26 changes: 15 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,29 @@ cache:

matrix:
include:
- php: 7.2
env: WP_VERSION=4.9
- php: 7.2
env: WP_VERSION=nightly
- php: 7.1
env: WP_VERSION=latest
env: WP_VERSION=nightly
- php: 7.0
env: WP_VERSION=latest
env: WP_VERSION=nightly
- php: 5.6
env: WP_VERSION=4.7
- php: 5.6
env: WP_VERSION=latest
env: WP_VERSION=4.8
- php: 5.6
env: WP_VERSION=trunk
env: WP_VERSION=4.9
- php: 5.6
env: WP_VERSION=nightly

before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
- |
if [[ ! -z "$WP_VERSION" ]] ; then
bash _test/bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
composer global require "phpunit/phpunit=4.8.*|5.7.*"
composer global require "phpunit/phpunit=5.7.*|6.5.*"
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
Expand All @@ -53,10 +53,14 @@ script:
- |
if [[ ! -z "$WP_VERSION" ]] ; then
cd _test
mkdir -p build/logs
phpunit
WP_MULTISITE=1 phpunit
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
phpcs
fi
after_success:
- bash <(curl -s https://codecov.io/bash)
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# utm.codes Developer Repository

[![Build Status](https://travis-ci.org/christopherldotcom/utm.codes.svg?branch=master)](https://travis-ci.org/christopherldotcom/utm.codes)
[![Build Status](https://travis-ci.org/christopherldotcom/utm.codes.svg?branch=master)](https://travis-ci.org/christopherldotcom/utm.codes) [![codecov](https://codecov.io/gh/chrislarrycarl/codes.utm/branch/master/graph/badge.svg?token=rc0h4XOMwl)](https://codecov.io/gh/chrislarrycarl/codes.utm)

This is the developer repo for utm.codes, a WordPress plugin.

Expand All @@ -10,9 +10,9 @@ To download just the plugin (without the developer extras in this repo) check ou

## Branches

**master** - Contains the latest usable code and will mirror, with limited exception, the code avialable for download from WordPress.org and from the utm.codes website.
**master** - Contains the latest usable code and will mirror the code available for download from WordPress.org.

**development** - This branch will, at times, be more experimental and likely contain incomplete and/or untested ideas. Please reference latest commit messages/tags for further details. This branch sould be used for development and experimentation only and not deployed to a production environment.
**development** - This branch will at times be more experimental and may contain incomplete and/or untested ideas. Please reference latest commit messages/tags for further details. This branch should be used for development and experimentation only and not deployed to a production environment.

## Repository Contents

Expand All @@ -26,14 +26,16 @@ To download just the plugin (without the developer extras in this repo) check ou
│   └── tests
├── classes
├── css
├── img
├── js
└── languages
```

- **_build** - Static resource build files used to compile our javascript and stylesheet files
- **_test** - PHPUnit unit and integration test resources
- **_test** - PHPUnit unit, integration, and ajax test resources
- **classes** - Core classes used by our plugin
- **css** - Compiled admin stylesheet used by our plugin
- **img** - Our awesome logo
- **js** - Compiled javascript file used by our plugin
- **languages** - Portable Object Template (.pot) file for plugin translation

Expand Down
22 changes: 17 additions & 5 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Tags: utm codes, google analytics, tracking links, campaign marketing, link gene
Requires at least: 4.7
Tested up to: 4.9.5
Requires PHP: 5.6
Stable tag: 1.1
Stable tag: 1.2
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Create and manage your marketing campaign links in WordPress.

== Description ==

Make your campaign marketing easier and more effective with WordPress. utm.codes turns your WordPress admin into your marketing links repository by making link creation, organization, and use easier.
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.

For more information [visit the utm.codes website](https://utm.codes).

Expand All @@ -23,7 +23,9 @@ For more information [visit the utm.codes website](https://utm.codes).
- Automatically format links elements in lowercase, remove spaces, and remove non alphanumeric characters
- Batch create links for all your social networks with just a click
- Search, filter, and easily find existing links for copy & paste use
- Automatically shorten links using Goo.gl for easier sharing
- Link builder detects url error responses to prevent creating bad links
- Automatically shorten links using Bitly for easier sharing
- Supports adding additional custom paramters to links
- Allow multiple users to share creation and management responsibilities within WordPress
- See your current link count in the admin dashboard "At a Glance"
- Works with PHP 5.6, 7.0, 7.1, and 7.2
Expand All @@ -41,22 +43,32 @@ Configure your targeted social networks, and shortening API key, under Settings

= Why is the shorten link checkbox missing when I create a link? =

Shortening links requires a valid Goo.gl API key. Add your key under Settings > utm.codes. If you don't have a key, click the link near the API key input to get one.
Shortening links requires a valid Bitly API Generic Access Token. Add your key under Settings > utm.codes.

= Why is the create social links checkbox missing when I create a link? =

Batch social link creation requires selection of social networks. Select networks under Settings > utm.codes to create links for when batch creating social links.

= What if I need custom paramters in my links? =

Simply add the paramter 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.

== Screenshots ==

1. The links list provides easy access to search, filter, edit, and copy links
2. Shorten links just by clicking the checkbox
3. Create social links in batch just by clicking the checkbox
4. Configure settings for your favorite social networks and Goo.gl API key
4. Configure settings for link format, your favorite social networks, Bitly API key, and more
5. See your link count in the WordPress dashboard "At a Glance"

== Changelog ==

= 1.2 =

- Replace Goo.gl with Bitly url shortener
- New "Labels" taxonomy
- New link tester

= 1.1 =

- New link formatting options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
.attr('required', !$(this).is(':checked'));
});

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

});

})(jQuery);
11 changes: 11 additions & 0 deletions _build/javascript/link-list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
;(function ($) {

$(function () {

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

});

})(jQuery);
51 changes: 51 additions & 0 deletions _build/javascript/response-checker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
;(function ($) {

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

$('#utmdclink_url').on('blur', function(event){
feedback_ele.removeClass();

if ($(this).val() != '') {
$.ajax({
url: ajaxurl,
data: {
key: utmdc_rest_api.action_key,
action: 'utmdc_check_url_response',
url: $(this).val()
}
}).done(
function (response) {
process_response(response.status);
}
).fail(
function (response) {
process_response(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);
Loading

0 comments on commit 0447828

Please sign in to comment.