Plugin Directory

Changeset 1067497


Ignore:
Timestamp:
01/13/2015 11:50:24 PM (11 years ago)
Author:
segmentio
Message:

1.0.10

Location:
segmentio/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • segmentio/trunk

    • Property svn:ignore set to

      Readme.md
      .git
      .gitignore
  • segmentio/trunk/Readme.md

    r980785 r1067497  
    22# Analytics for WordPress
    33
    4 **Analytics for WordPress** is a WordPress plugin for [Segment](https://segment.io) that lets you send data to any analytics service you want without touching any code.
     4**Analytics for WordPress** is a WordPress plugin for [Segment](https://segment.com) that lets you send data to any analytics service you want without touching any code.
    55
    66
    77## Installation
    88
    9 To get up and running, checkout our documentation at [segment.io/plugins/wordpress](https://segment.io/plugins/wordpress)—installation takes less than five minutes!
     9To get up and running, checkout our documentation at [segment.com/plugins/wordpress](https://segment.com/plugins/wordpress)—installation takes less than five minutes!
    1010
    1111
     
    3131## Support
    3232
    33 If you run into issues, be sure to check out the [documentation](https://segment.io/plugins/wordpress), and you can always reach out to our [support team](https://segment.io/support) for help!
     33If you run into issues, be sure to check out the [documentation](https://segment.com/plugins/wordpress), and you can always reach out to our [support team](https://segment.com/support) for help!
    3434
    3535
  • segmentio/trunk/analytics-wordpress.php

    r986769 r1067497  
    44Plugin URI: https://segment.io/plugins/wordpress
    55Description: The hassle-free way to integrate any analytics service into your WordPress site.
    6 Version: 1.0.4
     6Version: 1.0.10
    77License: GPLv2
    88Author: Segment.io
     
    182182     * Current plugin version.
    183183     */
    184     const VERSION = '1.0.5';
     184    const VERSION = '1.0.8';
    185185
    186186    /**
     
    821821
    822822                if ( ! self::is_excluded_post_type() ) {
    823                     $categories = implode( ', ', wp_list_pluck( get_categories( get_the_ID() ), 'name' ) );
     823                    $categories = implode( ', ', wp_list_pluck( get_the_category( get_the_ID() ), 'name' ) );
    824824                    $track = array(
    825825                        'event'      => sprintf( __( 'Viewed %s', 'segment' ), ucfirst( get_post_type() ) ),
  • segmentio/trunk/bin/deploy

    r950000 r1067497  
    1 #!/bin/sh
     1#! /bin/bash
     2#
     3# Script to deploy from Github to WordPress.org Plugin Repository
     4# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn
     5# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo.
     6# Source: https://github.com/thenbrent/multisite-user-management/blob/master/deploy.sh
    27
    3 #
    4 # Fetch form GitHub.
    5 #
     8# plugin slug
     9PLUGINSLUG="analytics-wordpress"
    610
     11# main config, set off of plugin slug
     12CURRENTDIR=`pwd`
     13MAINFILE="$PLUGINSLUG.php" # this should be the name of your main php file in the wordpress plugin
     14
     15# git config
     16GITPATH="$CURRENTDIR" # this file should be in the base of your git repository
     17
     18# svn config
     19SVNPATH="/tmp/$PLUGINSLUG" # path to a temp SVN repo. No trailing slash required and don't add trunk.
     20SVNURL="http://plugins.svn.wordpress.org/segmentio/" # Remote SVN repo on WordPress.org, with no trailing slash
     21SVNUSER="segmentio" # your svn username
     22
     23# Let's begin...
     24echo ".........................................."
    725echo
    8 echo "Fetching latest tags from GitHub..."
    9 git fetch
     26echo "Preparing to deploy WordPress plugin"
     27echo
     28echo ".........................................."
     29echo
    1030
    11 #
    12 # Prompt for the tag to deploy.
    13 #
     31# Check version in readme.txt is the same as plugin file
     32NEWVERSION1=`grep "^Stable tag" $GITPATH/readme.txt | awk -F' ' '{print $3}'`
     33echo "readme version: $NEWVERSION1"
     34NEWVERSION2=`grep "^Version" $GITPATH/$MAINFILE | awk -F' ' '{print $2}'`
     35echo "$MAINFILE version: $NEWVERSION2"
    1436
    15 read -p "☛  Which version (eg. '1.0.3') do you want to deploy? " version
     37if [ "$NEWVERSION1" != "$NEWVERSION2" ]; then echo "Versions don't match. Fix that! ...."; exit 1; fi
    1638
    17 #
    18 # Make sure the version is valid.
    19 #
     39  echo "Versions match in readme.txt and PHP file. Let's proceed..."
    2040
    21 if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]
    22 then
     41  cd $GITPATH
     42  git commit -am "$NEWVERSION1"
     43
     44  echo "Tagging new version in git"
     45  git tag -a "$NEWVERSION1" -m "Tagging version $NEWVERSION1"
     46
     47  echo "Pushing latest commit to origin, with tags"
     48  git push origin master
     49  git push origin master --tags
     50
    2351  echo
    24   echo "Error: \"$version\" is not a valid version string."
    25   echo
    26   exit 1
    27 fi
     52  echo "Creating local copy of SVN repo ..."
     53  svn co $SVNURL $SVNPATH
    2854
    29 #
    30 # Make sure the version exists.
    31 #
     55  echo "Ignoring github specific files and deployment script"
     56  svn propset svn:ignore "
     57  Readme.md
     58  .git
     59  .gitignore" "$SVNPATH/trunk/"
    3260
    33 if [[ -n $(git ls-remote --tags origin $version) ]]
    34 then
    35   echo "Found $version on GitHub."
    36 else
    37   echo
    38   echo "Error: $version has not been pushed to GitHub."
    39   echo
    40   exit 1
    41 fi
     61  #export git -> SVN
     62  echo "Exporting the HEAD of master from git to the trunk of SVN"
     63  git checkout-index -a -f --prefix=$SVNPATH/trunk/
    4264
    43 #
    44 # Reset the local SVN branch.
    45 #
    4665
    47 echo "Updating local SVN branch..."
    48 git checkout svn
    49 git reset --hard origin/svn
     66  echo "Changing directory to SVN and committing to trunk"
     67  cd $SVNPATH/trunk/
     68  # Add all new files that are not set to be ignored
     69  svn status | grep -v "^.[ \t]*\..*" | grep "^?" | awk '{print $2}' | xargs svn add
     70  svn commit --username=$SVNUSER -m "$NEWVERSION1"
    5071
    51 #
    52 # Merge changes from the chosen tag.
    53 #
     72  echo "Creating new SVN tag & committing it"
     73  cd $SVNPATH
     74  svn copy trunk/ tags/$NEWVERSION1/
     75  cd $SVNPATH/tags/$NEWVERSION1
     76  svn commit --username=$SVNUSER -m "Tagging version $NEWVERSION1"
    5477
    55 echo "Merging changes into local SVN branch..."
    56 git merge $version -X theirs -m "merge $version into svn"
     78  echo "Removing temporary directory $SVNPATH"
     79  rm -fr $SVNPATH/
    5780
    58 #
    59 # Commit, tag and push svn.
    60 #
    61 
    62 git svn dcommit
    63 git svn tag $version
    64 git push origin svn --force
    65 
    66 #
    67 # Exit gracefully.
    68 #
    69 
    70 git checkout master
    71 echo
    72 echo "Successfully pushed $version to the WordPress Plugin Directory!"
    73 echo "https://wordpress.org/plugins/segmentio"
    74 echo
    75 exit 0
     81  echo "*** FIN ***"
     82 
  • segmentio/trunk/readme.txt

    r986769 r1067497  
    44Requires at least: 3.6
    55Tested up to: 4.0
    6 Stable tag: 1.0.5
     6Stable tag: 1.0.10
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7676== Changelog ==
    7777
     78= 1.0.6 =
     79* Bump snippet to version 3.0.0
     80* Fix for category retrieval bug
     81
    7882= 1.0.5 =
    7983* Add context information to page calls.
  • segmentio/trunk/templates/snippet.php

    r948394 r1067497  
    11<script type="text/javascript">
    2     window.analytics=window.analytics||[],window.analytics.methods=["identify","group","track","page","pageview","alias","ready","on","once","off","trackLink","trackForm","trackClick","trackSubmit"],window.analytics.factory=function(t){return function(){var a=Array.prototype.slice.call(arguments);return a.unshift(t),window.analytics.push(a),window.analytics}};for(var i=0;i<window.analytics.methods.length;i++){var key=window.analytics.methods[i];window.analytics[key]=window.analytics.factory(key)}window.analytics.load=function(t){if(!document.getElementById("analytics-js")){var a=document.createElement("script");a.type="text/javascript",a.id="analytics-js",a.async=!0,a.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.io/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}},window.analytics.SNIPPET_VERSION="2.0.9";
     2    !function(){var analytics=window.analytics=window.analytics||[];if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0.0";
    33    <?php if ( ! $ignore ) : ?>
    44    window.analytics.load("<?php echo esc_js( $settings['api_key'] ); ?>");
Note: See TracChangeset for help on using the changeset viewer.