Skip to content

Commit

Permalink
Merge pull request #1 from GawainLynch/master
Browse files Browse the repository at this point in the history
Bolt 2 clean ups
  • Loading branch information
bobdenotter committed Oct 17, 2014
2 parents 72e3dbe + 225cc47 commit 268b272
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 31 deletions.
27 changes: 4 additions & 23 deletions Extension.php
Original file line number Diff line number Diff line change
@@ -1,32 +1,13 @@
<?php
// Google Analytics extension for Bolt

namespace GoogleAnalytics;
namespace Bolt\Extension\Bolt\GoogleAnalytics;

use Bolt\Extensions\Snippets\Location as SnippetLocation;

class Extension extends \Bolt\BaseExtension
{

function info() {

$data = array(
'name' =>"Google Analytics",
'description' => "A small extension to add the scripting for a Google Analytics tracker to your site.",
'author' => "Bob den Otter",
'link' => "http://bolt.cm",
'version' => "0.1",
'required_bolt_version' => "1.0",
'highest_bolt_version' => "1.0",
'type' => "Snippet, Widget",
'first_releasedate' => "2012-10-10",
'latest_releasedate' => "2013-01-27",
);

return $data;

}

public function getName()
{
return "Google Analytics";
Expand All @@ -44,7 +25,7 @@ function initialize() {
}


function insertAnalytics()
public function insertAnalytics()
{

if (empty($this->config['webproperty'])) {
Expand Down Expand Up @@ -97,7 +78,7 @@ function insertAnalytics()



function analyticsWidget()
public function analyticsWidget()
{
// http://ga-dev-tools.appspot.com/explorer/
// http://code.google.com/p/gapi-google-analytics-php-interface/
Expand Down Expand Up @@ -244,7 +225,7 @@ function analyticsWidget()
}


function secondMinute($seconds) {
private function secondMinute($seconds) {
return sprintf('%d:%02d', floor($seconds/60), $seconds % 60);
}

Expand Down
9 changes: 2 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "bolt/GoogleAnalytics",
"name": "bolt/googleanalytics",
"description": "",
"type": "bolt-extension",
"keywords": [],
Expand All @@ -18,12 +18,7 @@
"init.php"
],
"psr-4": {
"GoogleAnalytics\\": ""
}
},
"extra": {
"branch-alias": {
"dev-master": "1.7.*"
"Bolt\\Extension\\Bolt\\GoogleAnalytics\\": ""
}
}
}
2 changes: 1 addition & 1 deletion init.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

use GoogleAnalytics\Extension;
use Bolt\Extension\Bolt\GoogleAnalytics\Extension;

$app['extensions']->register(new Extension($app));

0 comments on commit 268b272

Please sign in to comment.