Skip to content

Instantly share code, notes, and snippets.

View webaware's full-sized avatar

Ross McKay webaware

View GitHub Profile
@webaware
webaware / flxmap-valter-kml-map.php
Created December 28, 2013 09:13
Valter wants to centre a KML map in WP Flexible Map; this plugin will do that for a map with id=kml_centred on a post/page with custom field 'flxmap-centre' that has the centre coordinate. e.g. `[flexiblemap id="kml_centred" src="http://goo.gl/pDG8hl" width="100%" zoom="10" maptype="satellite"]`
<?php
/*
Plugin Name: Flxmap Valter KML map
Description: Valter wants to centre/zoom KML maps
Version: 1
Author: WebAware
Author URI: http://wordpress.org/support/topic/testing-sometimes-it-does-not-work?replies=5#post-5040741
*/
add_action('wp_enqueue_scripts', function() {
@webaware
webaware / ssl-remove-menu-link.php
Last active August 29, 2015 13:55
SSL Insecure Content Fixer plugin for WordPress add a Tools menu link to a simple test script. This micro-plugin removes that link!
@webaware
webaware / events-manager-custom-thumbnails.php
Created February 3, 2014 22:03
Example of using custom thumbnails for Events Manager plugin for WordPress.
<?php
/*
Plugin Name: Events Manager custom thumbnails
Plugin URI: https://gist.github.com/webaware/8793362
Description: example of using custom thumbnails for events
Version: 1
Author: WebAware
Author URI: http://www.webaware.com.au/
@ref: http://snippets.webaware.com.au/snippets/stop-events-manager-from-cropping-thumbnails/
@webaware
webaware / flxmap-kml-cache-buster.php
Last active August 29, 2015 13:56
WP Flexible Map plugin addon to force Google to reload KML maps every hour. NB: this solution won't work with page caching plugins, e.g. WP Super Cache / W3 Total Cache. The next version of WP Flexible Map will have a better solution that will work with caching plugins
<?php
/*
Plugin Name: Flxmap KML cache buster
Plugin URI: https://gist.github.com/webaware/8946050
Description: force Google to reload KML maps every hour
Version: 1
Author: WebAware
Author URI: http://webaware.com.au/
NB: this solution won't work with page caching plugins, e.g. WP Super Cache / W3 Total Cache
@webaware
webaware / flxmap-no-rocketscript.php
Last active January 31, 2020 16:29
stop CloudFlare Rockscript messing up WP Flexible Map plugin!
<?php
/*
Plugin Name: Flxmap No Rocketscript
Plugin URI: https://gist.github.com/webaware/8949605
Description: stop CloudFlare Rockscript messing up the map plugin!
Version: 3
Author: WebAware
Author URI: http://webaware.com.au/
@ref: http://wordpress.org/support/topic/map-wont-appear
@webaware
webaware / multisite-email-usernames.php
Last active March 31, 2021 09:22
WordPress plugin that allows users to register with email add username. NB: don't use when registering also creates a site, because it will get an invalid site name!
<?php
/*
Plugin Name: Multisite email usernames
Plugin URI: https://gist.github.com/webaware/9758737
Description: allow users to register on multisite with email address as user_name
Version: 3
Author: WebAware
Author URI: http://webaware.com.au/
*/
@webaware
webaware / flxmap-custom-address.php
Created April 2, 2014 04:33
Set map address from custom field "Street Address" if page/post has one, on Flexible Map plugin for WordPress
<?php
/*
Plugin Name: Flxmap Custom Address
Plugin URI: https://gist.github.com/webaware/9927981
Description: Set map address from custom field "Street Address" if page/post has one
Version: 1
Author: WebAware
Author URI: http://webaware.com.au/
@ref http://wordpress.org/support/topic/flexiblemap-address-using-data-from-custom-field
@webaware
webaware / 1000.csv
Created April 7, 2014 02:00
Copy a template WordPress post and duplicate it many times, to create some data for capacity testing. DON'T JUST RUN THE SCRIPT! First, create a post that will be your template, then get its post ID to use with the scripts below. Blog post to follow "one day"...
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
1
2
3
4
5
6
7
8
9
10
@webaware
webaware / gfeway-only-months.php
Created April 13, 2014 04:35
only allow Monthly for recurring payments for Gravity Forms eWAY plugin
<?php
/*
Plugin Name: GFeWAY Recurring Monthly
Plugin URI: https://gist.github.com/webaware/10569363
Description: only allow Monthly for recurring payments
Version: 1
Author: WebAware
Author URI: http://webaware.com.au/
@ref: http://wordpress.org/support/topic/how-to-make-interval-type-have-monthly-option-only
@webaware
webaware / register-link-remover.php
Last active June 27, 2022 08:55
Remove the register link from the WordPress wp-login.php script. See blog post: http://snippets.webaware.com.au/snippets/remove-register-link-wordpress-wp-login-php/