├── assets-wp-repo ├── banner-1544x500.jpg ├── banner-772x250.png ├── icon-128x128.png └── icon-256x256.png ├── composer.json ├── deploy.sh ├── readme.txt └── update-privacy.php /assets-wp-repo /banner-1544x500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattradford/update-privacy/d53617d04148df93c5bd71ae9898e6275f0a172a/assets-wp-repo /banner-1544x500.jpg -------------------------------------------------------------------------------- /assets-wp-repo /banner-772x250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattradford/update-privacy/d53617d04148df93c5bd71ae9898e6275f0a172a/assets-wp-repo /banner-772x250.png -------------------------------------------------------------------------------- /assets-wp-repo /icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattradford/update-privacy/d53617d04148df93c5bd71ae9898e6275f0a172a/assets-wp-repo /icon-128x128.png -------------------------------------------------------------------------------- /assets-wp-repo /icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattradford/update-privacy/d53617d04148df93c5bd71ae9898e6275f0a172a/assets-wp-repo /icon-256x256.png -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mattrad/update-privacy", 3 | "description": "Prevents WordPress sending anything but essential data during the update check.", 4 | "keywords": ["wordpress", "plugin"], 5 | "homepage": "https://mattrad.uk", 6 | "license": "GPL2", 7 | "authors": [ 8 | { 9 | "name": "Matt Radford", 10 | "email": "matt@mattrad.uk", 11 | "homepage": "https://mattrad.uk" 12 | } 13 | ], 14 | "type": "wordpress-plugin", 15 | "require": { 16 | "php": ">=5.2.4", 17 | "composer/installers": "v1.0.6" 18 | } 19 | } -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # main config 4 | PLUGINSLUG="update-privacy" 5 | CURRENTDIR=`pwd` 6 | MAINFILE="$PLUGINSLUG.php" # This should be the name of your main php file in the WordPress plugin 7 | DEFAULT_EDITOR="/usr/bin/vim" 8 | 9 | # git config 10 | GITPATH="$CURRENTDIR/" # this file should be in the base of your git repository 11 | 12 | # svn config 13 | SVNPATH="/tmp/$PLUGINSLUG" # Path to a temp SVN repo. No trailing slash required. 14 | SVNURL="http://plugins.svn.wordpress.org/$PLUGINSLUG/" # Remote SVN repo on wordpress.org 15 | SVNUSER="mattrad" # Your SVN username 16 | 17 | # Let's begin... 18 | echo 19 | echo "Deploy WordPress plugin" 20 | echo "=======================" 21 | echo 22 | 23 | # Check version in readme.txt is the same as plugin file after translating both to unix 24 | # line breaks to work around grep's failure to identify mac line breaks 25 | NEWVERSION1=`grep "^Stable tag:" "$GITPATH/readme.txt" | awk -F' ' '{print $NF}'` 26 | echo "readme.txt version: $NEWVERSION1" 27 | NEWVERSION2=`grep "Version: " "$GITPATH/$MAINFILE" | awk -F' ' '{print $NF}'` 28 | echo "$MAINFILE version: $NEWVERSION2" 29 | 30 | if [ "$NEWVERSION1" != "$NEWVERSION2" ] 31 | then echo "Version in readme.txt & $MAINFILE don't match. Exiting." 32 | exit 1 33 | fi 34 | 35 | echo "Versions match in readme.txt and $MAINFILE. Let's proceed..." 36 | 37 | if git show-ref --quiet --tags --verify -- "refs/tags/$NEWVERSION1" 38 | then 39 | echo "Version $NEWVERSION1 already exists as git tag. Exiting." 40 | exit 1 41 | else 42 | echo "Git version does not exist. Let's proceed..." 43 | echo 44 | fi 45 | 46 | cd $GITPATH 47 | 48 | echo -n "Saving previous Git tag version..." 49 | PREVTAG=`git describe --tags \`git rev-list --tags --max-count=1\`` 50 | echo "Done." 51 | 52 | echo -n "Tagging new Git version..." 53 | git tag -a "$NEWVERSION1" -m "Tagging version $NEWVERSION1" 54 | echo "Done." 55 | 56 | echo -n "Pushing new Git tag..." 57 | git push --quiet --tags 58 | echo "Done." 59 | 60 | echo -n "Creating local copy of SVN repo..." 61 | svn checkout --quiet $SVNURL/trunk $SVNPATH/trunk 62 | echo "Done." 63 | 64 | echo -n "Exporting the HEAD of master from Git to the trunk of SVN..." 65 | git checkout-index --quiet --all --force --prefix=$SVNPATH/trunk/ 66 | echo "Done." 67 | 68 | echo -n "Preparing commit message..." 69 | git log --pretty=oneline --abbrev-commit $PREVTAG..$NEWVERSION1 > /tmp/wppdcommitmsg.tmp 70 | echo "Done." 71 | 72 | echo -n "Preparing assets-wp-repo..." 73 | if [ -d $SVNPATH/trunk/assets-wp-repo ] 74 | then 75 | svn checkout --quiet $SVNURL/assets $SVNPATH/assets > /dev/null 2>&1 76 | mkdir $SVNPATH/assets/ > /dev/null 2>&1 # Create assets directory if it doesn't exists 77 | mv $SVNPATH/trunk/assets-wp-repo/* $SVNPATH/assets/ # Move new assets 78 | rm -rf $SVNPATH/trunk/assets-wp-repo # Clean up 79 | cd $SVNPATH/assets/ # Switch to assets directory 80 | svn stat | grep "^?\|^M" > /dev/null 2>&1 # Check if new or updated assets exists 81 | if [ $? -eq 0 ] 82 | then 83 | svn stat | grep "^?" | awk '{print $2}' | xargs svn add --quiet # Add new assets 84 | echo -en "Committing new assets..." 85 | svn commit --quiet --username=$SVNUSER -m "Updated assets" 86 | echo "Done." 87 | else 88 | echo "Unchanged." 89 | fi 90 | else 91 | echo "No assets exists." 92 | fi 93 | 94 | cd $SVNPATH/trunk/ 95 | 96 | echo -n "Ignoring GitHub specific files and deployment script..." 97 | svn propset --quiet svn:ignore "deploy.sh 98 | README.md 99 | .git 100 | .gitignore" . 101 | echo "Done." 102 | 103 | echo -n "Adding new files..." 104 | svn stat | grep "^?" | awk '{print $2}' | xargs svn add --quiet 105 | echo "Done." 106 | 107 | echo -n "Removing old files..." 108 | svn stat | grep "^\!" | awk '{print $2}' | xargs svn remove --quiet 109 | echo "Done." 110 | 111 | echo -n "Enter a commit message for this new SVN version..." 112 | $DEFAULT_EDITOR /tmp/wppdcommitmsg.tmp 113 | COMMITMSG=`cat /tmp/wppdcommitmsg.tmp` 114 | rm /tmp/wppdcommitmsg.tmp 115 | echo "Done." 116 | 117 | echo -n "Committing new SVN version..." 118 | svn commit --quiet --username=$SVNUSER -m "$COMMITMSG" 119 | echo "Done." 120 | 121 | echo -n "Tagging and committing new SVN tag..." 122 | svn copy $SVNURL/trunk $SVNURL/tags/$NEWVERSION1 --quiet --username=$SVNUSER -m "Tagging version $NEWVERSION1" 123 | echo "Done." 124 | 125 | echo -n "Removing temporary directory $SVNPATH..." 126 | rm -rf $SVNPATH/ 127 | echo "Done." 128 | 129 | echo 130 | echo "The plugin version $NEWVERSION1 is successfully deployed." 131 | echo 132 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | === Update Privacy === 2 | Contributors: mattrad 3 | Requires at least: 4.9 4 | Tested up to: 5.2.1 5 | Stable tag: 1.0.4 6 | Requires PHP: 5.2.4 7 | Tags: privacy, updates, GDPR 8 | License: GPLv2 or later 9 | License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 | 11 | Stop WordPress sending anything but essential data during the update check. 12 | 13 | == Description == 14 | 15 | Stop WordPress sending anything but essential data during the update check. 16 | 17 | By default, WordPress sends the following data during the version update check: 18 | 19 | * Current WordPress version 20 | * Language 21 | * PHP version 22 | * MySQL version 23 | * If multisite in enabled 24 | * Number of websites the WordPress install is running (this will be 1 unless it is a multisite) 25 | * Number of users 26 | * The WordPress database version during initial installation 27 | 28 | The WordPress dashboard does not currently provide a way to opt-out of this data collection, but WordPress 4.9 introduced the ability to change whether this data is sent. 29 | 30 | This plugin ensures only essential data - current WordPress version and language - are sent during the update check. 31 | 32 | There are no options to configure with this plugin. 33 | 34 | == Frequently Asked Questions == 35 | 36 | = Why do I need this? = 37 | 38 | Because WordPress sends non-essential data on every update check to wordpress.org's API. 39 | 40 | = But that's ok, right? = 41 | 42 | On a WordPress install with only one user, sure, that's up to you. But if you have more than one user, you need to consider their data as well. 43 | 44 | Under the GDPR, even pseudonymised data (such as IP address) needs to be considered as data that you should be protecting on behalf of your users. 45 | 46 | Also consider a WordPress install with WooCommerce - do you want to send the number of your customers to a 3rd party? If you do, you may need to get their consent to do so. 47 | 48 | = Can I include this plugin using Composer? = 49 | 50 | Yes. See https://github.com/mattradford/update-privacy> 51 | 52 | = Who did the banner art? = 53 | 54 | The image is licensed under the Creative Commons, Attribution 2.0 Generic (CC BY 2.0), and was taken by Tim Parkinson: . 55 | 56 | [Original image](https://www.flickr.com/photos/timparkinson/509774987/in/photolist-M3JkV-SBenGs-DTfnt-9D55KS-5dV6i4-DThif-ccE7GW-5mfo7h-dN6GbY-GtD7y-bVhSsv-9G8yCm-3fwgHt-TFUyB2-bVhSiX-5dZqJ1-5dV76t-5dZrL1-5mb6HT-4stVFT-6ftjX6-GtGwz-sX9CY-nPwQUR-3Zcbby-GtDJo-SEPetr-9FoGdT-2U3JM-ee9npF-5v7Wwg-v3u6aw-aMmB2a-sX9Ge-DTesZ-SzxxT1-GtCHd-5mfoTW-DTesN-TCbsq7-8t7YtD-96pPZ-7SD5w6-5dZrjE-5dV6ti-5dZsMN-TFQ9ND-DTeso-5dZsaQ-5dZtLJ) 57 | 58 | == Changelog == 59 | 60 | = 1.0.4 = 61 | * Forcing a push. 62 | 63 | = 1.0.3 = 64 | * Fix typo. Update FAQ. 65 | 66 | = 1.0.2 = 67 | * Fix short description so it shows correctly. 68 | 69 | = 1.0.1 = 70 | * Add composer.json, fix typo and add Github URL. 71 | 72 | = 1.0.0 = 73 | * Initial release. -------------------------------------------------------------------------------- /update-privacy.php: -------------------------------------------------------------------------------- 1 |